mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-02 13:18:50 +00:00
DNS settings check
This commit is contained in:
parent
610a610ee0
commit
716029def8
1 changed files with 16 additions and 1 deletions
|
@ -181,6 +181,21 @@ namespace v2rayN.Forms
|
|||
UI.Show(UIRes.I18N("PleaseSelectProtocol"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
var remoteDNS = txtremoteDNS.Text.TrimEx();
|
||||
var obj = Utils.ParseJson(remoteDNS);
|
||||
if (obj != null && obj.ContainsKey("servers"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if (remoteDNS.Contains("{") || remoteDNS.Contains("}"))
|
||||
{
|
||||
UI.Show(UIRes.I18N("FillCorrectDNSText"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
config.inbound[0].localPort = Utils.ToInt(localPort);
|
||||
config.inbound[0].protocol = protocol;
|
||||
config.inbound[0].udpEnabled = udpEnabled;
|
||||
|
@ -227,7 +242,7 @@ namespace v2rayN.Forms
|
|||
//Mux
|
||||
config.muxEnabled = muxEnabled;
|
||||
|
||||
//remoteDNS
|
||||
//remoteDNS
|
||||
config.remoteDNS = txtremoteDNS.Text.TrimEx();
|
||||
|
||||
config.defAllowInsecure = chkdefAllowInsecure.Checked;
|
||||
|
|
Loading…
Reference in a new issue