Hysteria: Fix transport's "udphop without salamander" dialing issue; Require "version": 2 in outbound's settings as well (#5537)

Updated example: https://github.com/XTLS/Xray-core/pull/5508#issue-3795798712
This commit is contained in:
LjhAUMEM
2026-01-14 18:42:07 +08:00
committed by GitHub
parent 0443de7798
commit 649e989fa2
5 changed files with 31 additions and 7 deletions
+8
View File
@@ -195,6 +195,14 @@ func (c *PacketConnWrapper) SetWriteDeadline(t time.Time) error {
return c.Conn.SetWriteDeadline(t)
}
func (c *PacketConnWrapper) SyscallConn() (syscall.RawConn, error) {
sc, ok := c.Conn.(syscall.Conn)
if !ok {
return nil, syscall.EINVAL
}
return sc.SyscallConn()
}
type SystemDialerAdapter interface {
Dial(network string, address string) (net.Conn, error)
}