[GH-ISSUE #4264] 使用旁路由的情况下, frpc无法启动问题 #3363

Closed
opened 2026-05-05 14:10:07 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @mylaracroft on GitHub (Jun 4, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4264

Bug Description

家里主路由是爱快硬件wifi ,单网口旁路由是openwrt的istoreos,安装组件有passwall1 、mosdns 和 lucky 。
旁路由器防火墙设置为 lan-->ACCEPT 入站接受 出站接受 转发接受 IP动态伪装

排查了 2 小时,一直以为是阿里云上的 frps 的问题,发现 firewalld 和frps.toml没有任何问题。

最后将局域网电脑的网关设置成爱快主路由,frpc 可以正常启动。切回旁路由,又无法连接了。
在使用旁路由的情况下,tcping 阿里云主机+frps 端口正常,tracert 阿里云主机也正常。

frpc Version

0.58.1

frps Version

0.58.1

System Architecture

windows/amd64

Configurations

serveraddr、token和sk密码均为示意

【FRPS配置如下】
bindAddr = "0.0.0.0"
bindPort = 7000
kcpBindPort = 7000
quicBindPort = 6000
transport.maxPoolCount = 50
log.to = "./frps.log"
log.level = "info"
log.maxDays = 1
log.disablePrintColor = false
detailedErrorsToClient = true
auth.method = "token"
auth.token = "Aa123456@"
udpPacketSize = 1500

【FRPS proxies配置如下】
serverAddr = "frp.abc.com"
serverPort = 7000
auth.method = "token"
auth.token = "Aa123456@"
loginFailExit = true
log.to = "./frpc.log"
log.level = "info"
log.maxDays = 1
log.disablePrintColor = false

proxies
name = "Test_Remote_stcp"
type = "stcp"
secretKey = "ceshi1111"
localIP = "127.0.0.1"
localPort = 3389
transport.useEncryption = true
transport.useCompression = true

proxies
name = "Test_Remote_sudp"
type = "sudp"
secretKey = "ceshi1111"
localIP = "127.0.0.1"
localPort = 3389
transport.useEncryption = true
transport.useCompression = true

【FRPC visitors配置如下】
serverAddr = "frp.abc.com"
serverPort = 7000
auth.method = "token"
auth.token = "Aa123456@"
loginFailExit = true
log.to = "./frpc.log"
log.level = "info"
log.maxDays = 1
log.disablePrintColor = false

visitors
name = "Test_Remote_stcp_visitor"
type = "stcp"
serverName = "Test_Remote_stcp"
secretKey = "ceshi1111"
bindAddr = "127.0.0.1"
bindPort = 33891
transport.useEncryption = true
transport.useCompression = true

visitors
name = "Test_Remote_sudp_visitor"
type = "sudp"
serverName = "Test_Remote_sudp"
secretKey = "ceshi1111"
bindAddr = "127.0.0.1"
bindPort = 33891
transport.useEncryption = true
transport.useCompression = true

Logs

winsw 日志为“login to the server failed: session shutdown. With loginFailExit enabled, no additional retries will be attempted”

frpc 日志为
“[W] [client/service.go:297] [ecf520b82a782e7e] connect to server error: tls: first record does not look like a TLS handshake”
“[I] [client/service.go:294] [ecf520b82a782e7e] try to connect to server...”
“[W] [client/service.go:297] connect to server error: session shutdown”
“[I] [sub/root.go:160] frpc service for config file [frpc.toml] stopped”

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @mylaracroft on GitHub (Jun 4, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4264 ### Bug Description 家里主路由是爱快硬件wifi ,单网口旁路由是openwrt的istoreos,安装组件有passwall1 、mosdns 和 lucky 。 旁路由器防火墙设置为 lan-->ACCEPT 入站接受 出站接受 转发接受 IP动态伪装 排查了 2 小时,一直以为是阿里云上的 frps 的问题,发现 firewalld 和frps.toml没有任何问题。 最后将局域网电脑的网关设置成爱快主路由,frpc 可以正常启动。切回旁路由,又无法连接了。 在使用旁路由的情况下,tcping 阿里云主机+frps 端口正常,tracert 阿里云主机也正常。 ### frpc Version 0.58.1 ### frps Version 0.58.1 ### System Architecture windows/amd64 ### Configurations serveraddr、token和sk密码均为示意 【FRPS配置如下】 bindAddr = "0.0.0.0" bindPort = 7000 kcpBindPort = 7000 quicBindPort = 6000 transport.maxPoolCount = 50 log.to = "./frps.log" log.level = "info" log.maxDays = 1 log.disablePrintColor = false detailedErrorsToClient = true auth.method = "token" auth.token = "Aa123456@" udpPacketSize = 1500 【FRPS proxies配置如下】 serverAddr = "frp.abc.com" serverPort = 7000 auth.method = "token" auth.token = "Aa123456@" loginFailExit = true log.to = "./frpc.log" log.level = "info" log.maxDays = 1 log.disablePrintColor = false [[proxies]] name = "Test_Remote_stcp" type = "stcp" secretKey = "ceshi1111" localIP = "127.0.0.1" localPort = 3389 transport.useEncryption = true transport.useCompression = true [[proxies]] name = "Test_Remote_sudp" type = "sudp" secretKey = "ceshi1111" localIP = "127.0.0.1" localPort = 3389 transport.useEncryption = true transport.useCompression = true 【FRPC visitors配置如下】 serverAddr = "frp.abc.com" serverPort = 7000 auth.method = "token" auth.token = "Aa123456@" loginFailExit = true log.to = "./frpc.log" log.level = "info" log.maxDays = 1 log.disablePrintColor = false [[visitors]] name = "Test_Remote_stcp_visitor" type = "stcp" serverName = "Test_Remote_stcp" secretKey = "ceshi1111" bindAddr = "127.0.0.1" bindPort = 33891 transport.useEncryption = true transport.useCompression = true [[visitors]] name = "Test_Remote_sudp_visitor" type = "sudp" serverName = "Test_Remote_sudp" secretKey = "ceshi1111" bindAddr = "127.0.0.1" bindPort = 33891 transport.useEncryption = true transport.useCompression = true ### Logs winsw 日志为“login to the server failed: session shutdown. With loginFailExit enabled, no additional retries will be attempted” frpc 日志为 “[W] [client/service.go:297] [ecf520b82a782e7e] connect to server error: tls: first record does not look like a TLS handshake” “[I] [client/service.go:294] [ecf520b82a782e7e] try to connect to server...” “[W] [client/service.go:297] connect to server error: session shutdown” “[I] [sub/root.go:160] frpc service for config file [frpc.toml] stopped” ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [X] Others
Author
Owner

@wuai1024 commented on GitHub (Jun 4, 2024):

还是要检查下,目前我使用过的 ikuai 主路由 + iStore 旁路由,旁路由也是全局接管流量了(你懂的)。frpc 使用不影响,就只是会影响到 p2p打洞。

<!-- gh-comment-id:2147481752 --> @wuai1024 commented on GitHub (Jun 4, 2024): 还是要检查下,目前我使用过的 ikuai 主路由 + iStore 旁路由,旁路由也是全局接管流量了(你懂的)。`frpc` 使用不影响,就只是会影响到 p2p打洞。
Author
Owner

@mylaracroft commented on GitHub (Jun 4, 2024):

找到问题根源了,确实在旁路由上,因为旁路由全局接管了流量,映射了端口和bindPort冲突造成的。

<!-- gh-comment-id:2147532852 --> @mylaracroft commented on GitHub (Jun 4, 2024): 找到问题根源了,确实在旁路由上,因为旁路由全局接管了流量,映射了端口和bindPort冲突造成的。
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#3363
No description provided.