Commit Graph
318 Commits
Author SHA1 Message Date
breakwa11 469d9f7bfa merge master 2015-07-14 19:02:52 +08:00
breakwa11 69d369268a update run.sh, set working dir 2015-07-09 16:42:46 +08:00
breakwa11 f78f5b56e3 client_key change 2015-07-02 15:21:05 +08:00
breakwa11 3af426b13b remove tail 2015-06-30 15:34:02 +08:00
breakwa11 543a5903a1 encrypt speed test 2015-06-26 11:33:59 +08:00
breakwa11 ad588af75f single user script 2015-06-24 12:56:46 +08:00
breakwa11 d4ca0d281c always UDP on
random length TCP/UDP packet
2015-06-23 17:43:20 +08:00
breakwa11 28318b5c1a double UDP sockets for IPv4 and IPv6 2015-06-20 18:59:20 +08:00
breakwa11 1f530ff8f1 fix udp ipv6 2015-06-20 17:56:33 +08:00
breakwa11 17122c299c fix udp ipv6 2015-06-16 21:55:36 +08:00
breakwa11 4b52f83376 udp ipv6 2015-06-16 13:10:43 +08:00
breakwa11 07dc98f60d udp fix sendto argv 2015-06-16 13:00:30 +08:00
breakwa11 565812ae15 elaborate reasons of header parsing failure 2015-06-11 01:07:54 +08:00
breakwa11 1e71fba852 drop UDP message if frag != 0 2015-06-10 14:21:22 +08:00
breakwa11 c27f6283a2 UDP remote DNS resolve 2015-06-09 23:59:49 +08:00
breakwa11 f2efed9608 add manyuser branch
support udp over tcp
support chacha20 & salsa20 (base on libsodium)
2015-06-08 20:03:10 +08:00
clowwindy e74ae193d0 elaborate reasons of header parsing failure 2015-06-08 08:29:01 +08:00
clowwindy 16db66675b optimize LRUCache 2015-05-19 08:35:28 +08:00
clowwindy 082c8a80f4 fix duplicated close in LRUCache
close #324
2015-05-19 08:14:47 +08:00
Kim Wong e17279e5bf remove duplicated line (refer line 221) 2015-03-14 07:35:43 +08:00
lazybios d3831bef8c remove duplicate code from shell.py 2015-03-01 14:14:35 +08:00
Felix Yan edb7822a7b convert remote_address to str so it will be printed more correctly on python 3 2015-02-11 10:40:20 +08:00
clowwindy d774286dc0 rename utils module into shell
Since utils is ambiguous, we want to give the module a more
clear role.
2015-02-10 17:26:10 +08:00
clowwindy cb7062e1c1 implement utils.print_exception()
Previously we used logging.error(e) and traceback.print_exc()
to output error stack trace. The problem is, we want to
output the stack trace only when verbose > 0. The if statement
scattered around the code. So we replaced them with the new
utils.print_exception() call.
2015-02-10 17:21:29 +08:00
clowwindy dfd81af844 support --version 2015-02-09 14:43:11 +08:00
clowwindy 783a6ef7f2 support multiple server ip on client side 2015-02-09 13:50:46 +08:00
clowwindy e71ce6c758 fix server check 2015-02-03 18:45:36 +08:00
clowwindy e564f17505 fix bytes in utils 2015-02-03 18:23:22 +08:00
clowwindy 6d09cd21ca fix openssl 2015-02-03 18:13:01 +08:00
clowwindy 318d88ec89 use string more 2015-02-03 18:09:07 +08:00
clowwindy ce805f0aea license under Apache License v2.0 2015-02-03 14:10:36 +08:00
clowwindy 0cd261dd10 catch KeyError 2015-02-02 16:22:56 +08:00
clowwindy 1c81465436 fix command line 2015-02-02 15:57:44 +08:00
clowwindy 73f21ffbf6 do not check config for daemon stop 2015-02-02 15:50:41 +08:00
clowwindy 7aa37cad8e check cipher before daemon start
fix #280
2015-02-02 15:46:22 +08:00
clowwindy ae99698b4e implement --user
fix @278
2015-02-02 15:38:55 +08:00
clowwindy 453a9c61a6 show CIDR error more friendly 2015-02-01 09:09:35 +08:00
Sunny a0aa9173a8 Fix for Python3 map changed behavior
In Python3, map returns an iterator instead of list in Python2,
which cause map "lazier" than before, wrap with list() force it running.
2015-02-01 02:37:30 +08:00
Sunny 79b9b53dbe Never process empty string and prevent infinite loop
If user provide an empty string as network range, inet_pton will
treate it as an IPv6 unspecified address, it seems a bug but I
can't confirm. Then empty string will be converted to 0, 0 & 1
always be zero, so it caused dead loop.
2015-02-01 01:57:17 +08:00
Sunny 070108f78b Disable forbidden ip feature for local shadowsocks
Since forbidden ip is server-side only, disable it for local-side.
This commit also supress warning about IPv6 loopback because I can
confirm ::1/128 is the only loopback address, not like IPv4.
2015-02-01 01:34:23 +08:00
Sunny b11d848986 Fix for Python3 lambda behavior change
In Python3, lambda no longer support use tuple as syntax.
So, ugly changes is inevitable.
2015-02-01 01:34:18 +08:00
Sunny aa28796524 Make common fit PEP8 2015-02-01 01:34:13 +08:00
Sunny 8af359ae05 Use IPNetwork supporting forbidden ip feature in config utils
This commit also make "forbidden_ip" field available in config file.
If no forbidden ip specified in command line and config file,
default to "127.0.0.0/8,::1".
2015-01-31 22:56:23 +08:00
Sunny 100ebcf064 Add IPNetwork class to support CIDR calculation
Usage:
Use IPNetwork(str|list<str>) to create an IPNetwork object.
Use operator 'in' to determine whether the specified
IP address is in the IP network or not, like:
>>> '192.168.1.1' in IPNetwork('192.168.1.0/24')
True

Both IPv4 and IPv6 address are supported.
Note: When using string to initialize the IPNetwork,
a comma seperated IP network list should be provided.

Currently, IPNetwork just support standard CIDR like:
x.x.x.x/y eg. 192.168.1.0/24
::x/y     eg. ::1/10
If pure IP address was provided,
it will be treated as implicit IP network,
like 192.168.0.0 will be treated as 192.168.0.0/16
and  192.168.1.1 will be treated as 192.168.1.1/32
This implicit translate may cause some unexpected behavior,
like user provide 192.168.2.0 and expect it will be treated as
192.168.2.0/24 but actually it will be translated to
192.168.2.0/23 because there are 9 continuous 0 from right.
In order to avoid confusion, a warning message
will be displayed when pure IP address was provided.

Other variants of CIDR are not supported yet.
2015-01-31 22:56:16 +08:00
Sunny 8783e0e9ae Move is_ip from asyncdns to common
Since implement CIDR forbidden need this function,
move it to common file seems to be a better choice.
2015-01-31 22:56:09 +08:00
clowwindy ada97ab6d9 improve comments 2015-01-31 02:58:40 +08:00
clowwindy 1f8819f790 fix #270 2015-01-23 17:33:48 +08:00
clowwindy 6efb3d00e4 fix #264 2015-01-16 18:52:40 +08:00
clowwindy bd22e3ef75 try every dll that matches by name in PATH 2015-01-16 16:50:18 +08:00
clowwindy af6c6f3f23 also search lib* for library names 2015-01-14 12:59:43 +08:00