Skip to content

Commit 6c48e97

Browse files
author
Toyo
authored
Add files via upload
1 parent bf0934e commit 6c48e97

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

mtproxy.sh

+14-6
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,20 @@ Set_port(){
175175
done
176176
}
177177
Set_passwd(){
178-
echo "请输入 MTProxy 密匙(手动输入必须为32位,[0-9][a-z][A-Z],建议随机生成)"
179-
stty erase '^H' && read -p "(默认:随机生成):" mtp_passwd
180-
[[ -z "${mtp_passwd}" ]] && mtp_passwd=$(date +%s%N | md5sum | head -c 32)
181-
echo && echo "========================"
182-
echo -e " 密码 : ${Red_background_prefix} dd${mtp_passwd} ${Font_color_suffix}"
183-
echo "========================" && echo
178+
while true
179+
do
180+
echo "请输入 MTProxy 密匙(手动输入必须为32位,[0-9][a-z][A-Z],建议随机生成)"
181+
stty erase '^H' && read -p "(避免出错,强烈推荐随机生成,直接回车):" mtp_passwd
182+
if [[ -z "${mtp_passwd}" ]]; then
183+
mtp_passwd=$(date +%s%N | md5sum | head -c 32)
184+
else
185+
[[ ${#mtp_passwd} != 32 ]] && echo -e "${Error} 请输入正确的密匙(32位字符)。" && continue
186+
fi
187+
echo && echo "========================"
188+
echo -e " 密码 : ${Red_background_prefix} dd${mtp_passwd} ${Font_color_suffix}"
189+
echo "========================" && echo
190+
break
191+
done
184192
}
185193
Set_tag(){
186194
echo "请输入 MTProxy 的 TAG标签(TAG标签只有在通过官方机器人 @MTProxybot 分享代理账号后才会获得,不清楚请留空回车)"

pac_get.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ var ipv6_proxy = function(){ return nowall_proxy(); };
2525
*/
2626
2727
/*
28-
* Copyright (C) 2017 Toyo
29-
* https://softs.fun/Other/pac.txt
28+
* Copyright (C) 2017-2018 Toyo
29+
* https://softs.loan/Other/pac.txt
3030
*/
3131
3232
var rules = [
@@ -869,4 +869,4 @@ PAC_BASE64=$(urlsafe_base64_d "${PAC_TEXT}"|grep -v "!"|sed '1d;s/\\/\\\\/g;/^\s
869869
PAC_NUM=$(echo "${PAC_BASE64}"|wc -l)
870870
echo "${PAC_TAME}${PAC_prefix}${PAC_BASE64}${PAC_suffix}" > "${Output_URL}"
871871
sed -i 's/$/\r/' "${Output_URL}"
872-
echo "${PAC_NUM}"
872+
echo "${PAC_NUM}"

0 commit comments

Comments
 (0)