mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-03 13:48:52 +00:00
Add dns for tun mode
This commit is contained in:
parent
bfc8bf91ee
commit
3c4ae902fd
2 changed files with 13 additions and 5 deletions
|
@ -168,10 +168,6 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
config.constItem.defIEProxyExceptions = Global.IEProxyExceptions;
|
config.constItem.defIEProxyExceptions = Global.IEProxyExceptions;
|
||||||
}
|
}
|
||||||
//if (Utils.IsNullOrEmpty(config.remoteDNS))
|
|
||||||
//{
|
|
||||||
// config.remoteDNS = "1.1.1.1";
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (config.speedTestItem == null)
|
if (config.speedTestItem == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -640,7 +640,19 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
if (_config.tunModeItem.enableTun)
|
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);
|
var obj = Utils.ParseJson(tunDNS);
|
||||||
singboxConfig.dns = obj;
|
singboxConfig.dns = obj;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue