mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
HTTP proxy support for peer communication
This commit is contained in:
@@ -174,6 +174,7 @@
|
||||
<option value="none">_((None))</option>
|
||||
<option value="socks4">_(SOCKS4)</option>
|
||||
<option value="socks5">_(SOCKS5)</option>
|
||||
<option value="http">_(HTTP)</option>
|
||||
</select>
|
||||
_(Host:) <input type="text" id="peer_proxy_host_text" />
|
||||
_(Port:) <input type="text" id="peer_proxy_port_value" style="width: 4em;"/><br/><br/>
|
||||
@@ -397,6 +398,15 @@
|
||||
} else {
|
||||
if(proxy_type_str == "socks4") {
|
||||
proxy_type = 5;
|
||||
} else {
|
||||
if(proxy_type_str == "http") {
|
||||
if($defined($('peer_proxy_auth_checkbox').get('checked')) && $('peer_proxy_auth_checkbox').get('checked')) {
|
||||
proxy_type = 3;
|
||||
proxy_auth_enabled = 1;
|
||||
} else {
|
||||
proxy_type = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var proxy_ip = $('peer_proxy_host_text').get('value');
|
||||
@@ -810,6 +820,10 @@ loadPreferences = function() {
|
||||
case 4: // SOCKS5_PW
|
||||
$('peer_proxy_type_select').set('value', 'socks5');
|
||||
break;
|
||||
case 1: // HTTP
|
||||
case 3: // HTTP_PW
|
||||
$('peer_proxy_type_select').set('value', 'http');
|
||||
break;
|
||||
default: // NONE
|
||||
$('peer_proxy_type_select').set('value', 'none');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user