deluge_core update for proxy
This commit is contained in:
parent
0b34410f37
commit
67c09ebf56
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue