This commit is contained in:
v3aqb 2013-11-12 13:00:49 -08:00
commit cc0add4976
2 changed files with 22 additions and 10 deletions

View file

@ -179,7 +179,13 @@ def main():
with open(config_path, 'rb') as f:
config = json.load(f)
else:
config = {}
config = {"server": "127.0.0.1",
"server_port": 8388,
"local_port": 1080,
"password": "barfoo!",
"timeout": 600,
"method": "table"
}
optlist, args = getopt.getopt(sys.argv[1:], 's:b:p:k:l:m:c:6')
for key, value in optlist:

View file

@ -39,7 +39,6 @@ import socket
import select
import SocketServer
import struct
import os
import logging
import getopt
import encrypt
@ -124,6 +123,7 @@ class Socks5Server(SocketServer.StreamRequestHandler):
except socket.error, e:
logging.warn(e)
def main():
global SERVER, PORT, KEY, METHOD, IPv6
@ -154,7 +154,13 @@ def main():
config = json.load(f)
logging.info('loading config from %s' % config_path)
else:
config = {}
config = {"server": "127.0.0.1",
"server_port": 8388,
"local_port": 1080,
"password": "barfoo!",
"timeout": 600,
"method": "table"
}
optlist, args = getopt.getopt(sys.argv[1:], 's:p:k:m:c:6')
for key, value in optlist: