mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 01:33:15 +08:00
15 lines
270 B
Go
15 lines
270 B
Go
package dns
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/xjasonlyu/tun2socks/v2/component/dialer"
|
|
)
|
|
|
|
func init() {
|
|
// We must use this DialContext to query DNS
|
|
// when using net default resolver.
|
|
net.DefaultResolver.PreferGo = true
|
|
net.DefaultResolver.Dial = dialer.DialContext
|
|
}
|