Update t.sh

Former-commit-id: 0388e4dd6f2c016b754feba9e80ea3b07c0c1c09
This commit is contained in:
fscarmen
2021-11-12 22:56:11 +08:00
committed by GitHub
parent d509ef3ce4
commit 11bc5e68d7
+4 -4
View File
@@ -103,14 +103,12 @@ reading(){
[[ $LANGUAGE != 2 ]] && T98="1. WGCF WARP account\n 2. WARP Linux Client account\n Choose:" || T98="1. WGCF WARP 账户\n 2. WARP Linux Client 账户\n 请选择:"
[[ $LANGUAGE != 2 ]] && T101="Client doesn't support architecture ARM64. The script is aborted. Feedback: [https://github.com/fscarmen/warp/issues]" || T101="Client 不支持 ARM64,问题反馈:[https://github.com/fscarmen/warp/issues]"
[[ $LANGUAGE != 2 ]] && T102="Please customize the WARP+ device name (It will automatically generate 6-digit random string if it is blank):" || T102="请自定义 WARP+ 设备名 (如果不输入,会自动生成随机的6位字符串):"
[[ $LANGUAGE != 2 ]] && T103="Port is in use. Please input another Port:" || T103="端口占用中,请使用另一端口:"
[[ $LANGUAGE != 2 ]] && T104="Please customize the Client port (It must be 4-5 digits. Default to 40000 if it is blank):" || T104="请自定义 Client 端口号 (必须为4-5位自然数,如果不输入,会默认40000):"
[[ $LANGUAGE != 2 ]] && T105="Please choose the priority of IPv4 or IPv6 (default 1.IPv4):\n 1.IPv4\n 2.IPv6\n 3.Restore initial settings\n Choose:" || T105="请选择优先级别 (默认 1.IPv4):\n 1.IPv4\n 2.IPv6\n 3.还原 VPS 初始设置\n 请选择:"
[[ $LANGUAGE != 2 ]] && T106="IPv6 priority" || T106="IPv6 优先"
[[ $LANGUAGE != 2 ]] && T107="IPv4 priority" || T107="IPv4 优先"
[[ $LANGUAGE != 2 ]] && T109="Socks5 Proxy Client on IPv4 VPS is working now. You can only choose the WARP IPv6 interface, please enter [y] to continue, and other keys to exit:" || T109="IPv4 only VPS,并且 Socks5 代理正在运行中,只能选择单栈方案,继续请输入 y,其他按键退出:"
[[ $LANGUAGE != 2 ]] && T110="Socks5 Proxy Client on native dualstack VPS is working now. WARP interface could not be installed. The script is aborted. Feedback: [https://github.com/fscarmen/warp/issues]" || T110="原生双栈 VPS,并且 Socks5 代理正在运行中。WARP 网络接口不能安装,脚本中止,问题反馈:[https://github.com/fscarmen/warp/issues]"
[[ $LANGUAGE != 2 ]] && T111="Port must be 4-5 digits. Please re-input:" || T111="端口必须为4-5位自然数,请重新输入:"
# 当前脚本版本号和新增功能
VERSION=2.10
@@ -397,7 +395,7 @@ input_license(){
i=5
until [[ -z $LICENSE || ${#LICENSE} = 26 ]]
do let i--
[[ $LANGUAGE != 2 ]] && T30="License should be 26 characters, please re-enter WARP+ License. Otherwise press Enter to continue. ($i times remaining)" || T30="License 应为26位字符,请重新输入 Warp+ License,没有可回车继续剩余$i次)"
[[ $LANGUAGE != 2 ]] && T30="License should be 26 characters, please re-enter WARP+ License. Otherwise press Enter to continue. ($i times remaining):" || T30="License 应为26位字符,请重新输入 Warp+ License,没有可回车继续(剩余$i次):"
[[ $i = 0 ]] && red " $T29 " && exit 1 || reading " $T30: " LICENSE
done
[[ $INPUT_LICENSE = 1 && -n $LICENSE && -z $NAME ]] && reading " $T102 " NAME
@@ -410,7 +408,7 @@ update_license(){
i=5
until [[ ${#LICENSE} = 26 ]]
do let i--
[[ $LANGUAGE != 2 ]] && T100="License should be 26 characters, please re-enter WARP+ License. Otherwise press Enter to continue. ($i times remaining): " || T62="License 应为26位字符,请重新输入 WARP+ License剩余$i次: "
[[ $LANGUAGE != 2 ]] && T100="License should be 26 characters, please re-enter WARP+ License. Otherwise press Enter to continue. ($i times remaining): " || T62="License 应为26位字符,请重新输入 WARP+ License (剩余$i次): "
[[ $i = 0 ]] && red " $T29 " && exit 1 || reading " $T100 " LICENSE
done
[[ $UPDATE_LICENSE = 1 && -n $LICENSE && -z $NAME ]] && reading " $T102 " NAME
@@ -425,6 +423,8 @@ input_port(){
until [[ $(echo $PORT | egrep "^[1-9][0-9]{3,4}$") && ! $(ss -nltp) =~ ":$PORT" ]]
do let i--
[[ $i = 0 ]] && red " $T29 " && exit 1
[[ $LANGUAGE != 2 ]] && T103="Port is in use. Please input another Port($i times remaining):" || T103="端口占用中,请使用另一端口(剩余$i次):"
[[ $LANGUAGE != 2 ]] && T111="Port must be 4-5 digits. Please re-input($i times remaining):" || T111="端口必须为4-5位自然数,请重新输入(剩余$i次):"
[[ ! $(echo $PORT | egrep "^[1-9][0-9]{3,4}$") ]] && reading " $T111 " PORT
[[ $(echo $PORT | egrep "^[1-9][0-9]{3,4}$") ]] && [[ $(ss -nltp) =~ ":$PORT" ]] && reading " $T103 " PORT
done