From 5715ae8c5f9efc003611bbafae0ad11ae4ef64b8 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sat, 28 Jan 2023 00:19:58 +0800 Subject: [PATCH] chore: adjust keyword for geosite-based nameserver policy --- dns/resolver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dns/resolver.go b/dns/resolver.go index 65bcd6d3..8784dd78 100644 --- a/dns/resolver.go +++ b/dns/resolver.go @@ -449,8 +449,8 @@ func NewResolver(config Config) *Resolver { if len(config.Policy) != 0 { r.policy = trie.New[*Policy]() for domain, nameserver := range config.Policy { - if strings.HasPrefix(strings.ToLower(domain), "@geosite:") { - groupname := domain[9:] + if strings.HasPrefix(strings.ToLower(domain), "geosite:") { + groupname := domain[8:] inverse := false if strings.HasPrefix(groupname, "!") { inverse = true