Skip to content

Commit 53d9ad9

Browse files
committed
Improve DNS log
1 parent f5c5570 commit 53d9ad9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/sagernet/cloudflare-tls v0.0.0-20221031050923-d70792f4c3a0
2525
github.com/sagernet/quic-go v0.0.0-20221206044826-d15273f58d82
2626
github.com/sagernet/sing v0.1.2-0.20221226041200-d8c779c030ba
27-
github.com/sagernet/sing-dns v0.1.1-0.20221219051000-4eff25693772
27+
github.com/sagernet/sing-dns v0.1.1-0.20230103023532-65d2a9affde4
2828
github.com/sagernet/sing-shadowsocks v0.1.0
2929
github.com/sagernet/sing-tun v0.1.1-0.20221128044455-b22d9eb41b74
3030
github.com/sagernet/sing-vmess v0.1.1-0.20221206050106-bcacd436d74c

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ github.com/sagernet/sing v0.0.0-20220812082120-05f9836bff8f/go.mod h1:QVsS5L/ZA2
152152
github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY=
153153
github.com/sagernet/sing v0.1.2-0.20221226041200-d8c779c030ba h1:5HEoylnFXFO7CuJGzJaK7PzOdVT5DKmqZash6H5a1b0=
154154
github.com/sagernet/sing v0.1.2-0.20221226041200-d8c779c030ba/go.mod h1:bvmen56QnVbMrWy+nr5nsbz7U5MUPuY0L0S/XfhCsTs=
155-
github.com/sagernet/sing-dns v0.1.1-0.20221219051000-4eff25693772 h1:S68UdEI7911P868k6pualoxqK8lwQjdx6Xt00ybsVLA=
156-
github.com/sagernet/sing-dns v0.1.1-0.20221219051000-4eff25693772/go.mod h1:IXw6t1F25YvzmgCgV2kKySf4XCEKkUJnmLvKCd7jFEc=
155+
github.com/sagernet/sing-dns v0.1.1-0.20230103023532-65d2a9affde4 h1:W71h5uJacalWG504OIttwItBcg0XdsfLqC14awAjsZ0=
156+
github.com/sagernet/sing-dns v0.1.1-0.20230103023532-65d2a9affde4/go.mod h1:IXw6t1F25YvzmgCgV2kKySf4XCEKkUJnmLvKCd7jFEc=
157157
github.com/sagernet/sing-shadowsocks v0.1.0 h1:cDmmOkA11fzVdhyCZQEeI3ozQz+59rj8+rqPb91xux4=
158158
github.com/sagernet/sing-shadowsocks v0.1.0/go.mod h1:O5LtOs8Ivw686FqLpO0Zu+A0ROVE15VeqEK3yDRRAms=
159159
github.com/sagernet/sing-tun v0.1.1-0.20221128044455-b22d9eb41b74 h1:T6U4VNWwxQjr80I6RcQA1lTrWgwQ0vMq1UsnlzeqgxI=

route/router.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ func NewRouter(ctx context.Context, logFactory log.Factory, options option.Route
123123
geositeOptions: common.PtrValueOrDefault(options.Geosite),
124124
geositeCache: make(map[string]adapter.Rule),
125125
defaultDetour: options.Final,
126-
dnsClient: dns.NewClient(dnsOptions.DNSClientOptions.DisableCache, dnsOptions.DNSClientOptions.DisableExpire),
127126
defaultDomainStrategy: dns.DomainStrategy(dnsOptions.Strategy),
128127
autoDetectInterface: options.AutoDetectInterface,
129128
defaultInterface: options.DefaultInterface,
130129
defaultMark: options.DefaultMark,
131130
}
131+
router.dnsClient = dns.NewClient(dnsOptions.DNSClientOptions.DisableCache, dnsOptions.DNSClientOptions.DisableExpire, router.dnsLogger)
132132
for i, ruleOptions := range options.Rules {
133133
routeRule, err := NewRule(router, router.logger, ruleOptions)
134134
if err != nil {

0 commit comments

Comments
 (0)