Split proxy settings

pull/16/merge
inpos 2017-12-09 15:01:45 +03:00
parent d9d3b05cd7
commit ef77358fd6
4 changed files with 7 additions and 4 deletions

View File

@ -20,8 +20,8 @@
import abc
import sys
proxy = int(sys.modules["__main__"].__settings__.getSetting("proxy"))
if proxy == 2:
proxy = int(sys.modules["__main__"].__settings__.getSetting("cl_proxy"))
if proxy == 1:
import socket
from resources import socks
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)

View File

@ -44,7 +44,8 @@
<string id="30044">Save files</string>
<string id="30045">Ask to save</string>
<string id="30046">Torrent2HTTP (libtorrent via http)</string>
<string id="30047">Proxy</string>
<string id="30047">Proxy for Search</string>
<string id="31047">Proxy for Content Lists</string>
<string id="30048">None</string>
<string id="30049">Anti-zapret</string>
<string id="31050">Tor</string>

View File

@ -44,7 +44,8 @@
<string id="30044">Сохранять файлы</string>
<string id="30045">Спросить о сохранении</string>
<string id="30046">Torrent2HTTP (libtorrent по http)</string>
<string id="30047">Прокси</string>
<string id="30047">Прокси для поиска</string>
<string id="31047">Прокси для списков медиа</string>
<string id="30048">Не использовать</string>
<string id="30049">Anti-zapret</string>
<string id="31050">Tor</string>

View File

@ -13,6 +13,7 @@
<setting id="search_phrase" type="text" label="30040"/>
<setting id="num_threads" type="slider" label="30042" default="3" range="1,1,9" option="int"/>
<setting id="proxy" type="enum" lvalues="30048|30049|31050" label="30047" default="0"/>
<setting id="cl_proxy" type="enum" lvalues="30048|31050" label="31047" default="0"/>
<setting id="debug" type="bool" label="30015" default="false"/>
</category>
<category label="30102">