[GH-ISSUE #2537] sudp一个奇怪的日志问题 #2014

Closed
opened 2026-05-05 13:18:13 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @wyaode on GitHub (Aug 19, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2537

[REQUIRED] hat version of frp are you using

Version:0.37.1

[REQUIRED] What operating system and processor architecture are you using
OS:Windows
CPU architecture:x64

frps用默认配置监听7000

frpc1配置如下:
[common]
log_file = ./frpc1.log
[rule1]
type = sudp
sk = sk1
local_ip = 127.0.0.1
local_port = 8002

frpc2配置如下:
[common]
log_file = ./frpc2.log
[rule2]
type = sudp
sk = sk1
server_name=rule1
role = visitor
bind_addr = 127.0.0.1
bind_port = 8001

这是在本地配置了一个最简单的sudp转发,功能使用也一切正常。

但是,两个frpc启动之后,在frpc1中可以看到日志如下:
[I] [proxy.go:597] [XXX] [rule1] incoming a new work connection for sudp proxy, 127.0.0.1:7000
在frps的日志中可以看到
[I] [proxy.go:179] [XXX] [rule1] get a user connection [127.0.0.1:52043]
按道理来说,我就启动了两个客户端,没有使用任何转发功能,不应该有get a user connection这种日志

将sudp改成stcp就没有这个现象,本地windows系统日志可复现,不影响功能使用,但这两条日志看着不舒服
简单看了一下代码没找到问题所在

Originally created by @wyaode on GitHub (Aug 19, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2537 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** <!-- Use ./frpc -v or ./frps -v --> Version:0.37.1 **[REQUIRED] What operating system and processor architecture are you using** OS:Windows CPU architecture:x64 frps用默认配置监听7000 frpc1配置如下: [common] log_file = ./frpc1.log [rule1] type = sudp sk = sk1 local_ip = 127.0.0.1 local_port = 8002 frpc2配置如下: [common] log_file = ./frpc2.log [rule2] type = sudp sk = sk1 server_name=rule1 role = visitor bind_addr = 127.0.0.1 bind_port = 8001 这是在本地配置了一个最简单的sudp转发,功能使用也一切正常。 但是,两个frpc启动之后,在frpc1中可以看到日志如下: [I] [proxy.go:597] [XXX] [rule1] incoming a new work connection for sudp proxy, 127.0.0.1:7000 在frps的日志中可以看到 [I] [proxy.go:179] [XXX] [rule1] get a user connection [127.0.0.1:52043] 按道理来说,我就启动了两个客户端,没有使用任何转发功能,不应该有get a user connection这种日志 将sudp改成stcp就没有这个现象,本地windows系统日志可复现,不影响功能使用,但这两条日志看着不舒服 简单看了一下代码没找到问题所在
gitea-mirror 2026-05-05 13:18:13 -06:00
Author
Owner

@fatedier commented on GitHub (Aug 20, 2021):

UDP 没有连接的概念,为了转发 UDP 请求,会在两边建立一条 TCP 连接用于传输封装的 UDP 数据,这个链接就是用于这个目的,每一个客户端都会有一个这样的连接被建立。

<!-- gh-comment-id:902385882 --> @fatedier commented on GitHub (Aug 20, 2021): UDP 没有连接的概念,为了转发 UDP 请求,会在两边建立一条 TCP 连接用于传输封装的 UDP 数据,这个链接就是用于这个目的,每一个客户端都会有一个这样的连接被建立。
Author
Owner

@wyaode commented on GitHub (Aug 20, 2021):

道理是这么个道理,但是这条日志本身含义不是很明确,建议想办法把这条日志去掉或者换成其他提示

<!-- gh-comment-id:902878994 --> @wyaode commented on GitHub (Aug 20, 2021): 道理是这么个道理,但是这条日志本身含义不是很明确,建议想办法把这条日志去掉或者换成其他提示
Author
Owner

@github-actions[bot] commented on GitHub (Sep 20, 2021):

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

<!-- gh-comment-id:922566296 --> @github-actions[bot] commented on GitHub (Sep 20, 2021): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2014
No description provided.