mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-13 12:34:00 +08:00
Chore: explicit resolver
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
package dialer
|
package dns
|
||||||
|
|
||||||
import "net"
|
import (
|
||||||
|
"net"
|
||||||
|
|
||||||
|
"github.com/xjasonlyu/tun2socks/v2/component/dialer"
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// We must use this DialContext to query DNS
|
// We must use this DialContext to query DNS
|
||||||
// when using net default resolver.
|
// when using net default resolver.
|
||||||
net.DefaultResolver.PreferGo = true
|
net.DefaultResolver.PreferGo = true
|
||||||
net.DefaultResolver.Dial = DialContext
|
net.DefaultResolver.Dial = dialer.DialContext
|
||||||
}
|
}
|
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/xjasonlyu/tun2socks/v2/component/dialer"
|
"github.com/xjasonlyu/tun2socks/v2/component/dialer"
|
||||||
"github.com/xjasonlyu/tun2socks/v2/core/device"
|
"github.com/xjasonlyu/tun2socks/v2/core/device"
|
||||||
"github.com/xjasonlyu/tun2socks/v2/core/stack"
|
"github.com/xjasonlyu/tun2socks/v2/core/stack"
|
||||||
|
_ "github.com/xjasonlyu/tun2socks/v2/dns"
|
||||||
"github.com/xjasonlyu/tun2socks/v2/log"
|
"github.com/xjasonlyu/tun2socks/v2/log"
|
||||||
"github.com/xjasonlyu/tun2socks/v2/proxy"
|
"github.com/xjasonlyu/tun2socks/v2/proxy"
|
||||||
"github.com/xjasonlyu/tun2socks/v2/stats"
|
"github.com/xjasonlyu/tun2socks/v2/stats"
|
||||||
|
Reference in New Issue
Block a user