[GH-ISSUE #910] 使用 Frp 映射 UDP 协议的游戏无法连接 #722

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

Originally created by @kasuganosoras on GitHub (Aug 31, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/910

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.17.0

What operating system and processor architecture are you using (go env)?
映射客户端:Windows 10
映射服务器:CentOS 7.5
外部链接设备:Android 手机(手机游戏)

Configures you used:
[Sakura_Minecraft_PE]
privilege_mode = true
type = udp
local_ip = 127.0.0.1
local_port = 19132
remote_port = 19132

Steps to reproduce the issue:
1.新建一个 UDP 映射,local_port 19132
2.在本地 19132 端口运行一个 Minecraft PE 游戏服务器
3.局域网可以连接成功,通过映射后无法连接

Describe the results you received:
Minecraft PE 是一个手机游戏,可以运行自己的服务器,基于 UDP 协议。
在同一局域网下可以正常连接局域网IP地址进入游戏,但是通过转发后,只能获得服务器列表的状态信息(在线人数,服务器简介,服务器Logo),但是无法进入游戏,一进去就提示断开连接,Frpc 无任何错误输出。

Describe the results you expected:
能够正常进入游戏,像 TCP 一样。

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @kasuganosoras on GitHub (Aug 31, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/910 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.17.0 **What operating system and processor architecture are you using (`go env`)?** 映射客户端:Windows 10 映射服务器:CentOS 7.5 外部链接设备:Android 手机(手机游戏) **Configures you used:** [Sakura_Minecraft_PE] privilege_mode = true type = udp local_ip = 127.0.0.1 local_port = 19132 remote_port = 19132 **Steps to reproduce the issue:** 1.新建一个 UDP 映射,local_port 19132 2.在本地 19132 端口运行一个 Minecraft PE 游戏服务器 3.局域网可以连接成功,通过映射后无法连接 **Describe the results you received:** Minecraft PE 是一个手机游戏,可以运行自己的服务器,基于 UDP 协议。 在同一局域网下可以正常连接局域网IP地址进入游戏,但是通过转发后,只能获得服务器列表的状态信息(在线人数,服务器简介,服务器Logo),但是无法进入游戏,一进去就提示断开连接,Frpc 无任何错误输出。 **Describe the results you expected:** 能够正常进入游戏,像 TCP 一样。 **Additional information you deem important (e.g. issue happens only occasionally):** 无 **Can you point out what caused this issue (optional)** 无
Author
Owner

@Flyky commented on GitHub (Dec 7, 2018):

我也遇到了,配置除了端口其他和你是一样的,netstat之后我发现的是服务端映射过的变成了udp6,是ipv6的udp
问题应该是出在ipv6,毕竟局域网内和我服务器直接开服都是正常的ipv4的udp肯定是能正常连接的,不过服务器的ipv6我已经禁用了,不知道什么原因转发出去变成了udp6,
我不知道你遇到的是不是和我一样的情况
udp6 0 0 [::]:19131 [::]:*

<!-- gh-comment-id:445343353 --> @Flyky commented on GitHub (Dec 7, 2018): 我也遇到了,配置除了端口其他和你是一样的,netstat之后我发现的是服务端映射过的变成了udp6,是ipv6的udp 问题应该是出在ipv6,毕竟局域网内和我服务器直接开服都是正常的ipv4的udp肯定是能正常连接的,不过服务器的ipv6我已经禁用了,不知道什么原因转发出去变成了udp6, 我不知道你遇到的是不是和我一样的情况 udp6 0 0 [::]:19131 [::]:*
Author
Owner

@deadlineOvO commented on GitHub (Jan 4, 2019):

咨询一下,我现在也想整一个mcpe服务器,有没有什么方法能让tcp与udp用同一个端口?

<!-- gh-comment-id:451448450 --> @deadlineOvO commented on GitHub (Jan 4, 2019): 咨询一下,我现在也想整一个mcpe服务器,有没有什么方法能让tcp与udp用同一个端口?
Author
Owner

@xzfgroup commented on GitHub (Feb 7, 2021):

mcpe会校验端口号 客户端会把欲连接的服务端的端口发给服务端 然后服务端会对比其监听的端口并决定是否接受连接

<!-- gh-comment-id:774651305 --> @xzfgroup commented on GitHub (Feb 7, 2021): mcpe会校验端口号 客户端会把欲连接的服务端的端口发给服务端 然后服务端会对比其监听的端口并决定是否接受连接
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#722
No description provided.