mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 09:16:05 +03:00
HTTP proxy support for peer communication
This commit is contained in:
parent
c7ca51f950
commit
de50346428
4 changed files with 45 additions and 16 deletions
|
@ -15,6 +15,7 @@
|
||||||
- FEATURE: Added support for magnet links in search engine
|
- FEATURE: Added support for magnet links in search engine
|
||||||
- FEATURE: Added vertor.com and torrentdownloads.net search plugins
|
- FEATURE: Added vertor.com and torrentdownloads.net search plugins
|
||||||
- FEATURE: Search engine can now use a SOCKS5 proxy
|
- FEATURE: Search engine can now use a SOCKS5 proxy
|
||||||
|
- FEATURE: HTTP proxy support for peer communication
|
||||||
- BUGFIX: Search engine loads new proxy settings without program restart
|
- BUGFIX: Search engine loads new proxy settings without program restart
|
||||||
- BUGFIX: Use XDG folders (.cache, .local) instead of .qbittorrent
|
- BUGFIX: Use XDG folders (.cache, .local) instead of .qbittorrent
|
||||||
- BUGFIX: Added legal notice on startup that the user must accept
|
- BUGFIX: Added legal notice on startup that the user must accept
|
||||||
|
|
|
@ -514,6 +514,11 @@ int options_imp::getPeerProxyType() const{
|
||||||
return SOCKS5_PW;
|
return SOCKS5_PW;
|
||||||
}
|
}
|
||||||
return SOCKS5;
|
return SOCKS5;
|
||||||
|
case 3:
|
||||||
|
if(isPeerProxyAuthEnabled()){
|
||||||
|
return HTTP_PW;
|
||||||
|
}
|
||||||
|
return HTTP;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -654,6 +659,10 @@ void options_imp::loadOptions(){
|
||||||
case SOCKS5_PW:
|
case SOCKS5_PW:
|
||||||
comboProxyType->setCurrentIndex(2);
|
comboProxyType->setCurrentIndex(2);
|
||||||
break;
|
break;
|
||||||
|
case HTTP:
|
||||||
|
case HTTP_PW:
|
||||||
|
comboProxyType->setCurrentIndex(3);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
comboProxyType->setCurrentIndex(0);
|
comboProxyType->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,8 +235,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>621</width>
|
<width>602</width>
|
||||||
<height>569</height>
|
<height>590</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
|
@ -619,8 +619,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>640</width>
|
<width>644</width>
|
||||||
<height>517</height>
|
<height>504</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||||
|
@ -1113,8 +1113,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>640</width>
|
<width>602</width>
|
||||||
<height>511</height>
|
<height>514</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_18">
|
<layout class="QVBoxLayout" name="verticalLayout_18">
|
||||||
|
@ -1519,8 +1519,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>388</width>
|
<width>620</width>
|
||||||
<height>400</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_20">
|
<layout class="QVBoxLayout" name="verticalLayout_20">
|
||||||
|
@ -1936,8 +1936,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>357</width>
|
<width>620</width>
|
||||||
<height>294</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||||
|
@ -2168,6 +2168,11 @@ QGroupBox {
|
||||||
<string>SOCKS5</string>
|
<string>SOCKS5</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>HTTP</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -2359,8 +2364,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>230</width>
|
<width>620</width>
|
||||||
<height>109</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_21">
|
<layout class="QVBoxLayout" name="verticalLayout_21">
|
||||||
|
@ -2456,8 +2461,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>180</width>
|
<width>620</width>
|
||||||
<height>214</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||||
|
@ -2620,8 +2625,8 @@ QGroupBox {
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>640</width>
|
<width>620</width>
|
||||||
<height>517</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_24">
|
<layout class="QVBoxLayout" name="verticalLayout_24">
|
||||||
|
|
|
@ -174,6 +174,7 @@
|
||||||
<option value="none">_((None))</option>
|
<option value="none">_((None))</option>
|
||||||
<option value="socks4">_(SOCKS4)</option>
|
<option value="socks4">_(SOCKS4)</option>
|
||||||
<option value="socks5">_(SOCKS5)</option>
|
<option value="socks5">_(SOCKS5)</option>
|
||||||
|
<option value="http">_(HTTP)</option>
|
||||||
</select>
|
</select>
|
||||||
_(Host:) <input type="text" id="peer_proxy_host_text" />
|
_(Host:) <input type="text" id="peer_proxy_host_text" />
|
||||||
_(Port:) <input type="text" id="peer_proxy_port_value" style="width: 4em;"/><br/><br/>
|
_(Port:) <input type="text" id="peer_proxy_port_value" style="width: 4em;"/><br/><br/>
|
||||||
|
@ -397,6 +398,15 @@
|
||||||
} else {
|
} else {
|
||||||
if(proxy_type_str == "socks4") {
|
if(proxy_type_str == "socks4") {
|
||||||
proxy_type = 5;
|
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');
|
var proxy_ip = $('peer_proxy_host_text').get('value');
|
||||||
|
@ -810,6 +820,10 @@ loadPreferences = function() {
|
||||||
case 4: // SOCKS5_PW
|
case 4: // SOCKS5_PW
|
||||||
$('peer_proxy_type_select').set('value', 'socks5');
|
$('peer_proxy_type_select').set('value', 'socks5');
|
||||||
break;
|
break;
|
||||||
|
case 1: // HTTP
|
||||||
|
case 3: // HTTP_PW
|
||||||
|
$('peer_proxy_type_select').set('value', 'http');
|
||||||
|
break;
|
||||||
default: // NONE
|
default: // NONE
|
||||||
$('peer_proxy_type_select').set('value', 'none');
|
$('peer_proxy_type_select').set('value', 'none');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue