Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第三方TUIC客户端实现的UDP连通性问题 #4

Open
LittleChest opened this issue Aug 25, 2024 · 35 comments
Open

第三方TUIC客户端实现的UDP连通性问题 #4

LittleChest opened this issue Aug 25, 2024 · 35 comments
Labels
help wanted Extra attention is needed

Comments

@LittleChest
Copy link

LittleChest commented Aug 25, 2024

在使用 udp-relay-mode: quic 时通过 TUIC 代理某些游戏(例如 Minecraft Bedrock)会导致无法连接至服务器,而对于 Hysteria 2 可以通过添加 disablePathMTUDiscovery: true 缓解

请求为 TUIC 添加这个功能

@LittleChest LittleChest changed the title 允许禁用 MTU 探测 允许禁用 QUIC 的 MTU 探测 Aug 25, 2024
@Itsusinn
Copy link
Owner

Itsusinn commented Aug 25, 2024

Could you find the hysteria isssue for me?as a reference.

@LittleChest
Copy link
Author

Could you find the hysteria isssue for me?as a reference.

apernet/hysteria#1178 (comment)

@ghost
Copy link

ghost commented Aug 25, 2024

关的客户端部分吗

@LittleChest
Copy link
Author

关的客户端部分吗

客户端我用的是Clash 没有这个选项 所以我在服务端关的

@ghost
Copy link

ghost commented Aug 25, 2024

我实现一下,你看一下客户端上加有没有用

@Itsusinn
Copy link
Owner

不太清楚禁用自动MTU后MTU是多少

@ghost
Copy link

ghost commented Aug 25, 2024

不太清楚禁用自动MTU后MTU是多少

1200

@ghost
Copy link

ghost commented Aug 25, 2024

https://github.com/Dounutsubtly/tuic/actions/runs/10547371628 (链接已改x2)
你下载试一下,配置是这个:
pub pmtu: bool
设置成false就行了,服务端的配置也搞了

@Itsusinn
Copy link
Owner

基岩版一个包多大 @LittleChest

@ghost
Copy link

ghost commented Aug 25, 2024

搞好了,楼主可以在上面的actions里面下载测试一下

PR 草稿:
#5

@LittleChest
Copy link
Author

基岩版一个包多大 @LittleChest

动态的 常规情况下是1-3KB 加载新区块是8-12KB

@LittleChest
Copy link
Author

搞好了,楼主可以在上面的actions里面下载测试一下

PR 草稿: #5

一会我试试 谢谢

@Itsusinn
Copy link
Owner

tuic client没有tun功能,你是咋代理的mc

@LittleChest
Copy link
Author

tuic client没有tun功能,你是咋代理的mc

客户端我用的是Clash Clash支持TUN

@LittleChest
Copy link
Author

搞好了,楼主可以在上面的actions里面下载测试一下

PR 草稿: #5

关闭pmtu后就可以连接到服务器了 不过交换大数据包时还是会断线
已经试过把 initial_mtu min_mtu 改成1600和800 都不行

@ghost
Copy link

ghost commented Aug 25, 2024

已经试过把 initial_mtu min_mtu 改成1600和800 都不行

mtu 最小是1200,默认值已是最小值,另外再关闭gso,我晚点调试一下

@ghost
Copy link

ghost commented Aug 25, 2024

发现另一个bug,客户端的某些包能把服务端崩掉,有点复杂,睡醒了再处理

@ghost
Copy link

ghost commented Aug 25, 2024

已经试过把 initial_mtu min_mtu 改成1600和800 都不行

mtu 最小是1200,默认值已是最小值,另外再关闭gso

@LittleChest 可以看下关掉GSO和PMTU后是否还是不行,initial_mtumin_mtu 不用调整,根据quinn的文档,默认就是最小值(即最大MTU为1200),无需调整,如果还是出现问题,如果没有其他人提pr的话,我有空的时候看一下

@ghost
Copy link

ghost commented Aug 26, 2024

1
看样子返回的数据包被截断了

@ghost
Copy link

ghost commented Aug 26, 2024

解决了,你把max_external_packet_size设置大一点,15000,这个大小的判断没考虑分片吗,原项目dev分支也存在这个问题,设计有点问题

@Itsusinn
Copy link
Owner

Itsusinn commented Aug 27, 2024

关闭pmtu后就可以连接到服务器了 不过交换大数据包时还是会断线

请尝试 https://github.com/Itsusinn/tuic/releases/tag/latest

@LittleChest
Copy link
Author

仍然在交换大数据包时断线 v1.1.1
已关闭pmtu和gso

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

有没有啥公开的mc美国基岩服务器,我亲自试试

@LittleChest
Copy link
Author

有没有啥公开的mc美国基岩服务器,我亲自试试

打开服务器 有一堆精选服务器
推荐进 CubeCraft 可以用/ping 我的节点进别的服务器会被判定为VPN拒绝连接(

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

1118dd28b1faf14f6a82c12b44d3ce4a

QQ截图20240901142642

并没有什么问题

@LittleChest
Copy link
Author

1118dd28b1faf14f6a82c12b44d3ce4a

QQ截图20240901142642

并没有什么问题

是native模式吗)
native确实没问题 但是切到quic就会在定位服务器时断开

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

quic模式确实有问题

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

好像甚至会导致所有连接中断

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

cbb6b9dc80b869bb07316ce70c3a6ab7

重新使用了tuic-client+tuic-server进行测试,没有问题。看来是clash meta的tuic实现有某种问题

而且udp包的均没有被切片(无论是native或quic)这说明所有udp包的大小均在1.5kb以下

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

撤销了 #8 ,对测试没有影响

@Itsusinn Itsusinn changed the title 允许禁用 QUIC 的 MTU 探测 第三方TUIC客户端实现的UDP连通性问题 Sep 1, 2024
@Itsusinn Itsusinn added help wanted Extra attention is needed and removed wait for reply labels Sep 1, 2024
@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

暂时使用native模式吧,golang的问题我不会修

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

较为反常的是http3的udp没有问题

@LittleChest

This comment was marked as off-topic.

@Itsusinn
Copy link
Owner

Itsusinn commented Sep 1, 2024

我hysteria确实也可以,也不需要改MTU啥的
我是本地起了个tuic-client,它有socks。然后在clash meta里添加socks出站。

@Itsusinn

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants
@Itsusinn @LittleChest and others