[GH-ISSUE #557] kcp模式端口绑定BUG #433

Closed
opened 2026-05-05 12:15:41 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @RainCrowSP on GitHub (Dec 8, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/557

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

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

What operating system and processor architecture are you using (go env)?
ubuntu 14.04
windows 10 64bit

Configures you used:
服务端配置(frps.ini):
bind_port = 9100
kcp_bind_port = 9101
privilege_token = 654321

客户端配置(frps.ini):
[common]
server_addr = x.x.x.x
server_port = 9100
protocol = kcp
privilege_token = 654321

[vnc]
type = tcp
local_ip = 127.0.0.1
local_port = 5900
remote_port = 5900
use_encryption = true
use_compression = true

Steps to reproduce the issue:
在bind_port 和kcp_bind_port 不一致时(如9100和9101),kcp模式无法连接,
服务端提示:
2017/12/08 12:36:17 [I] [service.go:87] frps tcp listen on 0.0.0.0:9100
2017/12/08 12:36:17 [I] [service.go:96] frps kcp listen on udp 0.0.0.0:9100
2017/12/08 12:36:17 [I] [main.go:112] Start frps success
2017/12/08 12:36:17 [I] [main.go:114] PrivilegeMode is enabled, you should pay more attention to security issues
客户端提示:
2017/12/08 20:40:38 [W] [control.go:483] [f24ba18323dbdd2a] reconnect to server error: i/o timeout

改成相同的端口号后一切正常。

Originally created by @RainCrowSP on GitHub (Dec 8, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/557 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.14.0 **What operating system and processor architecture are you using (`go env`)?** ubuntu 14.04 windows 10 64bit **Configures you used:** 服务端配置(frps.ini): bind_port = 9100 kcp_bind_port = 9101 privilege_token = 654321 客户端配置(frps.ini): [common] server_addr = x.x.x.x server_port = 9100 protocol = kcp privilege_token = 654321 [vnc] type = tcp local_ip = 127.0.0.1 local_port = 5900 remote_port = 5900 use_encryption = true use_compression = true **Steps to reproduce the issue:** 在bind_port 和kcp_bind_port 不一致时(如9100和9101),kcp模式无法连接, 服务端提示: 2017/12/08 12:36:17 [I] [service.go:87] frps tcp listen on 0.0.0.0:9100 2017/12/08 12:36:17 [I] [service.go:96] frps kcp listen on udp 0.0.0.0:9100 2017/12/08 12:36:17 [I] [main.go:112] Start frps success 2017/12/08 12:36:17 [I] [main.go:114] PrivilegeMode is enabled, you should pay more attention to security issues 客户端提示: 2017/12/08 20:40:38 [W] [control.go:483] [f24ba18323dbdd2a] reconnect to server error: i/o timeout 改成相同的端口号后一切正常。
gitea-mirror 2026-05-05 12:15:41 -06:00
  • closed this issue
  • added the
    easy
    label
Author
Owner

@fatedier commented on GitHub (Dec 9, 2017):

客户端 protocol = kcp 时,server_port 填写服务端 kcp_bind_port 的地址。

<!-- gh-comment-id:350470025 --> @fatedier commented on GitHub (Dec 9, 2017): 客户端 `protocol = kcp` 时,server_port 填写服务端 kcp_bind_port 的地址。
Author
Owner

@RainCrowSP commented on GitHub (Dec 10, 2017):

感谢指点,但是服务器端输出还是有问题,即使指定了不同的端口,输出里看到的都是tcp端口号。
比如我设置bind_port = 9100;kcp_bind_port = 9101,但是frps运行的输出是2017/12/08 12:36:17 [I] [service.go:87] frps tcp listen on 0.0.0.0:9100
2017/12/08 12:36:17 [I] [service.go:96] frps kcp listen on udp 0.0.0.0:9100

<!-- gh-comment-id:350532365 --> @RainCrowSP commented on GitHub (Dec 10, 2017): 感谢指点,但是服务器端输出还是有问题,即使指定了不同的端口,输出里看到的都是tcp端口号。 比如我设置bind_port = 9100;kcp_bind_port = 9101,但是frps运行的输出是2017/12/08 12:36:17 [I] [service.go:87] frps tcp listen on 0.0.0.0:9100 2017/12/08 12:36:17 [I] [service.go:96] frps kcp listen on udp 0.0.0.0:9100
Author
Owner

@fatedier commented on GitHub (Dec 10, 2017):

打印错误,实际使用的是你配置的地址,这个下个版本修改下。

<!-- gh-comment-id:350564510 --> @fatedier commented on GitHub (Dec 10, 2017): 打印错误,实际使用的是你配置的地址,这个下个版本修改下。
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#433
No description provided.