Browse Source

fix ctrl C

auth
clowwindy 11 years ago
parent
commit
2672a6378e
  1. 5
      shadowsocks/server.py
  2. 2
      test/aes.json
  3. 2
      test/salsa20.json
  4. 2
      test/server-multi-passwd.json
  5. 2
      test/table.json
  6. 2
      test/workers.json

5
shadowsocks/server.py

@ -66,6 +66,11 @@ def main():
tcp_server.start() tcp_server.start()
for udp_server in udp_servers: for udp_server in udp_servers:
udp_server.start() udp_server.start()
try:
while sys.stdin.read():
pass
except KeyboardInterrupt:
os._exit(0)
if int(config['workers']) > 1: if int(config['workers']) > 1:
if os.name == 'posix': if os.name == 'posix':

2
test/aes.json

@ -1,7 +1,7 @@
{ {
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1080, "local_port":1081,
"password":"barfoo!", "password":"barfoo!",
"timeout":300, "timeout":300,
"method":"aes-256-cfb", "method":"aes-256-cfb",

2
test/salsa20.json

@ -1,7 +1,7 @@
{ {
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1080, "local_port":1081,
"password":"barfoo!", "password":"barfoo!",
"timeout":300, "timeout":300,
"method":"salsa20-ctr", "method":"salsa20-ctr",

2
test/server-multi-passwd.json

@ -1,7 +1,7 @@
{ {
"server": "127.0.0.1", "server": "127.0.0.1",
"server_port": 8384, "server_port": 8384,
"local_port": 1080, "local_port": 1081,
"password": "foobar4", "password": "foobar4",
"port_password": { "port_password": {
"8381": "foobar1", "8381": "foobar1",

2
test/table.json

@ -1,7 +1,7 @@
{ {
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1080, "local_port":1081,
"password":"barfoo!", "password":"barfoo!",
"timeout":300, "timeout":300,
"method":"table", "method":"table",

2
test/workers.json

@ -1,7 +1,7 @@
{ {
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1080, "local_port":1081,
"password":"barfoo!", "password":"barfoo!",
"timeout":300, "timeout":300,
"method":"aes-256-cfb", "method":"aes-256-cfb",

Loading…
Cancel
Save