deluge_core update for proxy
This commit is contained in:
parent
0b34410f37
commit
67c09ebf56
|
@ -1311,8 +1311,9 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
|
||||||
char *server, *login, *pasw;
|
char *server, *login, *pasw;
|
||||||
int portnum;
|
int portnum;
|
||||||
libtorrent::proxy_settings::proxy_type proxytype;
|
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->type = proxytype;
|
||||||
M_proxy_settings->username = login;
|
M_proxy_settings->username = login;
|
||||||
|
@ -1320,6 +1321,22 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
|
||||||
M_proxy_settings->hostname = server;
|
M_proxy_settings->hostname = server;
|
||||||
M_proxy_settings->port = portnum;
|
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;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue