Skip to content

Commit d9f8aca

Browse files
committed
5.5.5 support OpenWrt
1 parent 31638bb commit d9f8aca

3 files changed

Lines changed: 22 additions & 15 deletions

File tree

code/default/lib/noarch/front_base/openssl_wrap.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,26 @@
99
import sys
1010

1111
error_str = ""
12-
try:
13-
from .boringssl_wrap import SSLConnection, SSLContext, SSLCert
14-
implementation = "BoringSSL"
15-
except Exception as e:
16-
error_str = "import boringssl except: %r;" % e
12+
implementation = None
1713

14+
def init():
15+
global implementation
1816
try:
19-
from .tlslite_wrap import SSLConnection, SSLContext, SSLCert
20-
implementation = "TLSLite, import boringssl except:" + error_str
17+
from .boringssl_wrap import SSLConnection, SSLContext, SSLCert
18+
implementation = "BoringSSL"
19+
return SSLConnection, SSLContext, SSLCert
2120
except Exception as e:
22-
error_str += "import tlslite except: %r;" % e
21+
error_str = "import boringssl except: %r;" % e
2322

24-
if sys.version_info[0] == 3:
25-
from .ssl_wrap import SSLConnection, SSLContext, SSLCert
23+
if sys.version_info[0] == 3:
24+
from .ssl_wrap import SSLConnection, SSLContext, SSLCert
2625

27-
implementation = "ssl, import tlslite except:" + error_str
28-
else:
29-
from .pyopenssl_wrap import SSLConnection, SSLContext, SSLCert
30-
implementation = "OpenSSL, import tlslite except:" + error_str
26+
implementation = "ssl, import tlslite except:" + error_str
27+
else:
28+
from .pyopenssl_wrap import SSLConnection, SSLContext, SSLCert
29+
implementation = "OpenSSL, import tlslite except:" + error_str
30+
31+
return SSLConnection, SSLContext, SSLCert
32+
33+
34+
SSLConnection, SSLContext, SSLCert = init()

code/default/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.5.4
1+
5.5.5

code/default/x_tunnel/local/proxy_session.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,9 @@ def jwt_login(account, password, node):
10491049

10501050

10511051
def login_process():
1052+
if not g.session:
1053+
return
1054+
10521055
with login_lock:
10531056
if not (g.config.login_account and g.config.login_password):
10541057
xlog.debug("x-tunnel no account")

0 commit comments

Comments
 (0)