Add dns for tun mode
This commit is contained in:
@@ -168,10 +168,6 @@ namespace v2rayN.Handler
|
||||
{
|
||||
config.constItem.defIEProxyExceptions = Global.IEProxyExceptions;
|
||||
}
|
||||
//if (Utils.IsNullOrEmpty(config.remoteDNS))
|
||||
//{
|
||||
// config.remoteDNS = "1.1.1.1";
|
||||
//}
|
||||
|
||||
if (config.speedTestItem == null)
|
||||
{
|
||||
|
||||
@@ -640,7 +640,19 @@ namespace v2rayN.Handler
|
||||
{
|
||||
if (_config.tunModeItem.enableTun)
|
||||
{
|
||||
var tunDNS = Utils.GetEmbedText(Global.TunSingboxDNSFileName);
|
||||
string tunDNS = String.Empty;
|
||||
if (_config.tunModeItem.bypassMode)
|
||||
{
|
||||
tunDNS = _config.tunModeItem.directDNS;
|
||||
}
|
||||
else
|
||||
{
|
||||
tunDNS = _config.tunModeItem.proxyDNS;
|
||||
}
|
||||
if (tunDNS.IsNullOrEmpty() || Utils.ParseJson(tunDNS)?.ContainsKey("servers") == false)
|
||||
{
|
||||
tunDNS = Utils.GetEmbedText(Global.TunSingboxDNSFileName);
|
||||
}
|
||||
var obj = Utils.ParseJson(tunDNS);
|
||||
singboxConfig.dns = obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user