Skip to content

Commit

Permalink
5.5.5 support OpenWrt
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-X-Net committed Aug 8, 2023
1 parent 31638bb commit d9f8aca
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
32 changes: 18 additions & 14 deletions code/default/lib/noarch/front_base/openssl_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@
import sys

error_str = ""
try:
from .boringssl_wrap import SSLConnection, SSLContext, SSLCert
implementation = "BoringSSL"
except Exception as e:
error_str = "import boringssl except: %r;" % e
implementation = None

def init():
global implementation
try:
from .tlslite_wrap import SSLConnection, SSLContext, SSLCert
implementation = "TLSLite, import boringssl except:" + error_str
from .boringssl_wrap import SSLConnection, SSLContext, SSLCert
implementation = "BoringSSL"
return SSLConnection, SSLContext, SSLCert
except Exception as e:
error_str += "import tlslite except: %r;" % e
error_str = "import boringssl except: %r;" % e

if sys.version_info[0] == 3:
from .ssl_wrap import SSLConnection, SSLContext, SSLCert
if sys.version_info[0] == 3:
from .ssl_wrap import SSLConnection, SSLContext, SSLCert

implementation = "ssl, import tlslite except:" + error_str
else:
from .pyopenssl_wrap import SSLConnection, SSLContext, SSLCert
implementation = "OpenSSL, import tlslite except:" + error_str
implementation = "ssl, import tlslite except:" + error_str
else:
from .pyopenssl_wrap import SSLConnection, SSLContext, SSLCert
implementation = "OpenSSL, import tlslite except:" + error_str

return SSLConnection, SSLContext, SSLCert


SSLConnection, SSLContext, SSLCert = init()
2 changes: 1 addition & 1 deletion code/default/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.5.4
5.5.5
3 changes: 3 additions & 0 deletions code/default/x_tunnel/local/proxy_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,9 @@ def jwt_login(account, password, node):


def login_process():
if not g.session:
return

with login_lock:
if not (g.config.login_account and g.config.login_password):
xlog.debug("x-tunnel no account")
Expand Down

0 comments on commit d9f8aca

Please sign in to comment.