Zxneric

Results 19 comments of Zxneric

Can you cherry-pick your commit to latest branch? Seems the author force-push so many times and have no way to review it.

有两个主要错误 第一个是 https://github.com/SagerNet/sing-quic/blob/619122b4c233d46dd1e2c3262df303e8a9adf6d1/hysteria2/packet.go#L87 fragUDPMessage 的 maxPacketSize 只传入过 udpMtu 或者 quic-go 抛出的 max frame size,因此比较时,应该减去 headerSize 第二个是 https://github.com/SagerNet/sing-quic/blob/619122b4c233d46dd1e2c3262df303e8a9adf6d1/hysteria2/packet.go#L210 `tooLargeErr.PeerMaxDatagramFrameSize` 不能正确反映可用的空间,正确的值应该是 `*DatagramFrame.MaxDataLen` 返回的值。在当前版本下,可以直接 -3

应用了以上两个修复后,确认hysteria2下的udp工作正常

关于第二点,hysteria 官方实现选择在fork中暴露内部的可用 buf 大小 https://github.com/apernet/quic-go/blob/fef64abc6b78d476489718256f19e3d871f0707f/connection.go#L2368-L2373

https://github.com/SagerNet/sing-quic/blob/6be1f3c03ae882d544677f1cc0f43297e4afa6b1/hysteria2/packet.go#L364-L370 如果有两个分段数相同,会导致缓存污染

> > 关于第二点,hysteria 官方实现选择在fork中暴露内部的可用 buf 大小 > > https://github.com/apernet/quic-go/blob/fef64abc6b78d476489718256f19e3d871f0707f/connection.go#L2368-L2373 > > This seems to come from quic-go rather than hysteria, which is a fixed value. it did came from quic-go,...

something still confused me in the hysteria2 outbound is dtls hanshake cannot be finished. Client Hello -> Hello Verify -> Client Hello, then the Server Hello always be dropped. It...

After apply the patch in SagerNet/sing-quic#8, I confirmed the udp works corretly if the packet length less than 1390. Still needs the further work on this. server.py ```python import socket...