修复屏蔽协议引发的udp不通问题

This commit is contained in:
qaq
2025-10-30 16:15:04 +08:00
parent 5387b09dfe
commit b587193e74
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func (r *Router) Dial(ctx context.Context, network, address string) (conn net.Co
}
if network == "udp" || network == "udp4" || network == "udp6" {
if _, ok := conn.(net.PacketConn); !ok {
if _, ok := conn.(net.PacketConn); !ok && conn.RemoteAddr().Network() != "udp" {
return &packetConn{conn}, nil
}
}