Update On Tue Aug 26 20:39:24 CEST 2025

This commit is contained in:
github-action[bot]
2025-08-26 20:39:24 +02:00
parent 0c4b81ed2f
commit 7518b3dffc
76 changed files with 1043 additions and 834 deletions

View File

@@ -47,12 +47,42 @@ _lang = ''
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument('--lang', type=str, default='en', help='language')
parser.add_argument('--uninstall', action='store_true', help='uninstall mita proxy server')
args = parser.parse_args()
global _lang
_lang = args.lang
sys_info = SysInfo()
if args.uninstall:
if not sys_info.is_mita_installed:
if _lang == ZH:
print('mita 代理服务器软件尚未安装。')
else:
print('mita proxy server is not installed.')
return
uninstall_prompt = '''
[uninstall mita]
mita proxy server is installed.
Type "y" to uninstall mita proxy server and delete configuration.
Type any other character to exit.
(default is "n")
>>> '''
if _lang == ZH:
uninstall_prompt = '''
[卸载 mita]
已经安装 mita 代理服务器。
输入 "y" 卸载 mita 代理服务器并删除配置。
输入其他任意字符退出。
(默认值是 "n")
>>> '''
uninstall, _ = check_input(prompt=uninstall_prompt, validator=any_validator(), default='n')
if uninstall != 'y':
return
uninstaller = Uninstaller()
uninstaller.uninstall_mita(sys_info)
return
if not sys_info.is_mita_installed:
install_prompt = '''
[install mita]
@@ -186,27 +216,10 @@ Type any other character to exit.
configurer.build_client_configuration()
return # exit after configuration is successful
if sys_info.is_mita_installed:
uninstall_prompt = '''
[uninstall mita]
mita proxy server is installed.
Type "y" to uninstall mita proxy server and delete configuration.
Type any other character to exit.
(default is "n")
>>> '''
if _lang == ZH:
uninstall_prompt = '''
[卸载 mita]
已经安装 mita 代理服务器。
输入 "y" 卸载 mita 代理服务器并删除配置。
输入其他任意字符退出。
(默认值是 "n")
>>> '''
uninstall, _ = check_input(prompt=uninstall_prompt, validator=any_validator(), default='n')
if uninstall != 'y':
return
uninstaller = Uninstaller()
uninstaller.uninstall_mita(sys_info)
if _lang == ZH:
print('mita 代理服务器安装与配置成功。')
else:
print('mita proxy server is installed and configured successfully.')
class SysInfo: