Added option to removed DNS-Proxy

canary
WolverinDEV 2019-11-24 01:16:07 +01:00
parent 626fe34e69
commit 3d974345a2
2 changed files with 6 additions and 1 deletions

View File

@ -212,6 +212,11 @@ class Settings extends StaticSettings {
key: 'connect_history'
};
static readonly KEY_CONNECT_NO_DNSPROXY: SettingsKey<boolean> = {
key: 'connect_no_dnsproxy',
default_value: false
};
static readonly KEY_CERTIFICATE_CALLBACK: SettingsKey<string> = {
key: 'certificate_callback'
};

View File

@ -140,7 +140,7 @@ namespace connection {
else if(Modals.Regex.IP_V6.test(address.host))
proxy_host = address.host.replace(/\[(.*)]/, "$1").replace(/:/g, "_") + ".con-gate.work";
if(proxy_host)
if(proxy_host && !settings.static_global(Settings.KEY_CONNECT_NO_DNSPROXY))
local_proxy_socket = new WebSocket('wss://' + proxy_host + ":" + address.port);
local_direct_socket = new WebSocket('wss://' + address.host + ":" + address.port);