feat(脚本): 增加随机路径

pull/534/merge
mack-a 2020-08-05 17:53:55 +08:00
parent 09fdfc1f8e
commit 8cfe91ccff
1 changed files with 8 additions and 2 deletions

View File

@ -294,12 +294,18 @@ installTLS(){
# 自定义路径 # 自定义路径
# todo 随机路径 # todo 随机路径
progressTools "yellow" "请输入自定义路径[例: alone],不需要斜杠,[回车]默认路径" progressTools "yellow" "请输入自定义路径[例: alone],不需要斜杠,[回车]随机路径"
read customPath read customPath
if [[ ! -z "${customPath}" ]] if [[ ! -z "${customPath}" ]]
then then
sed -i "s/alone/${customPath}/g" `grep alone -rl /etc/nginx/conf.d/alone.conf` sed -i "s/alone/${customPath}/g" `grep alone -rl /etc/nginx/conf.d/alone.conf`
else
randomPath=`head -n 50 /dev/urandom|sed 's/[^a-z]//g'|strings -n 4|tr 'A-Z' 'a-z'|head -1`
if [[ ! -z "${randomPath}" ]]
then
sed -i "s/alone/${randomPath}/g" `grep alone -rl /etc/nginx/conf.d/alone.conf`
fi
fi fi
rm -rf /usr/share/nginx/html rm -rf /usr/share/nginx/html
@ -825,7 +831,7 @@ init(){
echoContent red "==============================================================" echoContent red "=============================================================="
echoContent green "CDN+WebSocket+TLS+Nginx+伪装博客一键脚本" echoContent green "CDN+WebSocket+TLS+Nginx+伪装博客一键脚本"
echoContent green "作者mack-a" echoContent green "作者mack-a"
echoContent green "Versionv1.0.6" echoContent green "Versionv1.0.8"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "TG群https://t.me/technologyshare" echoContent green "TG群https://t.me/technologyshare"
echoContent green "欢迎找我请求协助与反馈问题" echoContent green "欢迎找我请求协助与反馈问题"