mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-28 02:52:53 +00:00
Compare commits
1 commit
6195fa0a84
...
29895d2ebf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29895d2ebf |
1 changed files with 6 additions and 30 deletions
|
|
@ -2321,22 +2321,10 @@ public static class ConfigHandler
|
||||||
config.ConstItem.SrsSourceUrl = Global.SingboxRulesetSources[1];
|
config.ConstItem.SrsSourceUrl = Global.SingboxRulesetSources[1];
|
||||||
config.ConstItem.RouteRulesTemplateSourceUrl = Global.RoutingRulesSources[1];
|
config.ConstItem.RouteRulesTemplateSourceUrl = Global.RoutingRulesSources[1];
|
||||||
|
|
||||||
var xrayDnsRussia = await GetExternalDNSItem(ECoreType.Xray, Global.DNSTemplateSources[1] + "v2ray.json");
|
await SaveDNSItems(config, await GetExternalDNSItem(ECoreType.Xray, Global.DNSTemplateSources[1] + "v2ray.json"));
|
||||||
var singboxDnsRussia = await GetExternalDNSItem(ECoreType.sing_box, Global.DNSTemplateSources[1] + "sing_box.json");
|
await SaveDNSItems(config, await GetExternalDNSItem(ECoreType.sing_box, Global.DNSTemplateSources[1] + "sing_box.json"));
|
||||||
var simpleDnsRussia = await GetExternalSimpleDNSItem(Global.DNSTemplateSources[1] + "simple_dns.json");
|
|
||||||
|
|
||||||
if (simpleDnsRussia == null)
|
config.SimpleDNSItem = await GetExternalSimpleDNSItem(Global.DNSTemplateSources[1] + "simple_dns.json") ?? InitBuiltinSimpleDNS();
|
||||||
{
|
|
||||||
xrayDnsRussia.Enabled = true;
|
|
||||||
singboxDnsRussia.Enabled = true;
|
|
||||||
config.SimpleDNSItem = InitBuiltinSimpleDNS();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.SimpleDNSItem = simpleDnsRussia;
|
|
||||||
}
|
|
||||||
await SaveDNSItems(config, xrayDnsRussia);
|
|
||||||
await SaveDNSItems(config, singboxDnsRussia);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPresetType.Iran:
|
case EPresetType.Iran:
|
||||||
|
|
@ -2344,22 +2332,10 @@ public static class ConfigHandler
|
||||||
config.ConstItem.SrsSourceUrl = Global.SingboxRulesetSources[2];
|
config.ConstItem.SrsSourceUrl = Global.SingboxRulesetSources[2];
|
||||||
config.ConstItem.RouteRulesTemplateSourceUrl = Global.RoutingRulesSources[2];
|
config.ConstItem.RouteRulesTemplateSourceUrl = Global.RoutingRulesSources[2];
|
||||||
|
|
||||||
var xrayDnsIran = await GetExternalDNSItem(ECoreType.Xray, Global.DNSTemplateSources[2] + "v2ray.json");
|
await SaveDNSItems(config, await GetExternalDNSItem(ECoreType.Xray, Global.DNSTemplateSources[2] + "v2ray.json"));
|
||||||
var singboxDnsIran = await GetExternalDNSItem(ECoreType.sing_box, Global.DNSTemplateSources[2] + "sing_box.json");
|
await SaveDNSItems(config, await GetExternalDNSItem(ECoreType.sing_box, Global.DNSTemplateSources[2] + "sing_box.json"));
|
||||||
var simpleDnsIran = await GetExternalSimpleDNSItem(Global.DNSTemplateSources[2] + "simple_dns.json");
|
|
||||||
|
|
||||||
if (simpleDnsIran == null)
|
config.SimpleDNSItem = await GetExternalSimpleDNSItem(Global.DNSTemplateSources[2] + "simple_dns.json") ?? InitBuiltinSimpleDNS();
|
||||||
{
|
|
||||||
xrayDnsIran.Enabled = true;
|
|
||||||
singboxDnsIran.Enabled = true;
|
|
||||||
config.SimpleDNSItem = InitBuiltinSimpleDNS();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.SimpleDNSItem = simpleDnsIran;
|
|
||||||
}
|
|
||||||
await SaveDNSItems(config, xrayDnsIran);
|
|
||||||
await SaveDNSItems(config, singboxDnsIran);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue