Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Aug 23, 2018
1 parent bf0934e commit 6c48e97
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
20 changes: 14 additions & 6 deletions mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,20 @@ Set_port(){
done
}
Set_passwd(){
echo "请输入 MTProxy 密匙(手动输入必须为32位,[0-9][a-z][A-Z],建议随机生成)"
stty erase '^H' && read -p "(默认:随机生成):" mtp_passwd
[[ -z "${mtp_passwd}" ]] && mtp_passwd=$(date +%s%N | md5sum | head -c 32)
echo && echo "========================"
echo -e " 密码 : ${Red_background_prefix} dd${mtp_passwd} ${Font_color_suffix}"
echo "========================" && echo
while true
do
echo "请输入 MTProxy 密匙(手动输入必须为32位,[0-9][a-z][A-Z],建议随机生成)"
stty erase '^H' && read -p "(避免出错,强烈推荐随机生成,直接回车):" mtp_passwd
if [[ -z "${mtp_passwd}" ]]; then
mtp_passwd=$(date +%s%N | md5sum | head -c 32)
else
[[ ${#mtp_passwd} != 32 ]] && echo -e "${Error} 请输入正确的密匙(32位字符)。" && continue
fi
echo && echo "========================"
echo -e " 密码 : ${Red_background_prefix} dd${mtp_passwd} ${Font_color_suffix}"
echo "========================" && echo
break
done
}
Set_tag(){
echo "请输入 MTProxy 的 TAG标签(TAG标签只有在通过官方机器人 @MTProxybot 分享代理账号后才会获得,不清楚请留空回车)"
Expand Down
6 changes: 3 additions & 3 deletions pac_get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ var ipv6_proxy = function(){ return nowall_proxy(); };
*/
/*
* Copyright (C) 2017 Toyo
* https://softs.fun/Other/pac.txt
* Copyright (C) 2017-2018 Toyo
* https://softs.loan/Other/pac.txt
*/
var rules = [
Expand Down Expand Up @@ -869,4 +869,4 @@ PAC_BASE64=$(urlsafe_base64_d "${PAC_TEXT}"|grep -v "!"|sed '1d;s/\\/\\\\/g;/^\s
PAC_NUM=$(echo "${PAC_BASE64}"|wc -l)
echo "${PAC_TAME}${PAC_prefix}${PAC_BASE64}${PAC_suffix}" > "${Output_URL}"
sed -i 's/$/\r/' "${Output_URL}"
echo "${PAC_NUM}"
echo "${PAC_NUM}"

0 comments on commit 6c48e97

Please sign in to comment.