Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
Optimize part of the logic code
Fix XTLS re-registering TLS state(Merged  From Jrohy's repo)
  • Loading branch information
Radium-bit committed May 22, 2022
1 parent a2568eb commit f8b8de1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion v2ray_util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '3.10.9.4'
__version__ = '3.10.9.6'

import sys
if "xray" in sys.argv[0]:
Expand Down
8 changes: 4 additions & 4 deletions v2ray_util/config_modify/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ def modify():
if group == None:
pass
else:
if type(group.node_list[0]) in (Mtproto, SS):
if type(group.node_list[0]) == Mtproto or type(group.node_list[0]) == SS:
print(_("MTProto/Shadowsocks protocol not support https!!!"))
print("")
return
tm = TLSModifier(group.tag, group.index)
tls_status = 'open' if group.tls == 'tls' or group.tls == 'xtls' else 'close'
xtls = True if group.tls == "xtls" else False
tm = TLSModifier(group.tag, group.index, xtls=xtls)
tls_status = 'open' if group.tls in ('tls', 'xtls') else 'close'
print("{}: {}\n".format(_("group tls status"), tls_status))
print("")
print(_("1.open TLS"))
print(_("2.close TLS"))
choice = readchar(_("please select: "))
Expand Down
3 changes: 2 additions & 1 deletion v2ray_util/util_core/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ def write_tls(self, status = False, xtls = False, *, crt_file=None, key_file=Non
if xtls:
self.part_json["streamSettings"]["security"] = "xtls"
self.part_json["streamSettings"]["xtlsSettings"] = tls_settings
del self.part_json["streamSettings"]["tlsSettings"]
if "tlsSettings" in self.part_json["streamSettings"]:
del self.part_json["streamSettings"]["tlsSettings"]
else:
self.part_json["streamSettings"]["security"] = "tls"
self.part_json["streamSettings"]["tlsSettings"] = tls_settings
Expand Down

0 comments on commit f8b8de1

Please sign in to comment.