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.
10 years ago
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.
10 years ago
clowwindy
ada97ab6d9
improve comments
10 years ago
clowwindy
1f8819f790
fix #270
10 years ago
clowwindy
6efb3d00e4
fix #264
10 years ago
clowwindy
bd22e3ef75
try every dll that matches by name in PATH
10 years ago
clowwindy
af6c6f3f23
also search lib* for library names
10 years ago
clowwindy
5c05a74727
fix a potential name conflict
10 years ago
clowwindy
53a7e4d0e4
remove print
10 years ago
clowwindy
f7316c0047
change logging level for UDP warning
10 years ago
clowwindy
4312eb9e58
add forbidden support for UDP and add tests
10 years ago
clowwindy
eb94bd1cc3
support forbidden iplist
10 years ago
clowwindy
80b8bd7014
remove M2Crypto completely
10 years ago
clowwindy
a4b0ea5b8f
fix find_library
10 years ago
clowwindy
e582b2b929
rename ctypes_* and remove salsa20-ctr
10 years ago
clowwindy
3d03dbf716
extract find_library
10 years ago
fa08c
ebfd1486d8
Removing the overhead of creating a new list per event
10 years ago
fa08c
6eadfca78e
Removing trailing whites
10 years ago
fa08c
3294a92a61
Search libcrypto.so in more locations
Some linux distro may store .so in some alternative locations. Now we
try harder to find them.
10 years ago
fa08c
18da3554ff
Minor fix: never use except: unless you reraise
10 years ago
peter
8b2deb01d8
Set default method as bytes.
Default method as string may cause false error report.
10 years ago
fa08c
176e97bb45
Fixing some minor issues
10 years ago
clowwindy
4598e09b78
now works on OpenWRT
10 years ago
clowwindy
0bc0117cd7
update help url
10 years ago
clowwindy
bac675d7f6
2015
10 years ago
clowwindy
291adf8b85
log client address
10 years ago
v3aqb
d91f7d85d4
Update ctypes_libsodium.py
10 years ago
clowwindy
e8501da271
fix vim
10 years ago
clowwindy
99c8bbafe7
fix fastopen and add a new test
10 years ago
clowwindy
30f4f78557
fix travis
10 years ago
clowwindy
5ea8403e56
fix daemon and add fastopen tests
10 years ago
clowwindy
be1d1d5032
add SIGINT in workers
10 years ago
clowwindy
536b7d1ee6
use SIGINT instead in tests
Conflicts:
tests/test.py
10 years ago
clowwindy
2b4c3619d6
reorder setsid and kill
10 years ago
clowwindy
dae2624b30
add setsid
10 years ago
clowwindy
35c3b0b41c
refine documentation
10 years ago
clowwindy
28347b685e
add unit test for daemon
10 years ago
clowwindy
134497c24f
implement daemon
10 years ago
clowwindy
7274c7ad96
fix comments
10 years ago
clowwindy
706a137b3f
fix typo
10 years ago
clowwindy
4b0b252953
improve comments
10 years ago
clowwindy
163992b98b
small fix
10 years ago
clowwindy
676bf9617b
fix key cache when just method changes
10 years ago
clowwindy
cbbc880f44
try to find the problem
10 years ago
clowwindy
810db996cd
disable M2Crypto on Python 3
10 years ago
clowwindy
3e503bf677
log method in encrypt unit test
10 years ago
clowwindy
1459282ae6
only test some ciphers
10 years ago
clowwindy
4d5d6c7c85
add unit tests in encrypt
10 years ago
clowwindy
134bf332a4
remove domain not existed test(causing time out)
10 years ago
clowwindy
e1f2046229
lint code
10 years ago