Rev1913, Support local address other than 127.0.0.1

This commit is contained in:
shortcutme 2017-02-16 20:56:07 +01:00
parent 39734dfadb
commit d57d82f439
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
6 changed files with 20 additions and 11 deletions

View file

@ -1,10 +1,10 @@
import socket
from lib.PySocks import socks
from Config import config
def create_connection(address, timeout=None, source_address=None):
if address == "127.0.0.1":
if address in config.ip_local:
sock = socket.socket_noproxy(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(address)
else: