mirror of https://github.com/2dust/v2rayN
Add dns for tun mode
parent
bfc8bf91ee
commit
3c4ae902fd
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue