mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
- Added SOCKS5 proxy for http connections to Web UI too
This commit is contained in:
parent
296acf820c
commit
447efc52d8
1 changed files with 14 additions and 0 deletions
|
@ -156,6 +156,7 @@
|
|||
_(Type:) <select id ="http_proxy_type_select" onchange="updateHTTPProxySettings();">
|
||||
<option value="none">_((None))</option>
|
||||
<option value="http">_(HTTP)</option>
|
||||
<option value="socks5">_(SOCKS5)</option>
|
||||
</select>
|
||||
_(Host:) <input type="text" id="http_proxy_host_text" />
|
||||
_(Port:) <input type="text" id="http_proxy_port_value" style="width: 4em;"/><br/><br/>
|
||||
|
@ -368,6 +369,15 @@
|
|||
} else {
|
||||
http_proxy_type = 1;
|
||||
}
|
||||
} else {
|
||||
if(http_proxy_type_str == "socks5") {
|
||||
if($defined($('http_proxy_auth_checkbox').get('checked')) && $('http_proxy_auth_checkbox').get('checked')) {
|
||||
http_proxy_type = 4;
|
||||
http_proxy_auth_enabled = 1;
|
||||
} else {
|
||||
http_proxy_type = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
var http_proxy_ip = $('http_proxy_host_text').get('value');
|
||||
var http_proxy_port = $('http_proxy_port_value').get('value');
|
||||
|
@ -820,6 +830,10 @@ loadPreferences = function() {
|
|||
case 3: // HTTP_PW
|
||||
$('http_proxy_type_select').set('value', 'http');
|
||||
break;
|
||||
case 2: // SOCKS5
|
||||
case 4: // SOCKS5_PW
|
||||
$('http_proxy_type_select').set('value', 'socks5');
|
||||
break;
|
||||
default: // NONE
|
||||
$('http_proxy_type_select').set('value', 'none');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue