[GH-ISSUE #1318] Frp UDP穿透时好时坏 #1045

Closed
opened 2026-05-05 12:40:25 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @pedxyuyuko on GitHub (Jul 11, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1318

What version of frp are you using (./frpc -v or ./frps -v)?

  • frps: 0.27.0
  • frpc: 0.27.0

What operating system and processor architecture are you using (go env)?
Server: Linux3.10 - Centos7 | Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Client: Windows Server 2016 r2 | Intel(R) Xeon(R) 2660v2 @ 2.2Ghz

Configures you used:
Server:

bind_addr = 0.0.0.0
bind_port = 2000
bind_udp_port = 2001
kcp_bind_port = 2002
vhost_http_port = 8000
vhost_https_port = 4430
dashboard_addr = 0.0.0.0
dashboard_port = 2200
dashboard_user = admin
dashboard_pwd = pass
log_file = ./frps.log
log_level = debug
log_max_days = 3
token = pass
allow_ports = 4000-60000
max_pool_count = 5
max_ports_per_client = 0
tcp_mux = true

Client:

[common]
server_addr = JustIP
server_port = 2000
token = pass

[scpsl]
type = udp
local_ip = 127.0.0.1
local_port = 7777
remote_port = 7777
use_encryption = false
use_compression = false

Steps to reproduce the issue:

  1. 搭建一个使用UDP协议的服务器
  2. 使用frp穿透
  3. 尝试连接服务器

Describe the results you received:
控制台没有任何异常输出
有时候连得上 有时候不行

Describe the results you expected:
玩家可以成功连上服务器

Additional information you deem important (e.g. issue happens only occasionally):
无规律发生此异常 通常重启frp服务器有概率恢复

Originally created by @pedxyuyuko on GitHub (Jul 11, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1318 **What version of frp are you using (./frpc -v or ./frps -v)?** - frps: 0.27.0 - frpc: 0.27.0 **What operating system and processor architecture are you using (`go env`)?** Server: Linux3.10 - Centos7 | Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz Client: Windows Server 2016 r2 | Intel(R) Xeon(R) 2660v2 @ 2.2Ghz **Configures you used:** Server: ```ini bind_addr = 0.0.0.0 bind_port = 2000 bind_udp_port = 2001 kcp_bind_port = 2002 vhost_http_port = 8000 vhost_https_port = 4430 dashboard_addr = 0.0.0.0 dashboard_port = 2200 dashboard_user = admin dashboard_pwd = pass log_file = ./frps.log log_level = debug log_max_days = 3 token = pass allow_ports = 4000-60000 max_pool_count = 5 max_ports_per_client = 0 tcp_mux = true ``` Client: ```ini [common] server_addr = JustIP server_port = 2000 token = pass [scpsl] type = udp local_ip = 127.0.0.1 local_port = 7777 remote_port = 7777 use_encryption = false use_compression = false ``` **Steps to reproduce the issue:** 1. 搭建一个使用UDP协议的服务器 2. 使用frp穿透 3. 尝试连接服务器 **Describe the results you received:** 控制台没有任何异常输出 有时候连得上 有时候不行 **Describe the results you expected:** 玩家可以成功连上服务器 **Additional information you deem important (e.g. issue happens only occasionally):** 无规律发生此异常 通常重启frp服务器有概率恢复
Author
Owner

@san3Xian commented on GitHub (Jul 16, 2019):

同一现象+1
在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包
在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复
server在国内云

image

frps进程结束重启
image

image

<!-- gh-comment-id:511636646 --> @san3Xian commented on GitHub (Jul 16, 2019): 同一现象+1 在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包 在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复 server在国内云 ![image](https://user-images.githubusercontent.com/24935499/61259132-7541bf00-a7ab-11e9-8eaa-0d27efd727ad.png) frps进程结束重启 ![image](https://user-images.githubusercontent.com/24935499/61260832-52ff6f80-a7b2-11e9-8b31-d9cf85f627d8.png) ![image](https://user-images.githubusercontent.com/24935499/61260851-64487c00-a7b2-11e9-96b8-c37f8c8dcc66.png)
Author
Owner

@pedxyuyuko commented on GitHub (Jul 16, 2019):

同一现象+1
在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包
在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复
server在国内云

image

frps进程结束重启
image

image

问个问题 您是不是也在开SCPSL服务器 我觉得frp是被满人攻击打瘫了

<!-- gh-comment-id:511637139 --> @pedxyuyuko commented on GitHub (Jul 16, 2019): > 同一现象+1 > 在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包 > 在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复 > server在国内云 > > ![image](https://user-images.githubusercontent.com/24935499/61259132-7541bf00-a7ab-11e9-8eaa-0d27efd727ad.png) > > frps进程结束重启 > ![image](https://user-images.githubusercontent.com/24935499/61260832-52ff6f80-a7b2-11e9-8b31-d9cf85f627d8.png) > > ![image](https://user-images.githubusercontent.com/24935499/61260851-64487c00-a7b2-11e9-96b8-c37f8c8dcc66.png) 问个问题 您是不是也在开SCPSL服务器 我觉得frp是被满人攻击打瘫了
Author
Owner

@san3Xian commented on GitHub (Jul 16, 2019):

同一现象+1
在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包
在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复
server在国内云
image
frps进程结束重启
image
image

问个问题 您是不是也在开SCPSL服务器 我觉得frp是被满人攻击打瘫了

没有,那台服务器上面只有frps,默认监听一个KCP通讯端口一个TCP通讯端口

<!-- gh-comment-id:511639768 --> @san3Xian commented on GitHub (Jul 16, 2019): > > 同一现象+1 > > 在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包 > > 在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复 > > server在国内云 > > ![image](https://user-images.githubusercontent.com/24935499/61259132-7541bf00-a7ab-11e9-8eaa-0d27efd727ad.png) > > frps进程结束重启 > > ![image](https://user-images.githubusercontent.com/24935499/61260832-52ff6f80-a7b2-11e9-8b31-d9cf85f627d8.png) > > ![image](https://user-images.githubusercontent.com/24935499/61260851-64487c00-a7b2-11e9-96b8-c37f8c8dcc66.png) > > 问个问题 您是不是也在开SCPSL服务器 我觉得frp是被满人攻击打瘫了 没有,那台服务器上面只有frps,默认监听一个KCP通讯端口一个TCP通讯端口
Author
Owner

@pedxyuyuko commented on GitHub (Jul 18, 2019):

同一现象+1
在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包
在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复
server在国内云
image
frps进程结束重启
image
image

问个问题 您是不是也在开SCPSL服务器 我觉得frp是被满人攻击打瘫了

没有,那台服务器上面只有frps,默认监听一个KCP通讯端口一个TCP通讯端口

老兄我好像发现解决方案了,
frps.ini 里面加入: kcp_bind_portbind_udp_port
然后在 frpc.ini 里面加入
image

<!-- gh-comment-id:512692819 --> @pedxyuyuko commented on GitHub (Jul 18, 2019): > > > 同一现象+1 > > > 在client上面tcpdump发现client一直有发UDP报文到server,但是没收到回包 > > > 在server上面tcpdump发现server一直收到报文,但是frps并没有响应,重启恢复 > > > server在国内云 > > > ![image](https://user-images.githubusercontent.com/24935499/61259132-7541bf00-a7ab-11e9-8eaa-0d27efd727ad.png) > > > frps进程结束重启 > > > ![image](https://user-images.githubusercontent.com/24935499/61260832-52ff6f80-a7b2-11e9-8b31-d9cf85f627d8.png) > > > ![image](https://user-images.githubusercontent.com/24935499/61260851-64487c00-a7b2-11e9-96b8-c37f8c8dcc66.png) > > > > > > 问个问题 您是不是也在开SCPSL服务器 我觉得frp是被满人攻击打瘫了 > > 没有,那台服务器上面只有frps,默认监听一个KCP通讯端口一个TCP通讯端口 老兄我好像发现解决方案了, 在 ``frps.ini`` 里面加入: ``kcp_bind_port`` 或 ``bind_udp_port`` 然后在 ``frpc.ini`` 里面加入 ![image](https://user-images.githubusercontent.com/39913604/61436463-73bff480-a96d-11e9-9eb4-7b834051e862.png)
Author
Owner

@pedxyuyuko commented on GitHub (Jul 18, 2019):

目前貌似没什么问题 还是挺稳定的

<!-- gh-comment-id:512692884 --> @pedxyuyuko commented on GitHub (Jul 18, 2019): 目前貌似没什么问题 还是挺稳定的
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#1045
No description provided.