Added option to removed DNS-Proxy
This commit is contained in:
parent
626fe34e69
commit
3d974345a2
2 changed files with 6 additions and 1 deletions
|
@ -212,6 +212,11 @@ class Settings extends StaticSettings {
|
||||||
key: 'connect_history'
|
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> = {
|
static readonly KEY_CERTIFICATE_CALLBACK: SettingsKey<string> = {
|
||||||
key: 'certificate_callback'
|
key: 'certificate_callback'
|
||||||
};
|
};
|
||||||
|
|
|
@ -140,7 +140,7 @@ namespace connection {
|
||||||
else if(Modals.Regex.IP_V6.test(address.host))
|
else if(Modals.Regex.IP_V6.test(address.host))
|
||||||
proxy_host = address.host.replace(/\[(.*)]/, "$1").replace(/:/g, "_") + ".con-gate.work";
|
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_proxy_socket = new WebSocket('wss://' + proxy_host + ":" + address.port);
|
||||||
local_direct_socket = new WebSocket('wss://' + address.host + ":" + address.port);
|
local_direct_socket = new WebSocket('wss://' + address.host + ":" + address.port);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue