Add independent dns cache option

This commit is contained in:
problematicconsumer
2023-11-14 19:11:32 +03:30
parent 7eadcc5a65
commit 89ecc6bf12

View File

@@ -36,6 +36,7 @@ type ConfigOptions struct {
SetSystemProxy bool `json:"set-system-proxy"`
BypassLAN bool `json:"bypass-lan"`
EnableFakeDNS bool `json:"enable-fake-dns"`
IndependentDNSCache bool `json:"independent-dns-cache"`
Rules []Rule `json:"rules"`
}
@@ -84,7 +85,7 @@ func BuildConfig(configOpt ConfigOptions, input option.Options) option.Options {
options.DNS = &option.DNSOptions{
DNSClientOptions: option.DNSClientOptions{
IndependentCache: true,
IndependentCache: configOpt.IndependentDNSCache,
},
Servers: []option.DNSServerOptions{
{