mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
XDNS finalmask: Use single UDP socket for multiple resolvers for now (#5982)
https://github.com/XTLS/Xray-core/pull/5982#issuecomment-4302271929 Closes https://github.com/XTLS/Xray-core/pull/5976#issuecomment-4320460288
This commit is contained in:
@@ -80,13 +80,17 @@ func New() *Client {
|
||||
d := &net.Dialer{
|
||||
Timeout: time.Second * 16,
|
||||
Control: func(network, address string, c syscall.RawConn) error {
|
||||
var errs []error
|
||||
for _, ctl := range internet.Controllers {
|
||||
if err := ctl(network, address, c); err != nil {
|
||||
errors.LogInfoInner(context.Background(), err, "failed to apply external controller")
|
||||
return err
|
||||
errs = append(errs, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
err := errors.Combine(errs...)
|
||||
if err != nil {
|
||||
errors.LogInfoInner(context.Background(), err, "failed to apply external controller")
|
||||
}
|
||||
return err
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user