Fix for importing libs before monkey patching breaks tor support
This commit is contained in:
parent
c565a12fc3
commit
f58aa5f78e
2 changed files with 5 additions and 10 deletions
|
@ -3,15 +3,12 @@
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
import urllib2
|
||||
|
||||
import logging
|
||||
|
||||
# Third party modules
|
||||
import gevent
|
||||
from gevent import monkey
|
||||
|
||||
# ZeroNet modules
|
||||
import logging
|
||||
|
||||
update_after_shutdown = False # If set True then update and restart zeronet after main loop ended
|
||||
|
||||
|
@ -68,7 +65,7 @@ logging.debug("Config: %s" % config)
|
|||
# Socks Proxy monkey patch
|
||||
if config.proxy:
|
||||
from util import SocksProxy
|
||||
|
||||
import urllib2
|
||||
logging.info("Patching sockets to socks proxy: %s" % config.proxy)
|
||||
config.fileserver_ip = '127.0.0.1' # Do not accept connections anywhere but localhost
|
||||
SocksProxy.monkeyPath(*config.proxy.split(":"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue