diff --git a/sys/config.py b/sys/config.py index 5e1b109..591cfba 100644 --- a/sys/config.py +++ b/sys/config.py @@ -32,6 +32,12 @@ try: PIDFILE = cp.get("General","PIDFILE") except: PIDFILE = 'pid' +try: + IP = cp.get("General","IP") +except: + IP = '127.0.0.1' + + try: S5B_PROXY = cp.get("General","PROXY") except: diff --git a/sys/util.py b/sys/util.py index 2e303ab..8e1c519 100644 --- a/sys/util.py +++ b/sys/util.py @@ -3,6 +3,7 @@ import select import socket import threading import random +import config from Queue import Queue, Empty MAGIC_PACKET = "" @@ -77,7 +78,7 @@ def get_local_ip(): try: address = queue.get(False) except Empty: - pass - else: + address = [config.IP] + finally: waiting = False return address[0]