From 8dd9f707a6ef391aec2a6931d0a02d2fd9ace785 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 20 Nov 2023 20:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E4=BB=A4=E8=A1=8C=E5=BC=80=E5=90=AFip?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tools.py b/tools.py index 680b2b812..81c9f370f 100755 --- a/tools.py +++ b/tools.py @@ -58,6 +58,8 @@ def mwcli(mw_input=0): print("(13) 显示面板错误日志") print("(20) 关闭BasicAuth认证") print("(21) 解除域名绑定") + print("(22) 开启IPV6支持") + print("(23) 关闭IPV6支持") print("(100) 开启PHP52显示") print("(101) 关闭PHP52显示") print("(200) 切换Linux系统软件源") @@ -71,7 +73,7 @@ def mwcli(mw_input=0): except: mw_input = 0 - nums = [1, 2, 3, 4, 5, 10, 11, 12, 13, 20, 21, 100, 101, 200, 201] + nums = [1, 2, 3, 4, 5, 10, 11, 12, 13, 20, 21, 22, 23, 100, 101, 200, 201] if not mw_input in nums: print(raw_tip) print("已取消!") @@ -123,6 +125,22 @@ def mwcli(mw_input=0): os.remove(bind_domain) os.system(INIT_CMD + " unbind_domain") print("|-解除域名绑定成功") + elif mw_input == 22: + listen_ipv6 = 'data/ipv6.pl' + if not os.path.exists(listen_ipv6): + mw.writeFile(listen_ipv6,'True') + os.system(INIT_CMD + " restart") + print("|-开启IPv6支持了") + else: + print("|-已开启IPv6支持!") + elif mw_input == 23: + listen_ipv6 = 'data/ipv6.pl' + if not os.path.exists(listen_ipv6): + print("|-已关闭IPv6支持!") + else: + os.remove(listen_ipv6) + os.system(INIT_CMD + " restart") + print("|-关闭IPv6支持了") elif mw_input == 100: php_conf = 'plugins/php/info.json' if os.path.exists(php_conf):