Merge branch 'master' of https://github.com/HelloZeroNet/ZeroNet
This commit is contained in:
commit
abb566e35f
2 changed files with 15 additions and 1 deletions
|
@ -172,7 +172,13 @@ class SiteAnnouncer(object):
|
|||
if "://" not in tracker or not re.match("^[A-Za-z0-9:/\\.#-]+$", tracker):
|
||||
return None
|
||||
protocol, address = tracker.split("://", 1)
|
||||
try:
|
||||
ip, port = address.rsplit(":", 1)
|
||||
except ValueError as err:
|
||||
ip = address
|
||||
port = 80
|
||||
if protocol.startswith("https"):
|
||||
port = 443
|
||||
back = {}
|
||||
back["protocol"] = protocol
|
||||
back["address"] = address
|
||||
|
|
|
@ -32,6 +32,14 @@ def getLibraryPath():
|
|||
except Exception, err:
|
||||
logging.debug("OpenSSL lib not found in: %s (%s)" % (lib_dir, err))
|
||||
|
||||
if "LD_LIBRARY_PATH" in os.environ:
|
||||
lib_dir_paths = os.environ["LD_LIBRARY_PATH"].split(":")
|
||||
for path in lib_dir_paths:
|
||||
try:
|
||||
return [lib for lib in os.listdir(path) if "libcrypto.so.1.0" in lib][0]
|
||||
except Exception, err:
|
||||
logging.debug("OpenSSL lib not found in: %s (%s)" % (path, err))
|
||||
|
||||
return (
|
||||
ctypes.util.find_library('ssl.so.1.0') or ctypes.util.find_library('ssl') or
|
||||
ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32'
|
||||
|
|
Loading…
Reference in a new issue