mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4657] 域名换了ip后web正常,手机访问不行 #3680
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3680
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liaocheng1 on GitHub (Feb 5, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4657
Bug Description
我有两个外网服务器,之前frps在A上域名指向A的ip,后来换成了B,之后同样的连接用web能正常访问,用手机打开就不能访问,换成A后web和手机都可以开打。git可以访问,clone就不行
frpc Version
0.61.1
frps Version
0.61.1
System Architecture
linux/amd64
Configurations
#frps服务监听的本机端口
bindPort = 7000
vhostHTTPPort = 80
vhostHTTPSPort = 443
#frpc服务监听的本机端口
serverAddr = "x.x.x.x"
serverPort = 7000
proxies
name = "nginx-80"
type = "http"
localIP = "127.0.0.1"
localPort = 80
#remotePort = 80
customDomains = ["xxx"]
proxies
name = "nginx-443"
type = "https"
localIP = "127.0.0.1"
localPort = 443
#remotePort = 443
customDomains = ["xxx"]
Logs
正常web访问的frpc日志
2025/02/05 12:00:40 [D] [proxy_wrapper.go:260] [6cad457551cacc7a] [nginx-443] start a new work connection, localAddr: x.x.x.x:33714 remoteAddr: x.x.x.x:7000
2025/02/05 12:00:40 [T] [proxy.go:144] [6cad457551cacc7a] [nginx-443] handle tcp work connection, useEncryption: false, useCompression: false
2025/02/05 12:00:40 [D] [proxy.go:208] [6cad457551cacc7a] [nginx-443] join connections, localConn(l[127.0.0.1:34320] r[127.0.0.1:443]) workConn(l[192.168.112.162:33714] r[x.x.x.x:7000])
2025/02/05 12:00:46 [D] [control.go:243] [6cad457551cacc7a] send heartbeat to server
异常frpc日志;
2025/02/05 12:53:55 [D] [proxy_wrapper.go:260] [6cad457551cacc7a] [nginx-443] start a new work connection, localAddr: 192.168.112.162:33714 remoteAddr: x.x.x.x:7000
2025/02/05 12:53:55 [T] [proxy.go:144] [6cad457551cacc7a] [nginx-443] handle tcp work connection, useEncryption: false, useCompression: false
2025/02/05 12:53:55 [D] [proxy.go:208] [6cad457551cacc7a] [nginx-443] join connections, localConn(l[127.0.0.1:43150] r[127.0.0.1:443]) workConn(l[192.168.112.162:33714] r[x.x.x.x:7000])
2025/02/05 12:53:55 [D] [proxy.go:220] [6cad457551cacc7a] [nginx-443] join connections closed
2025/02/05 12:53:55 [T] [proxy.go:222] [6cad457551cacc7a] [nginx-443] join connections errors: [read tcp 127.0.0.1:43150->127.0.0.1:443: use of closed network connection]
Steps to reproduce
4.web用域名正常访问私有git仓库正常
5.git拉取代码异常
Affected area
@xqzr commented on GitHub (Feb 5, 2025):
web(浏览器)支持 X25519MLKEM768 一些防火墙,可能无法识别。可以访问
@fatedier commented on GitHub (Feb 7, 2025):
类似的问题尽量优先自行排查应用层的问题。
@vincent067 commented on GitHub (Mar 23, 2026):
Hi @dgtlmoon 👋
I noticed you mentioned the issue resolved itself after some time. This pattern (connection drops every ~5 minutes) often points to a few common causes:
Most Likely Causes:
Idle timeout on intermediate NAT/firewall 🔥
Many corporate firewalls/NAT gateways drop idle connections after 5 minutes. You can fix this by enabling heartbeats:
TCP connection tracking timeout
Some Linux distributions have aggressive tcp_keepalive settings. Check:
Default is often 7200s (2 hours), but some systems override this.
Proxy/Load Balancer idle timeout
If you're connecting through a cloud LB (AWS ALB, etc.), they often have 60-300s idle timeouts.
Diagnostic Tips:
Could you run frpc with debug logging next time it happens?
Also helpful to know:
frpc --versionshow on both ends?The fact that it resolved itself might indicate a temporary network issue or a firewall rule change. If it happens again, the heartbeat settings should help! 👍
Hope this helps diagnose it if it recurs.