Fix DNS server offset

This commit is contained in:
世界 2024-12-31 15:58:53 +08:00
parent c2ada999ac
commit f5578d425d
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -36,7 +36,6 @@ func (t *Template) renderDNS(metadata M.Metadata, options *option.Options) error
domainStrategyLocal = 0
}
options.DNS = &option.DNSOptions{
Servers: t.Servers,
ReverseMapping: !t.DisableTrafficBypass && metadata.Platform != M.PlatformUnknown && !metadata.Platform.IsApple(),
DNSClientOptions: option.DNSClientOptions{
Strategy: domainStrategy,
@ -110,6 +109,7 @@ func (t *Template) renderDNS(metadata M.Metadata, options *option.Options) error
Address: "fakeip",
})
}
options.DNS.Servers = append(options.DNS.Servers, t.Servers...)
options.DNS.Rules = []option.DNSRule{
{
Type: C.RuleTypeDefault,