From 67c09ebf56ac306f781968562b4513b157ba81fa Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 21 Jun 2007 23:12:36 +0000 Subject: [PATCH] deluge_core update for proxy --- src/deluge_core.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 98e51243b..03ec6689b 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -1311,15 +1311,32 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args) char *server, *login, *pasw; int portnum; libtorrent::proxy_settings::proxy_type proxytype; + bool peerproxy, webseedproxy, trackerproxy, dhtproxy; - PyArg_ParseTuple(args, "sssii", &server, &login, &pasw, &portnum, &proxytype); + PyArg_ParseTuple(args, "sssii", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &webseedproxy, &trackerproxy, &dhtproxy); M_proxy_settings->type = proxytype; M_proxy_settings->username = login; M_proxy_settings->password = pasw; M_proxy_settings->hostname = server; M_proxy_settings->port = portnum; - + + if (peerproxy){ + M_ses->set_peer_proxy(*M_proxy_settings) + } + + if (webseedproxy){ + M_ses->set_web_seed_proxy(*M_proxy_settings) + } + + if (trackerproxy){ + M_ses->set_tracker_proxy(*M_proxy_settings) + } + + if (dhtproxy){ + M_ses->set_dht_proxy(*M_proxy_settings) + } + Py_INCREF(Py_None); return Py_None; }