mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-17 21:59:47 +03:00
Fix
This commit is contained in:
@ -374,12 +374,12 @@ func (w *PacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
|||||||
if w.Handler.config.hasStrategy() && b.UDP.Address.Family().IsDomain() {
|
if w.Handler.config.hasStrategy() && b.UDP.Address.Family().IsDomain() {
|
||||||
if ip := w.resolvedUDPAddr[b.UDP.Address.Domain()]; ip != nil {
|
if ip := w.resolvedUDPAddr[b.UDP.Address.Domain()]; ip != nil {
|
||||||
b.UDP.Address = ip
|
b.UDP.Address = ip
|
||||||
}
|
} else {
|
||||||
} else {
|
ip := w.Handler.resolveIP(w.Context, b.UDP.Address.Domain(), nil)
|
||||||
ip := w.Handler.resolveIP(w.Context, b.UDP.Address.Domain(), nil)
|
if ip != nil {
|
||||||
if ip != nil {
|
b.UDP.Address = ip
|
||||||
b.UDP.Address = ip
|
w.resolvedUDPAddr[b.UDP.Address.Domain()] = ip
|
||||||
w.resolvedUDPAddr[b.UDP.Address.Domain()] = ip
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
destAddr, _ := net.ResolveUDPAddr("udp", b.UDP.NetAddr())
|
destAddr, _ := net.ResolveUDPAddr("udp", b.UDP.NetAddr())
|
||||||
|
Reference in New Issue
Block a user