|
@ -13,10 +13,10 @@ encrypt_salsa20.test() |
|
|
|
|
|
|
|
|
print 'encryption test passed' |
|
|
print 'encryption test passed' |
|
|
|
|
|
|
|
|
p1 = Popen(['python', 'shadowsocks/server.py', '-c', sys.argv[-1]], shell=False, |
|
|
p1 = Popen(['python', 'shadowsocks/server.py', '-c', sys.argv[-1]], stdin=PIPE, |
|
|
bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) |
|
|
stdout=PIPE, stderr=PIPE, close_fds=True) |
|
|
p2 = Popen(['python', 'shadowsocks/local.py', '-c', sys.argv[-1]], shell=False, |
|
|
p2 = Popen(['python', 'shadowsocks/local.py', '-c', sys.argv[-1]], stdin=PIPE, |
|
|
bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) |
|
|
stdout=PIPE, stderr=PIPE, close_fds=True) |
|
|
p3 = None |
|
|
p3 = None |
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
@ -39,10 +39,9 @@ try: |
|
|
if local_ready and server_ready and p3 is None: |
|
|
if local_ready and server_ready and p3 is None: |
|
|
time.sleep(1) |
|
|
time.sleep(1) |
|
|
p3 = Popen(['curl', 'http://www.example.com/', '-v', '-L', |
|
|
p3 = Popen(['curl', 'http://www.example.com/', '-v', '-L', |
|
|
'--socks5-hostname', '127.0.0.1:1081'], shell=False, |
|
|
'--socks5-hostname', '127.0.0.1:1081'], close_fds=True) |
|
|
bufsize=0, close_fds=True) |
|
|
|
|
|
break |
|
|
break |
|
|
|
|
|
|
|
|
if p3 is not None: |
|
|
if p3 is not None: |
|
|
r = p3.wait() |
|
|
r = p3.wait() |
|
|
if r == 0: |
|
|
if r == 0: |
|
|