mirror of https://github.com/2dust/v2rayN
rename DNSItem to SimpleDNSItem
parent
8405f7db6d
commit
4303997977
|
@ -63,7 +63,6 @@ public sealed class AppHandler
|
||||||
SQLiteHelper.Instance.CreateTable<ServerStatItem>();
|
SQLiteHelper.Instance.CreateTable<ServerStatItem>();
|
||||||
SQLiteHelper.Instance.CreateTable<RoutingItem>();
|
SQLiteHelper.Instance.CreateTable<RoutingItem>();
|
||||||
SQLiteHelper.Instance.CreateTable<ProfileExItem>();
|
SQLiteHelper.Instance.CreateTable<ProfileExItem>();
|
||||||
SQLiteHelper.Instance.CreateTable<DNSItem>();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class ConfigHandler
|
||||||
|
|
||||||
config.ConstItem ??= new ConstItem();
|
config.ConstItem ??= new ConstItem();
|
||||||
|
|
||||||
config.DNSItem ??= new DNSItem()
|
config.SimpleDNSItem ??= new SimpleDNSItem()
|
||||||
{
|
{
|
||||||
UseSystemHosts = false,
|
UseSystemHosts = false,
|
||||||
AddCommonHosts = true,
|
AddCommonHosts = true,
|
||||||
|
@ -2118,7 +2118,7 @@ public class ConfigHandler
|
||||||
config.ConstItem.SrsSourceUrl = "";
|
config.ConstItem.SrsSourceUrl = "";
|
||||||
config.ConstItem.RouteRulesTemplateSourceUrl = "";
|
config.ConstItem.RouteRulesTemplateSourceUrl = "";
|
||||||
|
|
||||||
await SQLiteHelper.Instance.DeleteAllAsync<DNSItem>();
|
//await SQLiteHelper.Instance.DeleteAllAsync<SimpleDNSItem>();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class Config
|
||||||
public List<InItem> Inbound { get; set; }
|
public List<InItem> Inbound { get; set; }
|
||||||
public List<KeyEventItem> GlobalHotkeys { get; set; }
|
public List<KeyEventItem> GlobalHotkeys { get; set; }
|
||||||
public List<CoreTypeItem> CoreTypeItem { get; set; }
|
public List<CoreTypeItem> CoreTypeItem { get; set; }
|
||||||
public DNSItem DNSItem { get; set; }
|
public SimpleDNSItem SimpleDNSItem { get; set; }
|
||||||
|
|
||||||
#endregion other entities
|
#endregion other entities
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ public class WindowSizeItem
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class DNSItem
|
public class SimpleDNSItem
|
||||||
{
|
{
|
||||||
public bool? UseSystemHosts { get; set; }
|
public bool? UseSystemHosts { get; set; }
|
||||||
public bool? AddCommonHosts { get; set; }
|
public bool? AddCommonHosts { get; set; }
|
||||||
|
|
|
@ -245,7 +245,7 @@ public class CoreConfigSingboxService
|
||||||
singboxConfig.route.rules.Add(rule);
|
singboxConfig.route.rules.Add(rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
await GenDnsDomains(singboxConfig, _config.DNSItem);
|
await GenDnsDomains(singboxConfig, _config.SimpleDNSItem);
|
||||||
//var dnsServer = singboxConfig.dns?.servers.FirstOrDefault();
|
//var dnsServer = singboxConfig.dns?.servers.FirstOrDefault();
|
||||||
//if (dnsServer != null)
|
//if (dnsServer != null)
|
||||||
//{
|
//{
|
||||||
|
@ -317,7 +317,7 @@ public class CoreConfigSingboxService
|
||||||
await GenOutbound(node, singboxConfig.outbounds.First());
|
await GenOutbound(node, singboxConfig.outbounds.First());
|
||||||
}
|
}
|
||||||
await GenMoreOutbounds(node, singboxConfig);
|
await GenMoreOutbounds(node, singboxConfig);
|
||||||
await GenDnsDomains(singboxConfig, _config.DNSItem);
|
await GenDnsDomains(singboxConfig, _config.SimpleDNSItem);
|
||||||
|
|
||||||
singboxConfig.route.rules.Clear();
|
singboxConfig.route.rules.Clear();
|
||||||
singboxConfig.inbounds.Clear();
|
singboxConfig.inbounds.Clear();
|
||||||
|
@ -1225,7 +1225,7 @@ public class CoreConfigSingboxService
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
singboxConfig.route.final = Global.ProxyTag;
|
singboxConfig.route.final = Global.ProxyTag;
|
||||||
var item = _config.DNSItem;
|
var item = _config.SimpleDNSItem;
|
||||||
singboxConfig.route.default_domain_resolver = new()
|
singboxConfig.route.default_domain_resolver = new()
|
||||||
{
|
{
|
||||||
server = "outbound_resolver",
|
server = "outbound_resolver",
|
||||||
|
@ -1575,9 +1575,9 @@ public class CoreConfigSingboxService
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var dNSItem = _config.DNSItem;
|
var simpleDNSItem = _config.SimpleDNSItem;
|
||||||
await GenDnsServers(singboxConfig, dNSItem);
|
await GenDnsServers(singboxConfig, simpleDNSItem);
|
||||||
await GenDnsRules(singboxConfig, dNSItem);
|
await GenDnsRules(singboxConfig, simpleDNSItem);
|
||||||
|
|
||||||
singboxConfig.dns ??= new Dns4Sbox();
|
singboxConfig.dns ??= new Dns4Sbox();
|
||||||
singboxConfig.dns.independent_cache = true;
|
singboxConfig.dns.independent_cache = true;
|
||||||
|
@ -1590,20 +1590,20 @@ public class CoreConfigSingboxService
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<int> GenDnsServers(SingboxConfig singboxConfig, DNSItem dNSItem)
|
private async Task<int> GenDnsServers(SingboxConfig singboxConfig, SimpleDNSItem simpleDNSItem)
|
||||||
{
|
{
|
||||||
var finalDns = await GenDnsDomains(singboxConfig, dNSItem);
|
var finalDns = await GenDnsDomains(singboxConfig, simpleDNSItem);
|
||||||
|
|
||||||
var directDns = ParseDnsAddress(dNSItem.DirectDNS);
|
var directDns = ParseDnsAddress(simpleDNSItem.DirectDNS);
|
||||||
directDns.tag = "dns_direct";
|
directDns.tag = "dns_direct";
|
||||||
directDns.domain_resolver = "final_resolver";
|
directDns.domain_resolver = "final_resolver";
|
||||||
|
|
||||||
var remoteDns = ParseDnsAddress(dNSItem.RemoteDNS);
|
var remoteDns = ParseDnsAddress(simpleDNSItem.RemoteDNS);
|
||||||
remoteDns.tag = "dns_remote";
|
remoteDns.tag = "dns_remote";
|
||||||
remoteDns.detour = Global.ProxyTag;
|
remoteDns.detour = Global.ProxyTag;
|
||||||
remoteDns.domain_resolver = "final_resolver";
|
remoteDns.domain_resolver = "final_resolver";
|
||||||
|
|
||||||
var resolverDns = ParseDnsAddress(dNSItem.SingboxOutboundsResolveDNS);
|
var resolverDns = ParseDnsAddress(simpleDNSItem.SingboxOutboundsResolveDNS);
|
||||||
resolverDns.tag = "outbound_resolver";
|
resolverDns.tag = "outbound_resolver";
|
||||||
resolverDns.domain_resolver = "final_resolver";
|
resolverDns.domain_resolver = "final_resolver";
|
||||||
|
|
||||||
|
@ -1612,11 +1612,11 @@ public class CoreConfigSingboxService
|
||||||
tag = "dns_hosts",
|
tag = "dns_hosts",
|
||||||
type = "hosts",
|
type = "hosts",
|
||||||
};
|
};
|
||||||
if (dNSItem.AddCommonHosts == true)
|
if (simpleDNSItem.AddCommonHosts == true)
|
||||||
{
|
{
|
||||||
hostsDns.predefined = Global.PredefinedHosts;
|
hostsDns.predefined = Global.PredefinedHosts;
|
||||||
}
|
}
|
||||||
var userHostsMap = dNSItem.Hosts?
|
var userHostsMap = simpleDNSItem.Hosts?
|
||||||
.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
|
.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Where(line => !string.IsNullOrWhiteSpace(line))
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
||||||
.Where(line => line.Contains(' '))
|
.Where(line => line.Contains(' '))
|
||||||
|
@ -1670,7 +1670,7 @@ public class CoreConfigSingboxService
|
||||||
singboxConfig.dns.servers.Add(hostsDns);
|
singboxConfig.dns.servers.Add(hostsDns);
|
||||||
|
|
||||||
// fake ip
|
// fake ip
|
||||||
if (dNSItem.FakeIP == true)
|
if (simpleDNSItem.FakeIP == true)
|
||||||
{
|
{
|
||||||
var fakeip = new Server4Sbox
|
var fakeip = new Server4Sbox
|
||||||
{
|
{
|
||||||
|
@ -1685,9 +1685,9 @@ public class CoreConfigSingboxService
|
||||||
return await Task.FromResult(0);
|
return await Task.FromResult(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Server4Sbox> GenDnsDomains(SingboxConfig singboxConfig, DNSItem? dNSItem)
|
private async Task<Server4Sbox> GenDnsDomains(SingboxConfig singboxConfig, SimpleDNSItem? simpleDNSItem)
|
||||||
{
|
{
|
||||||
var finalDns = ParseDnsAddress(dNSItem.SingboxFinalResolveDNS);
|
var finalDns = ParseDnsAddress(simpleDNSItem.SingboxFinalResolveDNS);
|
||||||
finalDns.tag = "final_resolver";
|
finalDns.tag = "final_resolver";
|
||||||
singboxConfig.dns ??= new Dns4Sbox();
|
singboxConfig.dns ??= new Dns4Sbox();
|
||||||
singboxConfig.dns.servers ??= new List<Server4Sbox>();
|
singboxConfig.dns.servers ??= new List<Server4Sbox>();
|
||||||
|
@ -1695,7 +1695,7 @@ public class CoreConfigSingboxService
|
||||||
return await Task.FromResult(finalDns);
|
return await Task.FromResult(finalDns);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<int> GenDnsRules(SingboxConfig singboxConfig, DNSItem dNSItem)
|
private async Task<int> GenDnsRules(SingboxConfig singboxConfig, SimpleDNSItem simpleDNSItem)
|
||||||
{
|
{
|
||||||
singboxConfig.dns ??= new Dns4Sbox();
|
singboxConfig.dns ??= new Dns4Sbox();
|
||||||
singboxConfig.dns.rules ??= new List<Rule4Sbox>();
|
singboxConfig.dns.rules ??= new List<Rule4Sbox>();
|
||||||
|
@ -1706,13 +1706,13 @@ public class CoreConfigSingboxService
|
||||||
new Rule4Sbox
|
new Rule4Sbox
|
||||||
{
|
{
|
||||||
server = "dns_remote",
|
server = "dns_remote",
|
||||||
strategy = string.IsNullOrEmpty(dNSItem.SingboxStrategy4Proxy) ? null : dNSItem.SingboxStrategy4Proxy,
|
strategy = simpleDNSItem.SingboxStrategy4Proxy.IsNullOrEmpty() ? null : simpleDNSItem.SingboxStrategy4Proxy,
|
||||||
clash_mode = ERuleMode.Global.ToString()
|
clash_mode = ERuleMode.Global.ToString()
|
||||||
},
|
},
|
||||||
new Rule4Sbox
|
new Rule4Sbox
|
||||||
{
|
{
|
||||||
server = "dns_direct",
|
server = "dns_direct",
|
||||||
strategy = string.IsNullOrEmpty(dNSItem.SingboxStrategy4Direct) ? null : dNSItem.SingboxStrategy4Direct,
|
strategy = simpleDNSItem.SingboxStrategy4Direct.IsNullOrEmpty() ? null : simpleDNSItem.SingboxStrategy4Direct,
|
||||||
clash_mode = ERuleMode.Direct.ToString()
|
clash_mode = ERuleMode.Direct.ToString()
|
||||||
},
|
},
|
||||||
new Rule4Sbox
|
new Rule4Sbox
|
||||||
|
@ -1732,9 +1732,9 @@ public class CoreConfigSingboxService
|
||||||
var expectedIPsRegions = new List<string>();
|
var expectedIPsRegions = new List<string>();
|
||||||
var regionNames = new HashSet<string>();
|
var regionNames = new HashSet<string>();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(dNSItem?.DirectExpectedIPs))
|
if (!string.IsNullOrEmpty(simpleDNSItem?.DirectExpectedIPs))
|
||||||
{
|
{
|
||||||
var ipItems = dNSItem.DirectExpectedIPs
|
var ipItems = simpleDNSItem.DirectExpectedIPs
|
||||||
.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries)
|
.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Select(s => s.Trim())
|
.Select(s => s.Trim())
|
||||||
.Where(s => !string.IsNullOrEmpty(s))
|
.Where(s => !string.IsNullOrEmpty(s))
|
||||||
|
@ -1777,7 +1777,7 @@ public class CoreConfigSingboxService
|
||||||
if (item.OutboundTag == Global.DirectTag)
|
if (item.OutboundTag == Global.DirectTag)
|
||||||
{
|
{
|
||||||
rule.server = "dns_direct";
|
rule.server = "dns_direct";
|
||||||
rule.strategy = string.IsNullOrEmpty(dNSItem.SingboxStrategy4Direct) ? null : dNSItem.SingboxStrategy4Direct;
|
rule.strategy = string.IsNullOrEmpty(simpleDNSItem.SingboxStrategy4Direct) ? null : simpleDNSItem.SingboxStrategy4Direct;
|
||||||
|
|
||||||
if (expectedIPsRegions.Count > 0 && rule.geosite?.Count > 0)
|
if (expectedIPsRegions.Count > 0 && rule.geosite?.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -1797,14 +1797,14 @@ public class CoreConfigSingboxService
|
||||||
}
|
}
|
||||||
else if (item.OutboundTag == Global.ProxyTag)
|
else if (item.OutboundTag == Global.ProxyTag)
|
||||||
{
|
{
|
||||||
if (dNSItem.FakeIP == true)
|
if (simpleDNSItem.FakeIP == true)
|
||||||
{
|
{
|
||||||
var rule4Fake = JsonUtils.DeepCopy(rule);
|
var rule4Fake = JsonUtils.DeepCopy(rule);
|
||||||
rule4Fake.server = "dns-fake";
|
rule4Fake.server = "dns-fake";
|
||||||
singboxConfig.dns.rules.Add(rule4Fake);
|
singboxConfig.dns.rules.Add(rule4Fake);
|
||||||
}
|
}
|
||||||
rule.server = "dns_remote";
|
rule.server = "dns_remote";
|
||||||
rule.strategy = string.IsNullOrEmpty(dNSItem.SingboxStrategy4Proxy) ? null : dNSItem.SingboxStrategy4Proxy;
|
rule.strategy = string.IsNullOrEmpty(simpleDNSItem.SingboxStrategy4Proxy) ? null : simpleDNSItem.SingboxStrategy4Proxy;
|
||||||
}
|
}
|
||||||
else if (item.OutboundTag == Global.BlockTag)
|
else if (item.OutboundTag == Global.BlockTag)
|
||||||
{
|
{
|
||||||
|
@ -1929,7 +1929,7 @@ public class CoreConfigSingboxService
|
||||||
{
|
{
|
||||||
enabled = true,
|
enabled = true,
|
||||||
path = Utils.GetBinPath("cache.db"),
|
path = Utils.GetBinPath("cache.db"),
|
||||||
store_fakeip = _config.DNSItem.FakeIP == true
|
store_fakeip = _config.SimpleDNSItem.FakeIP == true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1137,7 +1137,7 @@ public class CoreConfigV2rayService
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var dNSItem = _config.DNSItem;
|
var dNSItem = _config.SimpleDNSItem;
|
||||||
var domainStrategy4Freedom = dNSItem?.RayStrategy4Freedom;
|
var domainStrategy4Freedom = dNSItem?.RayStrategy4Freedom;
|
||||||
|
|
||||||
//Outbound Freedom domainStrategy
|
//Outbound Freedom domainStrategy
|
||||||
|
@ -1164,7 +1164,7 @@ public class CoreConfigV2rayService
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<int> GenDnsServers(ProfileItem? node, V2rayConfig v2rayConfig, DNSItem dNSItem)
|
private async Task<int> GenDnsServers(ProfileItem? node, V2rayConfig v2rayConfig, SimpleDNSItem simpleDNSItem)
|
||||||
{
|
{
|
||||||
static List<string> ParseDnsAddresses(string? dnsInput, string defaultAddress)
|
static List<string> ParseDnsAddresses(string? dnsInput, string defaultAddress)
|
||||||
{
|
{
|
||||||
|
@ -1192,8 +1192,8 @@ public class CoreConfigV2rayService
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var directDNSAddress = ParseDnsAddresses(dNSItem?.DirectDNS, Global.DomainDirectDNSAddress.FirstOrDefault());
|
var directDNSAddress = ParseDnsAddresses(simpleDNSItem?.DirectDNS, Global.DomainDirectDNSAddress.FirstOrDefault());
|
||||||
var remoteDNSAddress = ParseDnsAddresses(dNSItem?.RemoteDNS, Global.DomainRemoteDNSAddress.FirstOrDefault());
|
var remoteDNSAddress = ParseDnsAddresses(simpleDNSItem?.RemoteDNS, Global.DomainRemoteDNSAddress.FirstOrDefault());
|
||||||
|
|
||||||
var directDomainList = new List<string>();
|
var directDomainList = new List<string>();
|
||||||
var directGeositeList = new List<string>();
|
var directGeositeList = new List<string>();
|
||||||
|
@ -1203,9 +1203,9 @@ public class CoreConfigV2rayService
|
||||||
var expectedIPs = new List<string>();
|
var expectedIPs = new List<string>();
|
||||||
var regionNames = new HashSet<string>();
|
var regionNames = new HashSet<string>();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(dNSItem?.DirectExpectedIPs))
|
if (!string.IsNullOrEmpty(simpleDNSItem?.DirectExpectedIPs))
|
||||||
{
|
{
|
||||||
expectedIPs = dNSItem.DirectExpectedIPs
|
expectedIPs = simpleDNSItem.DirectExpectedIPs
|
||||||
.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries)
|
.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Select(s => s.Trim())
|
.Select(s => s.Trim())
|
||||||
.Where(s => !string.IsNullOrEmpty(s))
|
.Where(s => !string.IsNullOrEmpty(s))
|
||||||
|
@ -1317,20 +1317,20 @@ public class CoreConfigV2rayService
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<int> GenDnsHosts(V2rayConfig v2rayConfig, DNSItem dNSItem)
|
private async Task<int> GenDnsHosts(V2rayConfig v2rayConfig, SimpleDNSItem simpleDNSItem)
|
||||||
{
|
{
|
||||||
if (dNSItem.AddCommonHosts == false && dNSItem.UseSystemHosts == false && dNSItem.Hosts.IsNullOrEmpty())
|
if (simpleDNSItem.AddCommonHosts == false && simpleDNSItem.UseSystemHosts == false && simpleDNSItem.Hosts.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
return await Task.FromResult(0);
|
return await Task.FromResult(0);
|
||||||
}
|
}
|
||||||
v2rayConfig.dns ??= new Dns4Ray();
|
v2rayConfig.dns ??= new Dns4Ray();
|
||||||
v2rayConfig.dns.hosts ??= new Dictionary<string, List<string>>();
|
v2rayConfig.dns.hosts ??= new Dictionary<string, List<string>>();
|
||||||
if (dNSItem.AddCommonHosts == true)
|
if (simpleDNSItem.AddCommonHosts == true)
|
||||||
{
|
{
|
||||||
v2rayConfig.dns.hosts = Global.PredefinedHosts;
|
v2rayConfig.dns.hosts = Global.PredefinedHosts;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dNSItem.UseSystemHosts == true)
|
if (simpleDNSItem.UseSystemHosts == true)
|
||||||
{
|
{
|
||||||
var systemHosts = Utils.GetSystemHosts();
|
var systemHosts = Utils.GetSystemHosts();
|
||||||
if (systemHosts.Count > 0)
|
if (systemHosts.Count > 0)
|
||||||
|
@ -1350,7 +1350,7 @@ public class CoreConfigV2rayService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var userHostsMap = dNSItem.Hosts?
|
var userHostsMap = simpleDNSItem.Hosts?
|
||||||
.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
|
.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Where(line => !string.IsNullOrWhiteSpace(line))
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
||||||
.Where(line => line.Contains(' '))
|
.Where(line => line.Contains(' '))
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class DNSSettingViewModel : MyReactiveObject
|
||||||
private async Task Init()
|
private async Task Init()
|
||||||
{
|
{
|
||||||
_config = AppHandler.Instance.Config;
|
_config = AppHandler.Instance.Config;
|
||||||
var item = _config.DNSItem;
|
var item = _config.SimpleDNSItem;
|
||||||
UseSystemHosts = item.UseSystemHosts;
|
UseSystemHosts = item.UseSystemHosts;
|
||||||
AddCommonHosts = item.AddCommonHosts;
|
AddCommonHosts = item.AddCommonHosts;
|
||||||
FakeIP = item.FakeIP;
|
FakeIP = item.FakeIP;
|
||||||
|
@ -67,19 +67,19 @@ public class DNSSettingViewModel : MyReactiveObject
|
||||||
|
|
||||||
private async Task SaveSettingAsync()
|
private async Task SaveSettingAsync()
|
||||||
{
|
{
|
||||||
_config.DNSItem.UseSystemHosts = UseSystemHosts;
|
_config.SimpleDNSItem.UseSystemHosts = UseSystemHosts;
|
||||||
_config.DNSItem.AddCommonHosts = AddCommonHosts;
|
_config.SimpleDNSItem.AddCommonHosts = AddCommonHosts;
|
||||||
_config.DNSItem.FakeIP = FakeIP;
|
_config.SimpleDNSItem.FakeIP = FakeIP;
|
||||||
_config.DNSItem.BlockBindingQuery = BlockBindingQuery;
|
_config.SimpleDNSItem.BlockBindingQuery = BlockBindingQuery;
|
||||||
_config.DNSItem.DirectDNS = DirectDNS;
|
_config.SimpleDNSItem.DirectDNS = DirectDNS;
|
||||||
_config.DNSItem.RemoteDNS = RemoteDNS;
|
_config.SimpleDNSItem.RemoteDNS = RemoteDNS;
|
||||||
_config.DNSItem.RayStrategy4Freedom = RayStrategy4Freedom;
|
_config.SimpleDNSItem.RayStrategy4Freedom = RayStrategy4Freedom;
|
||||||
_config.DNSItem.SingboxOutboundsResolveDNS = SingboxOutboundsResolveDNS;
|
_config.SimpleDNSItem.SingboxOutboundsResolveDNS = SingboxOutboundsResolveDNS;
|
||||||
_config.DNSItem.SingboxFinalResolveDNS = SingboxFinalResolveDNS;
|
_config.SimpleDNSItem.SingboxFinalResolveDNS = SingboxFinalResolveDNS;
|
||||||
_config.DNSItem.SingboxStrategy4Direct = SingboxStrategy4Direct;
|
_config.SimpleDNSItem.SingboxStrategy4Direct = SingboxStrategy4Direct;
|
||||||
_config.DNSItem.SingboxStrategy4Proxy = SingboxStrategy4Proxy;
|
_config.SimpleDNSItem.SingboxStrategy4Proxy = SingboxStrategy4Proxy;
|
||||||
_config.DNSItem.Hosts = Hosts;
|
_config.SimpleDNSItem.Hosts = Hosts;
|
||||||
_config.DNSItem.DirectExpectedIPs = DirectExpectedIPs;
|
_config.SimpleDNSItem.DirectExpectedIPs = DirectExpectedIPs;
|
||||||
await ConfigHandler.SaveConfig(_config);
|
await ConfigHandler.SaveConfig(_config);
|
||||||
if (_updateView != null)
|
if (_updateView != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue