Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5179e018e2 | ||
|
|
af6c6f3f23 | ||
|
|
5c05a74727 | ||
|
|
53a7e4d0e4 | ||
|
|
5e476843ec |
@@ -1,4 +1,7 @@
|
||||
2.6.3 2015-01-03
|
||||
2.6.4 2015-01-14
|
||||
- Also search lib* when searching libraries
|
||||
|
||||
2.6.3 2015-01-12
|
||||
- Support --forbidden-ip to ban some IP, i.e. localhost
|
||||
- Search OpenSSL and libsodium harder
|
||||
- Now works on OpenWRT
|
||||
|
||||
@@ -7,7 +7,7 @@ with codecs.open('README.rst', encoding='utf-8') as f:
|
||||
|
||||
setup(
|
||||
name="shadowsocks",
|
||||
version="2.6.3",
|
||||
version="2.6.4",
|
||||
license='MIT',
|
||||
description="A fast tunnel proxy that help you get through firewalls",
|
||||
author='clowwindy',
|
||||
|
||||
@@ -27,7 +27,7 @@ import logging
|
||||
|
||||
|
||||
def find_library(possible_lib_names, search_symbol, library_name):
|
||||
from ctypes.util import find_library
|
||||
import ctypes.util
|
||||
from ctypes import CDLL
|
||||
|
||||
paths = []
|
||||
@@ -35,8 +35,13 @@ def find_library(possible_lib_names, search_symbol, library_name):
|
||||
if type(possible_lib_names) not in (list, tuple):
|
||||
possible_lib_names = [possible_lib_names]
|
||||
|
||||
for name in possible_lib_names:
|
||||
path = find_library(name)
|
||||
lib_names = []
|
||||
for lib_name in possible_lib_names:
|
||||
lib_names.append(lib_name)
|
||||
lib_names.append('lib' + lib_name)
|
||||
|
||||
for name in lib_names:
|
||||
path = ctypes.util.find_library(name)
|
||||
if path:
|
||||
paths.append(path)
|
||||
|
||||
@@ -46,7 +51,7 @@ def find_library(possible_lib_names, search_symbol, library_name):
|
||||
# tools underlying find_library on linux.
|
||||
import glob
|
||||
|
||||
for name in possible_lib_names:
|
||||
for name in lib_names:
|
||||
patterns = [
|
||||
'/usr/local/lib*/lib%s.*' % name,
|
||||
'/usr/lib*/lib%s.*' % name,
|
||||
@@ -106,10 +111,11 @@ def test_find_library():
|
||||
assert find_library('c', 'strcpy', 'libc') is not None
|
||||
assert find_library(['c'], 'strcpy', 'libc') is not None
|
||||
assert find_library(('c',), 'strcpy', 'libc') is not None
|
||||
assert find_library('crypto', 'EVP_CipherUpdate', 'libcrypto') is not None
|
||||
assert find_library(('crypto', 'eay32'), 'EVP_CipherUpdate',
|
||||
'libcrypto') is not None
|
||||
assert find_library('notexist', 'strcpy', 'libnotexist') is None
|
||||
assert find_library('c', 'symbol_not_exist', 'c') is None
|
||||
assert find_library(('notexist', 'c', 'crypto'),
|
||||
assert find_library(('notexist', 'c', 'crypto', 'eay32'),
|
||||
'EVP_CipherUpdate', 'libc') is not None
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@ class UDPRelay(object):
|
||||
self._closed = False
|
||||
self._last_time = time.time()
|
||||
self._sockets = set()
|
||||
print(config)
|
||||
if 'forbidden_ip' in config:
|
||||
self._forbidden_iplist = config['forbidden_ip']
|
||||
else:
|
||||
|
||||
+1
-1
@@ -90,7 +90,6 @@ try:
|
||||
|
||||
for fd in r:
|
||||
line = fd.readline()
|
||||
sys.stderr.write(line)
|
||||
if not line:
|
||||
if stage == 2 and fd == p3.stdout:
|
||||
stage = 3
|
||||
@@ -98,6 +97,7 @@ try:
|
||||
stage = 5
|
||||
if bytes != str:
|
||||
line = str(line, 'utf8')
|
||||
sys.stderr.write(line)
|
||||
if line.find('starting local') >= 0:
|
||||
local_ready = True
|
||||
if line.find('starting server') >= 0:
|
||||
|
||||
Reference in New Issue
Block a user