diff --git a/Changelog b/Changelog
index 5f8761989..d34a61358 100644
--- a/Changelog
+++ b/Changelog
@@ -15,6 +15,7 @@
- FEATURE: Added support for magnet links in search engine
- FEATURE: Added vertor.com and torrentdownloads.net search plugins
- 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: Use XDG folders (.cache, .local) instead of .qbittorrent
- BUGFIX: Added legal notice on startup that the user must accept
diff --git a/src/options_imp.cpp b/src/options_imp.cpp
index 24578af78..9322860b5 100644
--- a/src/options_imp.cpp
+++ b/src/options_imp.cpp
@@ -514,6 +514,11 @@ int options_imp::getPeerProxyType() const{
return SOCKS5_PW;
}
return SOCKS5;
+ case 3:
+ if(isPeerProxyAuthEnabled()){
+ return HTTP_PW;
+ }
+ return HTTP;
default:
return -1;
}
@@ -654,6 +659,10 @@ void options_imp::loadOptions(){
case SOCKS5_PW:
comboProxyType->setCurrentIndex(2);
break;
+ case HTTP:
+ case HTTP_PW:
+ comboProxyType->setCurrentIndex(3);
+ break;
default:
comboProxyType->setCurrentIndex(0);
}
diff --git a/src/ui/options.ui b/src/ui/options.ui
index 530ce9710..082dde196 100644
--- a/src/ui/options.ui
+++ b/src/ui/options.ui
@@ -235,8 +235,8 @@
0
0
- 621
- 569
+ 602
+ 590
@@ -619,8 +619,8 @@ QGroupBox {
0
0
- 640
- 517
+ 644
+ 504
@@ -1113,8 +1113,8 @@ QGroupBox {
0
0
- 640
- 511
+ 602
+ 514
@@ -1519,8 +1519,8 @@ QGroupBox {
0
0
- 388
- 400
+ 620
+ 495
@@ -1936,8 +1936,8 @@ QGroupBox {
0
0
- 357
- 294
+ 620
+ 495
@@ -2168,6 +2168,11 @@ QGroupBox {
SOCKS5
+ -
+
+ HTTP
+
+
-
@@ -2359,8 +2364,8 @@ QGroupBox {
0
0
- 230
- 109
+ 620
+ 495
@@ -2456,8 +2461,8 @@ QGroupBox {
0
0
- 180
- 214
+ 620
+ 495
@@ -2620,8 +2625,8 @@ QGroupBox {
0
0
- 640
- 517
+ 620
+ 495
diff --git a/src/webui/preferences_content.html b/src/webui/preferences_content.html
index 925b81ae0..fe4bf1e73 100644
--- a/src/webui/preferences_content.html
+++ b/src/webui/preferences_content.html
@@ -174,6 +174,7 @@
+
_(Host:)
_(Port:)
@@ -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');
}