[GH-ISSUE #3418] [Feature Request]内网https服务怎么代理出去 tcp https http2https 都试过了全都连不上 #2736

Closed
opened 2026-05-05 13:45:45 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @maogeigei on GitHub (Apr 21, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3418

Describe the feature request

试了以下三种方式都是500的错,还有那个frpc 配置里的remote_port 设置感觉没有作用,服务器查看对应端口 也没有监听
[http2https]
type = tcp
custom_domains = 123.43.23.133
plugin = http2https
plugin_local_addr = 127.0.0.1:7800
remote_port = 6202

[tcp]
type = tcp
custom_domains = 123.43.23.133
local_ip= 127.0.0.1
local_port = 7800
remote_port = 6202

[web2]
type = https
custom_domains = 123.43.23.133
local_port = 7800

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @maogeigei on GitHub (Apr 21, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3418 ### Describe the feature request 试了以下三种方式都是500的错,还有那个frpc 配置里的remote_port 设置感觉没有作用,服务器查看对应端口 也没有监听 [http2https] type = tcp custom_domains = 123.43.23.133 plugin = http2https plugin_local_addr = 127.0.0.1:7800 remote_port = 6202 [tcp] type = tcp custom_domains = 123.43.23.133 local_ip= 127.0.0.1 local_port = 7800 remote_port = 6202 [web2] type = https custom_domains = 123.43.23.133 local_port = 7800 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:45:45 -06:00
Author
Owner

@Becods commented on GitHub (Apr 21, 2023):

CM6PHS7AGGJPN31Y2DI83MS

<!-- gh-comment-id:1517298037 --> @Becods commented on GitHub (Apr 21, 2023): ![CM6PHS7AGGJPN31Y2DI83MS](https://user-images.githubusercontent.com/35525491/233551388-2be38062-7be9-467c-9c92-de822753b68c.png)
Author
Owner

@superzjg commented on GitHub (Apr 24, 2023):

内网现存的https代理很简单啊,使用tcp和https都可以(不用http2https)
你的配置也有问题,用tcp时不需要写 域名custom_domains,但要写远程端口remote_port;用https需要local_ip
使用时浏览器记得加https://

<!-- gh-comment-id:1519286255 --> @superzjg commented on GitHub (Apr 24, 2023): 内网现存的https代理很简单啊,使用tcp和https都可以(不用http2https) 你的配置也有问题,用tcp时不需要写 域名custom_domains,但要写远程端口remote_port;用https需要local_ip 使用时浏览器记得加https://
Author
Owner

@github-actions[bot] commented on GitHub (May 25, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1562095595 --> @github-actions[bot] commented on GitHub (May 25, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@shyandsy commented on GitHub (Dec 9, 2024):

@superzjg
尝试用tcp方式转内网https,不行啊

client端配置

[[proxies]]
name = "kubectl"
type = "tcp"
localIP = "192.168.101.20"
localPort = 6443
remotePort = 52000

服务端报错

2024-12-09 21:12:32.919 [I] [proxy/proxy.go:204] [b02c85b44184bf62] [kubectl] get a user connection [223.166.248.161:50422]
2024-12-09 21:12:32.919 [D] [server/control.go:272] [b02c85b44184bf62] get work connection from pool
2024-12-09 21:12:32.919 [D] [proxy/proxy.go:131] [b02c85b44184bf62] [kubectl] get a new work connection: [223.166.248.161:41344]
2024-12-09 21:12:32.919 [D] [proxy/proxy.go:261] [b02c85b44184bf62] [kubectl] join connections, workConn(l[172.16.19.89:50000] r[223.166.248.161:41344]) userConn(l[172.16.19.89:52000] r[223.166.248.161:50422])
2024-12-09 21:12:32.933 [D] [server/control.go:243] [b02c85b44184bf62] new work connection registered
2024-12-09 21:12:32.952 [D] [proxy/proxy.go:271] [b02c85b44184bf62] [kubectl] join connections closed

客户端没有任何log

<!-- gh-comment-id:2527892132 --> @shyandsy commented on GitHub (Dec 9, 2024): @superzjg 尝试用tcp方式转内网https,不行啊 client端配置 ``` [[proxies]] name = "kubectl" type = "tcp" localIP = "192.168.101.20" localPort = 6443 remotePort = 52000 ``` 服务端报错 ``` 2024-12-09 21:12:32.919 [I] [proxy/proxy.go:204] [b02c85b44184bf62] [kubectl] get a user connection [223.166.248.161:50422] 2024-12-09 21:12:32.919 [D] [server/control.go:272] [b02c85b44184bf62] get work connection from pool 2024-12-09 21:12:32.919 [D] [proxy/proxy.go:131] [b02c85b44184bf62] [kubectl] get a new work connection: [223.166.248.161:41344] 2024-12-09 21:12:32.919 [D] [proxy/proxy.go:261] [b02c85b44184bf62] [kubectl] join connections, workConn(l[172.16.19.89:50000] r[223.166.248.161:41344]) userConn(l[172.16.19.89:52000] r[223.166.248.161:50422]) 2024-12-09 21:12:32.933 [D] [server/control.go:243] [b02c85b44184bf62] new work connection registered 2024-12-09 21:12:32.952 [D] [proxy/proxy.go:271] [b02c85b44184bf62] [kubectl] join connections closed ``` 客户端没有任何log
Author
Owner

@superzjg commented on GitHub (Dec 9, 2024):

@superzjg 尝试用tcp方式转内网https,不行啊

client端配置

[[proxies]]
name = "kubectl"
type = "tcp"
localIP = "192.168.101.20"
localPort = 6443
remotePort = 52000

服务端报错

2024-12-09 21:12:32.919 [I] [proxy/proxy.go:204] [b02c85b44184bf62] [kubectl] get a user connection [223.166.248.161:50422]
2024-12-09 21:12:32.919 [D] [server/control.go:272] [b02c85b44184bf62] get work connection from pool
2024-12-09 21:12:32.919 [D] [proxy/proxy.go:131] [b02c85b44184bf62] [kubectl] get a new work connection: [223.166.248.161:41344]
2024-12-09 21:12:32.919 [D] [proxy/proxy.go:261] [b02c85b44184bf62] [kubectl] join connections, workConn(l[172.16.19.89:50000] r[223.166.248.161:41344]) userConn(l[172.16.19.89:52000] r[223.166.248.161:50422])
2024-12-09 21:12:32.933 [D] [server/control.go:243] [b02c85b44184bf62] new work connection registered
2024-12-09 21:12:32.952 [D] [proxy/proxy.go:271] [b02c85b44184bf62] [kubectl] join connections closed

客户端没有任何log

可能跟网络环境有关,尝试改一下传输协议,比如frpc通用部分配置transport.protocol = "quic",frps配置quic绑定UDP端口,并打开防火墙。印象中见过这种情况

也可不改协议尝试配置 transport.tls.disableCustomTLSFirstByte = false

<!-- gh-comment-id:2528033896 --> @superzjg commented on GitHub (Dec 9, 2024): > @superzjg 尝试用tcp方式转内网https,不行啊 > > client端配置 > > ``` > [[proxies]] > name = "kubectl" > type = "tcp" > localIP = "192.168.101.20" > localPort = 6443 > remotePort = 52000 > ``` > > 服务端报错 > > ``` > 2024-12-09 21:12:32.919 [I] [proxy/proxy.go:204] [b02c85b44184bf62] [kubectl] get a user connection [223.166.248.161:50422] > 2024-12-09 21:12:32.919 [D] [server/control.go:272] [b02c85b44184bf62] get work connection from pool > 2024-12-09 21:12:32.919 [D] [proxy/proxy.go:131] [b02c85b44184bf62] [kubectl] get a new work connection: [223.166.248.161:41344] > 2024-12-09 21:12:32.919 [D] [proxy/proxy.go:261] [b02c85b44184bf62] [kubectl] join connections, workConn(l[172.16.19.89:50000] r[223.166.248.161:41344]) userConn(l[172.16.19.89:52000] r[223.166.248.161:50422]) > 2024-12-09 21:12:32.933 [D] [server/control.go:243] [b02c85b44184bf62] new work connection registered > 2024-12-09 21:12:32.952 [D] [proxy/proxy.go:271] [b02c85b44184bf62] [kubectl] join connections closed > ``` > > 客户端没有任何log 可能跟网络环境有关,尝试改一下传输协议,比如frpc通用部分配置`transport.protocol = "quic"`,frps配置quic绑定UDP端口,并打开防火墙。印象中见过这种情况 也可不改协议尝试配置 `transport.tls.disableCustomTLSFirstByte = false`
Author
Owner

@yogaxu commented on GitHub (Nov 25, 2025):

把http2https改成https2https就可以了

<!-- gh-comment-id:3573450127 --> @yogaxu commented on GitHub (Nov 25, 2025): 把http2https改成https2https就可以了
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2736
No description provided.