From c2242516a8c223c9ae849bb7c9a0863f6fc53eb5 Mon Sep 17 00:00:00 2001 From: Hiddify <114227601+hiddify-com@users.noreply.github.com> Date: Fri, 12 Jul 2024 23:32:08 +0200 Subject: [PATCH] chg: local sites now use direct dns server for routing --- config/config.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 855762a..5ee6c4c 100644 --- a/config/config.go +++ b/config/config.go @@ -394,7 +394,19 @@ func BuildConfig(opt ConfigOptions, input option.Options) (*option.Options, erro } fmt.Println("Region==========================", opt.Region) if opt.Region != "other" { - + options.DNS.Rules = append( + options.DNS.Rules, + option.DNSRule{ + Type: C.RuleTypeDefault, + DefaultOptions: option.DefaultDNSRule{ + RuleSet: []string{ + "geoip-" + opt.Region, + "geosite-" + opt.Region, + }, + Server: DNSDirectTag, + }, + }, + ) options.Route.RuleSet = append(options.Route.RuleSet, option.RuleSet{ Type: C.RuleSetTypeRemote, Tag: "geoip-" + opt.Region,