diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade
index 7a0441ea2..a09b316c2 100644
--- a/glade/preferences_dialog.glade
+++ b/glade/preferences_dialog.glade
@@ -798,223 +798,7 @@ Full Stream
-
- True
- 0
- GTK_SHADOW_NONE
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
-
- True
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Affects regular bittorrent peers
- Peer Proxy
- 0
- True
-
-
-
-
-
- True
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Only affects HTTP tracker connections (UDP tracker connections are affected if the given proxy supports UDP, e.g. SOCKS5).
- Tracker Proxy
- 0
- True
-
-
-
- 1
-
-
-
-
- True
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Affects the DHT messages. Since they are sent over UDP, it only has any effect if the proxy supports UDP.
- DHT Proxy
- 0
- True
-
-
-
- 2
-
-
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 3
- 4
-
-
-
-
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Proxy type
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Username
-
-
- 1
- 2
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Password
-
-
- 2
- 3
-
-
-
-
- True
- False
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- None
-Socksv4
-Socksv5
-Socksv5 W/ Auth
-HTTP
-HTTP W/ Auth
-
-
- 1
- 2
-
-
-
-
- True
- False
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
-
- 1
- 2
- 1
- 2
-
-
-
-
- True
- False
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
-
-
- 1
- 2
- 2
- 3
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Server
-
-
- 2
- 3
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Port
-
-
- 2
- 3
- 1
- 2
-
-
-
-
- True
- False
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
-
-
- 3
- 4
-
-
-
-
- True
- False
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 8080 0 10000 1 10 10
-
-
- 3
- 4
- 1
- 2
-
-
-
-
- 1
-
-
-
-
-
-
- True
- <b>Proxy</b>
- True
-
-
- label_item
-
-
-
-
- False
- 2
- 5
-
+
@@ -1411,6 +1195,811 @@ HTTP W/ Auth
False
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ 0
+ GTK_SHADOW_NONE
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Affects regular bittorrent peers
+ Peer Proxy
+ 0
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 3
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 8080 0 10000 1 10 10
+
+
+ 3
+ 4
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Port
+
+
+ 2
+ 3
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Server
+
+
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ False
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ None
+Socksv4
+Socksv5
+Socksv5 W/ Auth
+HTTP
+HTTP W/ Auth
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Password
+
+
+ 2
+ 3
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Username
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Proxy type
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 3
+ 4
+
+
+
+
+ 1
+
+
+
+
+
+
+ True
+ <b>Peer Proxy</b>
+ True
+
+
+ label_item
+
+
+
+
+ False
+ 2
+
+
+
+
+ True
+ 0
+ GTK_SHADOW_NONE
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Affects regular bittorrent peers
+ Tracker Proxy
+ 0
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 3
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 8080 0 10000 1 10 10
+
+
+ 3
+ 4
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Port
+
+
+ 2
+ 3
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Server
+
+
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ False
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ None
+Socksv4
+Socksv5
+Socksv5 W/ Auth
+HTTP
+HTTP W/ Auth
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Password
+
+
+ 2
+ 3
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Username
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Proxy type
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 3
+ 4
+
+
+
+
+ 1
+
+
+
+
+
+
+ True
+ <b>Tracker Proxy</b>
+ True
+
+
+ label_item
+
+
+
+
+ False
+ 2
+ 1
+
+
+
+
+ True
+ 0
+ GTK_SHADOW_NONE
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Affects regular bittorrent peers
+ DHT Proxy
+ 0
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 3
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 8080 0 10000 1 10 10
+
+
+ 3
+ 4
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Port
+
+
+ 2
+ 3
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Server
+
+
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ False
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ None
+Socksv4
+Socksv5
+Socksv5 W/ Auth
+HTTP
+HTTP W/ Auth
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Password
+
+
+ 2
+ 3
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Username
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Proxy type
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 3
+ 4
+
+
+
+
+ 1
+
+
+
+
+
+
+ True
+ <b>DHT Proxy</b>
+ True
+
+
+ label_item
+
+
+
+
+ False
+ 2
+ 2
+
+
+
+
+ True
+ 0
+ GTK_SHADOW_NONE
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Affects regular bittorrent peers
+ Web Seed Proxy
+ 0
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 3
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 8080 0 10000 1 10 10
+
+
+ 3
+ 4
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Port
+
+
+ 2
+ 3
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Server
+
+
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ False
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ None
+Socksv4
+Socksv5
+Socksv5 W/ Auth
+HTTP
+HTTP W/ Auth
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Password
+
+
+ 2
+ 3
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Username
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Proxy type
+
+
+
+
+ True
+ False
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ 3
+ 4
+
+
+
+
+ 1
+
+
+
+
+
+
+ True
+ <b>Web Seed Proxy</b>
+ True
+
+
+ label_item
+
+
+
+
+ False
+ 2
+ 3
+
+
+
+
+
+
+
+ 5
+ False
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Proxies
+
+
+ tab
+ 5
+ False
+ False
+
+
True
diff --git a/src/core.py b/src/core.py
index 2b7a6e15d..f13368979 100644
--- a/src/core.py
+++ b/src/core.py
@@ -916,10 +916,8 @@ class Manager:
def add_range_to_ip_filter(self, start, end):
return deluge_core.add_range_to_IP_filter(start, end)
- def proxy_settings(self, server, login, paswd, portnum, proxytype, peerproxy, trackerproxy, dhtproxy):
- if self.dht_running == False:
- dhtproxy = False
- return deluge_core.proxy_settings(server, login, paswd, portnum, proxytype, peerproxy, trackerproxy, dhtproxy)
+ def proxy_settings(self, server, login, paswd, portnum, proxytype, proxy):
+ return deluge_core.proxy_settings(server, login, paswd, portnum, proxytype, proxy)
def pe_settings(self, out_enc_policy, in_enc_policy, allowed_enc_level, prefer_rc4):
return deluge_core.pe_settings(out_enc_policy, in_enc_policy, allowed_enc_level, prefer_rc4)
diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp
index df37a7b74..51f2bab47 100644
--- a/src/deluge_core.cpp
+++ b/src/deluge_core.cpp
@@ -1574,9 +1574,9 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
char *server, *login, *pasw;
int portnum;
libtorrent::proxy_settings::proxy_type proxytype;
- bool peerproxy, trackerproxy, dhtproxy;
+ std::string dtpwproxy;
- PyArg_ParseTuple(args, "sssiibbb", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &trackerproxy, &dhtproxy);
+ PyArg_ParseTuple(args, "sssiis", &server, &login, &pasw, &portnum, &proxytype, &dtpwproxy);
M_proxy_settings->type = proxytype;
M_proxy_settings->username = login;
@@ -1584,17 +1584,20 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
M_proxy_settings->hostname = server;
M_proxy_settings->port = portnum;
- if (peerproxy) {
+ if (dtpwproxy == "peer") {
M_ses->set_peer_proxy(*M_proxy_settings);
}
- if (trackerproxy) {
+ if (dtpwproxy == "tracker") {
M_ses->set_tracker_proxy(*M_proxy_settings);
}
- if (dhtproxy) {
+ if (dtpwproxy == "dht") {
M_ses->set_dht_proxy(*M_proxy_settings);
}
+ if (dtpwproxy == "web") {
+ M_ses->set_web_seed_proxy(*M_proxy_settings);
+ }
return Py_None;
}
diff --git a/src/dialogs.py b/src/dialogs.py
index a6a30c97e..3bea20dc8 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -58,7 +58,10 @@ class PreferencesDlg:
self.glade.get_widget("combo_encin").set_active(self.preferences.get("encin_state"))
self.glade.get_widget("combo_encout").set_active(self.preferences.get("encout_state"))
self.glade.get_widget("combo_enclevel").set_active(self.preferences.get("enclevel_type"))
- self.glade.get_widget("combo_proxy_type").set_active(self.preferences.get("proxy_type"))
+ self.glade.get_widget("combo_peer_proxy_type").set_active(self.preferences.get("peer_proxy_type"))
+ self.glade.get_widget("combo_dht_proxy_type").set_active(self.preferences.get("dht_proxy_type"))
+ self.glade.get_widget("combo_tracker_proxy_type").set_active(self.preferences.get("tracker_proxy_type"))
+ self.glade.get_widget("combo_web_proxy_type").set_active(self.preferences.get("web_proxy_type"))
self.glade.get_widget("chk_pref_rc4").set_active(self.preferences.get("pref_rc4"))
self.glade.get_widget("chk_peer_proxy").set_active(self.preferences.get("peer_proxy"))
self.glade.get_widget("chk_tracker_proxy").set_active(self.preferences.get("tracker_proxy"))
@@ -72,9 +75,15 @@ class PreferencesDlg:
self.glade.get_widget("chk_min_on_close").set_active(self.preferences.get("close_to_tray"))
self.glade.get_widget("chk_lock_tray").set_active(self.preferences.get("lock_tray"))
self.glade.get_widget("txt_tray_passwd").set_text(self.preferences.get("tray_passwd"))
- self.glade.get_widget("txt_proxy_hostname").set_text(self.preferences.get("proxy_hostname"))
- self.glade.get_widget("txt_proxy_username").set_text(self.preferences.get("proxy_username"))
- self.glade.get_widget("txt_proxy_password").set_text(self.preferences.get("proxy_password"))
+ self.glade.get_widget("txt_peer_proxy_hostname").set_text(self.preferences.get("peer_proxy_hostname"))
+ self.glade.get_widget("txt_peer_proxy_username").set_text(self.preferences.get("peer_proxy_username"))
+ self.glade.get_widget("txt_peer_proxy_password").set_text(self.preferences.get("peer_proxy_password"))
+ self.glade.get_widget("txt_dht_proxy_hostname").set_text(self.preferences.get("dht_proxy_hostname"))
+ self.glade.get_widget("txt_dht_proxy_username").set_text(self.preferences.get("dht_proxy_username"))
+ self.glade.get_widget("txt_dht_proxy_password").set_text(self.preferences.get("dht_proxy_password"))
+ self.glade.get_widget("txt_web_proxy_hostname").set_text(self.preferences.get("web_proxy_hostname"))
+ self.glade.get_widget("txt_web_proxy_username").set_text(self.preferences.get("web_proxy_username"))
+ self.glade.get_widget("txt_web_proxy_password").set_text(self.preferences.get("web_proxy_password"))
self.glade.get_widget("finished_path_button").set_filename(self.preferences.get("default_finished_path"))
self.glade.get_widget("download_path_button").set_filename(self.preferences.get("default_download_path"))
self.glade.get_widget("chk_enable_files_dialog").set_active(self.preferences.get("enable_files_dialog"))
@@ -87,7 +96,10 @@ class PreferencesDlg:
self.glade.get_widget("spin_num_upload").set_value(float(self.preferences.get("max_number_uploads")))
self.glade.get_widget("spin_max_download").set_value(self.preferences.get("max_download_speed"))
self.glade.get_widget("spin_max_connections").set_value(self.preferences.get("max_connections"))
- self.glade.get_widget("spin_proxy_port").set_value(self.preferences.get("proxy_port"))
+ self.glade.get_widget("spin_peer_proxy_port").set_value(self.preferences.get("peer_proxy_port"))
+ self.glade.get_widget("spin_tracker_proxy_port").set_value(self.preferences.get("tracker_proxy_port"))
+ self.glade.get_widget("spin_dht_proxy_port").set_value(self.preferences.get("dht_proxy_port"))
+ self.glade.get_widget("spin_web_proxy_port").set_value(self.preferences.get("web_proxy_port"))
self.glade.get_widget("spin_torrents").set_value(float(self.preferences.get("max_active_torrents")))
self.glade.get_widget("chk_seedbottom").set_active(self.preferences.get("queue_seeds_to_bottom"))
self.glade.get_widget("chk_queue_above_completed").set_sensitive(self.preferences.get("queue_seeds_to_bottom"))
@@ -138,12 +150,16 @@ class PreferencesDlg:
self.preferences.set("encin_state", self.glade.get_widget("combo_encin").get_active())
self.preferences.set("encout_state", self.glade.get_widget("combo_encout").get_active())
self.preferences.set("enclevel_type", self.glade.get_widget("combo_enclevel").get_active())
- self.preferences.set("proxy_type", self.glade.get_widget("combo_proxy_type").get_active())
+ self.preferences.set("peer_proxy_type", self.glade.get_widget("combo_peer_proxy_type").get_active())
self.preferences.set("pref_rc4", self.glade.get_widget("chk_pref_rc4").get_active())
self.preferences.set("peer_proxy", self.glade.get_widget("chk_peer_proxy").get_active())
self.preferences.set("tracker_proxy", self.glade.get_widget("chk_tracker_proxy").get_active())
self.preferences.set("dht_proxy", self.glade.get_widget("chk_dht_proxy").get_active())
+ self.preferences.set("web_proxy", self.glade.get_widget("chk_web_proxy").get_active())
self.preferences.set("use_upnp", self.glade.get_widget("chk_upnp").get_active())
+ self.preferences.set("tracker_proxy_type", self.glade.get_widget("combo_tracker_proxy_type").get_active())
+ self.preferences.set("dht_proxy_type", self.glade.get_widget("combo_dht_proxy_type").get_active())
+ self.preferences.set("web_proxy_type", self.glade.get_widget("combo_web_proxy_type").get_active())
self.preferences.set("new_releases", self.glade.get_widget("chk_new_releases").get_active())
self.preferences.set("random_port", self.glade.get_widget("chk_random_port").get_active())
self.preferences.set("use_natpmp", self.glade.get_widget("chk_natpmp").get_active())
@@ -152,9 +168,18 @@ class PreferencesDlg:
self.preferences.set("close_to_tray", self.glade.get_widget("chk_min_on_close").get_active())
self.preferences.set("lock_tray", self.glade.get_widget("chk_lock_tray").get_active())
self.preferences.set("tray_passwd", self.glade.get_widget("txt_tray_passwd").get_text())
- self.preferences.set("proxy_username", self.glade.get_widget("txt_proxy_username").get_text())
- self.preferences.set("proxy_password", self.glade.get_widget("txt_proxy_password").get_text())
- self.preferences.set("proxy_hostname", self.glade.get_widget("txt_proxy_hostname").get_text())
+ self.preferences.set("tracker_proxy_username", self.glade.get_widget("txt_tracker_proxy_username").get_text())
+ self.preferences.set("tracker_proxy_password", self.glade.get_widget("txt_tracker_proxy_password").get_text())
+ self.preferences.set("tracker_proxy_hostname", self.glade.get_widget("txt_tracker_proxy_hostname").get_text())
+ self.preferences.set("web_proxy_username", self.glade.get_widget("txt_web_proxy_username").get_text())
+ self.preferences.set("web_proxy_password", self.glade.get_widget("txt_web_proxy_password").get_text())
+ self.preferences.set("web_proxy_hostname", self.glade.get_widget("txt_web_proxy_hostname").get_text())
+ self.preferences.set("dht_proxy_username", self.glade.get_widget("txt_dht_proxy_username").get_text())
+ self.preferences.set("dht_proxy_password", self.glade.get_widget("txt_dht_proxy_password").get_text())
+ self.preferences.set("dht_proxy_hostname", self.glade.get_widget("txt_dht_proxy_hostname").get_text())
+ self.preferences.set("peer_proxy_username", self.glade.get_widget("txt_peer_proxy_username").get_text())
+ self.preferences.set("peer_proxy_password", self.glade.get_widget("txt_peer_proxy_password").get_text())
+ self.preferences.set("peer_proxy_hostname", self.glade.get_widget("txt_peer_proxy_hostname").get_text())
self.preferences.set("use_default_dir", self.glade.get_widget("radio_save_all_to").get_active())
self.preferences.set("default_download_path", self.glade.get_widget("download_path_button").get_filename())
self.preferences.set("enable_move_completed", self.glade.get_widget("chk_move_completed").get_active())
@@ -168,7 +193,10 @@ class PreferencesDlg:
self.preferences.set("max_upload_speed", self.glade.get_widget("spin_max_upload").get_value())
self.preferences.set("max_number_uploads", int(self.glade.get_widget("spin_num_upload").get_value()))
self.preferences.set("max_download_speed", self.glade.get_widget("spin_max_download").get_value())
- self.preferences.set("proxy_port", self.glade.get_widget("spin_proxy_port").get_value())
+ self.preferences.set("peer_proxy_port", self.glade.get_widget("spin_peer_proxy_port").get_value())
+ self.preferences.set("dht_proxy_port", self.glade.get_widget("spin_dht_proxy_port").get_value())
+ self.preferences.set("web_proxy_port", self.glade.get_widget("spin_web_proxy_port").get_value())
+ self.preferences.set("tracker_proxy_port", self.glade.get_widget("spin_tracker_proxy_port").get_value())
self.preferences.set("max_connections", int(self.glade.get_widget("spin_max_connections").get_value()))
self.preferences.set("max_active_torrents", int(self.glade.get_widget("spin_torrents").get_value()))
self.preferences.set("queue_seeds_to_bottom", self.glade.get_widget("chk_seedbottom").get_active())
@@ -196,15 +224,29 @@ class PreferencesDlg:
self.glade.get_widget('chk_clear_max_ratio_torrents').set_sensitive(value)
elif widget == self.glade.get_widget('chk_seedbottom'):
self.glade.get_widget('chk_queue_above_completed').set_sensitive(value)
- elif widget == self.glade.get_widget('chk_peer_proxy') or \
- widget == self.glade.get_widget('chk_tracker_proxy') or \
- widget == self.glade.get_widget('chk_dht_proxy'):
- value = self.glade.get_widget('chk_peer_proxy').get_active() or \
- self.glade.get_widget('chk_tracker_proxy').get_active() or \
- self.glade.get_widget('chk_dht_proxy').get_active()
- for x in ['combo_proxy_type', 'txt_proxy_hostname',
- 'txt_proxy_username', 'spin_proxy_port',
- 'txt_proxy_password']:
+ elif widget == self.glade.get_widget('chk_peer_proxy'):
+ value = self.glade.get_widget('chk_peer_proxy').get_active()
+ for x in ['combo_peer_proxy_type', 'txt_peer_proxy_hostname',
+ 'txt_peer_proxy_username', 'spin_peer_proxy_port',
+ 'txt_peer_proxy_password']:
+ self.glade.get_widget(x).set_sensitive(value)
+ elif widget == self.glade.get_widget('chk_tracker_proxy'):
+ value = self.glade.get_widget('chk_tracker_proxy').get_active()
+ for x in ['combo_tracker_proxy_type', 'txt_tracker_proxy_hostname',
+ 'txt_tracker_proxy_username', 'spin_tracker_proxy_port',
+ 'txt_tracker_proxy_password']:
+ self.glade.get_widget(x).set_sensitive(value)
+ elif widget == self.glade.get_widget('chk_dht_proxy'):
+ value = self.glade.get_widget('chk_dht_proxy').get_active()
+ for x in ['combo_dht_proxy_type', 'txt_dht_proxy_hostname',
+ 'txt_dht_proxy_username', 'spin_dht_proxy_port',
+ 'txt_dht_proxy_password']:
+ self.glade.get_widget(x).set_sensitive(value)
+ elif widget == self.glade.get_widget('chk_web_proxy'):
+ value = self.glade.get_widget('chk_web_proxy').get_active()
+ for x in ['combo_web_proxy_type', 'txt_web_proxy_hostname',
+ 'txt_web_proxy_username', 'spin_web_proxy_port',
+ 'txt_web_proxy_password']:
self.glade.get_widget(x).set_sensitive(value)
elif widget == self.glade.get_widget('chk_use_tray'):
self.glade.get_widget('chk_min_on_close').set_sensitive(value)
diff --git a/src/interface.py b/src/interface.py
index 03cad98d5..24a66238e 100644
--- a/src/interface.py
+++ b/src/interface.py
@@ -708,11 +708,22 @@ class DelugeGTK:
self.manager.pe_settings(self.config.get("encout_state"),
self.config.get("encin_state"), self.config.get("enclevel_type"),
self.config.get("pref_rc4"))
- self.manager.proxy_settings(self.config.get("proxy_hostname"),
- self.config.get("proxy_username"), self.config.get("proxy_password"),
- int(self.config.get("proxy_port")), self.config.get("proxy_type"),
- self.config.get("peer_proxy"), self.config.get("tracker_proxy"),
- self.config.get("dht_proxy"))
+ if self.config.get("peer_proxy"):
+ self.manager.proxy_settings(self.config.get(peer_proxy_hostname),
+ self.config.get("peer_proxy_username"), self.config.get("peer_proxy_password"),
+ int(self.config.get("peer_proxy_port")), self.config.get("peer_proxy_type"), "peer")
+ if self.config.get("dht_proxy"):
+ self.manager.proxy_settings(self.config.get(dht_proxy_hostname),
+ self.config.get("dht_proxy_username"), self.config.get("dht_proxy_password"),
+ int(self.config.get("dht_proxy_port")), self.config.get("dht_proxy_type"), "dht")
+ if self.config.get("tracker_proxy"):
+ self.manager.proxy_settings(self.config.get(tracker_proxy_hostname),
+ self.config.get("tracker_proxy_username"), self.config.get("tracker_proxy_password"),
+ int(self.config.get("tracker_proxy_port")), self.config.get("tracker_proxy_type"), "tracker")
+ if self.config.get("web_proxy"):
+ self.manager.proxy_settings(self.config.get(web_proxy_hostname),
+ self.config.get("web_proxy_username"), self.config.get("web_proxy_password"),
+ int(self.config.get("web_proxy_port")), self.config.get("web_proxy_type"), "web")
def get_message_from_state(self, torrent_state):
state = torrent_state['state']
diff --git a/src/pref.py b/src/pref.py
index 93da578d1..71b9fd2c0 100644
--- a/src/pref.py
+++ b/src/pref.py
@@ -61,7 +61,7 @@ DEFAULT_PREFS = {
"listen_on" : [6881,6889],
"lock_tray" : False,
"max_active_torrents" : -1,
- "max_connections" : 400,
+ "max_connections" : 200,
"max_download_speed" : -1,
"max_download_speed_bps": -1,
"max_number_uploads" : 10,
@@ -69,14 +69,29 @@ DEFAULT_PREFS = {
"max_upload_speed_bps" : -1,
"pref_rc4" : True,
"prioritize_first_last_pieces" : False,
- "proxy_type" : common.ProxyType.none,
+ "web_proxy_type" : common.ProxyType.none,
+ "peer_proxy_type" : common.ProxyType.none,
+ "dht_proxy_type" : common.ProxyType.none,
+ "tracker_proxy_type" : common.ProxyType.none,
"peer_proxy" : False,
"tracker_proxy" : False,
"dht_proxy" : False,
- "proxy_hostname" : "",
- "proxy_username" : "",
- "proxy_password" : "",
- "proxy_port": 8080,
+ "peer_proxy_hostname" : "",
+ "peer_proxy_username" : "",
+ "peer_proxy_password" : "",
+ "peer_proxy_port": 8080,
+ "dht_proxy_hostname" : "",
+ "dht_proxy_username" : "",
+ "dht_proxy_password" : "",
+ "dht_proxy_port": 8080,
+ "web_proxy_hostname" : "",
+ "web_proxy_username" : "",
+ "web_proxy_password" : "",
+ "web_proxy_port": 8080,
+ "tracker_proxy_hostname" : "",
+ "tracker_proxy_username" : "",
+ "tracker_proxy_password" : "",
+ "tracker_proxy_port": 8080,
"queue_seeds_to_bottom" : False,
"random_port" : False,
"show_availability" : True,