MCPcopy
hub / github.com/Jrohy/multi-v2ray / modify

Function modify

v2ray_util/config_modify/tls.py:84–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 return True
83
84def modify():
85 gs = GroupSelector(_('modify tls'))
86 group = gs.group
87
88 if group == None:
89 pass
90 else:
91 if type(group.node_list[0]) == Mtproto or type(group.node_list[0]) == SS:
92 print(_("MTProto/Shadowsocks protocol not support https!!!"))
93 print("")
94 return
95 tm = TLSModifier(group.tag, group.index)
96 tls_status = 'open' if group.tls == 'tls' else 'close'
97 print("{}: {}\n".format(_("group tls status"), tls_status))
98 print(_("1.open TLS"))
99 print(_("2.close TLS"))
100 choice = readchar(_("please select: "))
101 if not choice:
102 return
103 if not choice in ("1", "2"):
104 print(_("input error, please input again"))
105 return
106
107 if choice == '1':
108 tm.turn_on()
109 elif choice == '2':
110 tm.turn_off()

Callers

nothing calls this directly

Calls 5

turn_onMethod · 0.95
turn_offMethod · 0.95
GroupSelectorClass · 0.85
TLSModifierClass · 0.85
readcharFunction · 0.85

Tested by

no test coverage detected