mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-02 11:49:48 +00:00
Fix connecting to quic outbound with domain address
This commit is contained in:
parent
b0bf0d7fd5
commit
eacdda3c93
@ -208,6 +208,14 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
|||||||
IP: dest.Address.IP(),
|
IP: dest.Address.IP(),
|
||||||
Port: int(dest.Port),
|
Port: int(dest.Port),
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dialerIp := internet.DestIpAddress()
|
||||||
|
if dialerIp != nil {
|
||||||
|
destAddr = &net.UDPAddr{
|
||||||
|
IP: dialerIp,
|
||||||
|
Port: int(dest.Port),
|
||||||
|
}
|
||||||
|
newError("quic Dial use dialer dest addr: ", destAddr).WriteToLog()
|
||||||
} else {
|
} else {
|
||||||
addr, err := net.ResolveUDPAddr("udp", dest.NetAddr())
|
addr, err := net.ResolveUDPAddr("udp", dest.NetAddr())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -215,6 +223,7 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
|||||||
}
|
}
|
||||||
destAddr = addr
|
destAddr = addr
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
config := streamSettings.ProtocolSettings.(*Config)
|
config := streamSettings.ProtocolSettings.(*Config)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user