From 90a94a8c63c4df9df1c876cea8f95f97166bb38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 29 Oct 2022 17:37:11 +0800 Subject: [PATCH] Improve local dns transport --- go.mod | 2 +- go.sum | 4 ++-- route/router.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 7f8aec62..bb6e0ab4 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/refraction-networking/utls v1.1.5 github.com/sagernet/quic-go v0.0.0-20220818150011-de611ab3e2bb github.com/sagernet/sing v0.0.0-20221008120626-60a9910eefe4 - github.com/sagernet/sing-dns v0.0.0-20221020030320-4c4e9d98314b + github.com/sagernet/sing-dns v0.0.0-20221029093630-568471e6216d github.com/sagernet/sing-shadowsocks v0.0.0-20220819002358-7461bb09a8f6 github.com/sagernet/sing-tun v0.0.0-20221028015259-ea5c35f62f07 github.com/sagernet/sing-vmess v0.0.0-20220925083655-063bc85ea685 diff --git a/go.sum b/go.sum index 31da751a..722be750 100644 --- a/go.sum +++ b/go.sum @@ -147,8 +147,8 @@ github.com/sagernet/sing v0.0.0-20220812082120-05f9836bff8f/go.mod h1:QVsS5L/ZA2 github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY= github.com/sagernet/sing v0.0.0-20221008120626-60a9910eefe4 h1:LO7xMvMGhYmjQg2vjhTzsODyzs9/WLYu5Per+/8jIeo= github.com/sagernet/sing v0.0.0-20221008120626-60a9910eefe4/go.mod h1:zvgDYKI+vCAW9RyfyrKTgleI+DOa8lzHMPC7VZo3OL4= -github.com/sagernet/sing-dns v0.0.0-20221020030320-4c4e9d98314b h1:GFAf2Cr/PRyF+u1ppgt3OWtxbpQYlW31Ij5yNK5EwWM= -github.com/sagernet/sing-dns v0.0.0-20221020030320-4c4e9d98314b/go.mod h1:SrvWLfOSlnFmH32CWXicfilAGgIXR0VjrH6yRbuXYww= +github.com/sagernet/sing-dns v0.0.0-20221029093630-568471e6216d h1:U/oM43D++tdv2r9OfHbcd4Q1pMCs8+HW7hPkAD2rrvk= +github.com/sagernet/sing-dns v0.0.0-20221029093630-568471e6216d/go.mod h1:SrvWLfOSlnFmH32CWXicfilAGgIXR0VjrH6yRbuXYww= github.com/sagernet/sing-shadowsocks v0.0.0-20220819002358-7461bb09a8f6 h1:JJfDeYYhWunvtxsU/mOVNTmFQmnzGx9dY034qG6G3g4= github.com/sagernet/sing-shadowsocks v0.0.0-20220819002358-7461bb09a8f6/go.mod h1:EX3RbZvrwAkPI2nuGa78T2iQXmrkT+/VQtskjou42xM= github.com/sagernet/sing-tun v0.0.0-20221028015259-ea5c35f62f07 h1:zupkkVVFWv0QsLPjxEzlzXlLfDk1hUujK8ctJSIKFCI= diff --git a/route/router.go b/route/router.go index 4cc725a7..cd401706 100644 --- a/route/router.go +++ b/route/router.go @@ -234,7 +234,7 @@ func NewRouter(ctx context.Context, logger log.ContextLogger, dnsLogger log.Cont } if defaultTransport == nil { if len(transports) == 0 { - transports = append(transports, &dns.LocalTransport{}) + transports = append(transports, dns.NewLocalTransport(dialer.NewRouter(router))) } defaultTransport = transports[0] }