Revert "Added proxy options to network dialog"
This reverts commit 83bb644135.
This commit is contained in:
@@ -29,7 +29,7 @@ DEFAULT_SERVERS = [ 'ecdsa.org:50001:t',
|
||||
'uncle-enzo.info:50001:t',
|
||||
'electrum.bytesized-hosting.com:50001:t'] # list of default servers
|
||||
|
||||
proxy_modes = ['none', 'socks4', 'socks5', 'http' ]
|
||||
proxy_modes = ['off', 'socks4', 'socks5', 'http' ]
|
||||
|
||||
def replace_keys(obj, old_key, new_key):
|
||||
if isinstance(obj, dict):
|
||||
@@ -192,7 +192,7 @@ class HttpStratumInterface(PollingInterface):
|
||||
def send(self, messages):
|
||||
import urllib2, json, time, cookielib
|
||||
|
||||
if self.proxy["mode"] != "none":
|
||||
if self.proxy["mode"] != "off":
|
||||
import socks
|
||||
socks.setdefaultproxy(proxy_modes.index(self.proxy["mode"]), self.proxy["host"], int(self.proxy["port"]) )
|
||||
socks.wrapmodule(urllib2)
|
||||
@@ -260,7 +260,7 @@ class TcpStratumInterface(Interface):
|
||||
|
||||
def init_socket(self):
|
||||
global proxy_modes
|
||||
if self.proxy["mode"] == "none":
|
||||
if self.proxy["mode"] == "off":
|
||||
self.s = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
|
||||
else:
|
||||
import socks
|
||||
@@ -460,7 +460,6 @@ class WalletSynchronizer(threading.Thread):
|
||||
if self.loop:
|
||||
time.sleep(5)
|
||||
# Server has been changed. Copy callback for new interface.
|
||||
self.proxy = self.interface.proxy
|
||||
self.init_interface()
|
||||
self.start_interface()
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user