Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manyuser #1

Open
wants to merge 50 commits into
base: manyuser
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0edae70
Add fail2ban filter.
jackyyf Jun 20, 2015
a2edd6a
Merge pull request #361 from jackyyf/master
clowwindy Jun 21, 2015
1a62694
add udp source port test
clowwindy Jul 10, 2015
c34c994
fix UDP source port issue
clowwindy Jul 10, 2015
99b4121
fix problem when UDP client requesting both IPv4 and IPv6
clowwindy Jul 10, 2015
13a6bb0
cache DNS results in UDPRelay
clowwindy Jul 10, 2015
f55bd03
update CHANGES
clowwindy Jul 10, 2015
f7d69db
bump
clowwindy Jul 10, 2015
1bb0e51
refine tests
clowwindy Jul 11, 2015
2555aa8
PEP8 indent
cicku Jul 27, 2015
d95e5ce
Merge pull request #388 from cicku/patch-1
clowwindy Jul 27, 2015
4a8d077
optimize performance for multiple ports
clowwindy Aug 1, 2015
80102f3
fix pyflakes
clowwindy Aug 1, 2015
d319fab
fix asyncdns unit test
clowwindy Aug 1, 2015
e8b2946
fix workers
clowwindy Aug 1, 2015
111acf6
fix graceful restart and add unit test
clowwindy Aug 2, 2015
02120e3
optimize eventloop
clowwindy Aug 2, 2015
b28de8e
fix pyflakes
clowwindy Aug 2, 2015
177c639
fix graceful restart test
clowwindy Aug 2, 2015
d946ac8
skip graceful restart test on Jenkins
clowwindy Aug 2, 2015
999a541
update CHANGES
clowwindy Aug 2, 2015
4211184
remove unnecessary overwrite
clowwindy Aug 2, 2015
baad209
bump
clowwindy Aug 2, 2015
58df1d8
close poll object after loop stopped
clowwindy Aug 3, 2015
956199e
add control manager
clowwindy Aug 5, 2015
e08845d
fix manager
clowwindy Aug 5, 2015
9c3af61
add statistics
clowwindy Aug 5, 2015
d20a071
allow manager to bind on unix socket
clowwindy Aug 5, 2015
4f948b2
fix password type in udprelay
clowwindy Aug 5, 2015
a8ae8ab
add unit test for manager
clowwindy Aug 5, 2015
30efc30
fix pyflakes
clowwindy Aug 5, 2015
249bcc0
refine unit test
clowwindy Aug 5, 2015
5ed73c1
bump 2.8
clowwindy Aug 5, 2015
583b54f
update CHANGES
clowwindy Aug 6, 2015
3576b30
support IPv6 on control socket
clowwindy Aug 6, 2015
77f9979
Update CONTRIBUTING.md
clowwindy Aug 6, 2015
c8b3f71
respond ok to add and remove commands
clowwindy Aug 6, 2015
f04e268
bump 2.8.1
clowwindy Aug 6, 2015
c5dd081
Update README.md
clowwindy Aug 8, 2015
3c11549
fix json unicode issue in manager
clowwindy Aug 9, 2015
a434eef
fix json decode issue
clowwindy Aug 10, 2015
7c08101
update CHANGES
clowwindy Aug 10, 2015
a2bc6e1
fix #414
clowwindy Aug 11, 2015
f19d0ea
fix #425
clowwindy Aug 15, 2015
eb033a8
Update README.md
clowwindy Aug 16, 2015
0c4f792
allow user to override system dnsserver with config.
May 11, 2015
ffed9b2
dns_server config test
Aug 17, 2015
e52aa9d
Merge pull request #335 from slayercat/master
clowwindy Aug 17, 2015
61a0b2d
Update README.md
clowwindy Aug 17, 2015
5b450ac
Update README.md
clowwindy Aug 20, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refine unit test
clowwindy committed Aug 5, 2015
commit 249bcc0b2910c6832ad1ae9b4964e362a915e223
15 changes: 8 additions & 7 deletions shadowsocks/manager.py
Original file line number Diff line number Diff line change
@@ -186,14 +186,14 @@ def run(config):
def test():
import time
import threading
import os
import struct
from shadowsocks import encrypt

logging.basicConfig(level=logging.DEBUG,
logging.basicConfig(level=5,
format='%(asctime)s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
enc = []
eventloop.TIMEOUT_PRECISION = 1

def run_server():
config = {
@@ -213,8 +213,9 @@ def run_server():
enc.append(manager)
manager.run()

threading.Thread(target=run_server).start()
time.sleep(2)
t = threading.Thread(target=run_server)
t.start()
time.sleep(1)
manager = enc[0]
cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cli.connect(('127.0.0.1', 6001))
@@ -236,9 +237,8 @@ def run_server():
tcp_cli = socket.socket()
tcp_cli.connect(('127.0.0.1', 7001))
tcp_cli.send(data)
rdata = tcp_cli.recv(4096)
tcp_cli.recv(4096)
tcp_cli.close()
rdata = encrypt.encrypt_all(b'1234', 'aes-256-cfb', 0, rdata)

data, addr = cli.recvfrom(1506)
data = common.to_str(data)
@@ -264,7 +264,8 @@ def run_server():
assert '8382' in stats
logging.info('UDP statistics test passed')

os._exit(0)
manager._loop.stop()
t.join()


if __name__ == '__main__':