v1.5.3
~新手引导优化 ~流媒体解锁优化
This commit is contained in:
@@ -187,9 +187,9 @@ setport(){
|
|||||||
setconfig authentication
|
setconfig authentication
|
||||||
echo 密码已移除!
|
echo 密码已移除!
|
||||||
else
|
else
|
||||||
if [ "$local_proxy" = "已开启" ];then
|
if [ "$local_proxy" = "已开启" -a "$local_type" = "环境变量" ];then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[33m请先禁用本机代理功能!\033[0m"
|
echo -e "\033[33m请先禁用本机代理功能或使用增强模式!\033[0m"
|
||||||
sleep 1
|
sleep 1
|
||||||
else
|
else
|
||||||
authentication=$(echo $input | grep :)
|
authentication=$(echo $input | grep :)
|
||||||
|
|||||||
@@ -992,22 +992,28 @@ userguide(){
|
|||||||
sethost
|
sethost
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
echo -----------------------------------------------
|
if type systemd >/dev/null 2>&1 ;then
|
||||||
echo -e "\033[32m是否开启公网访问Dashboard面板及socks服务?\033[0m"
|
echo -----------------------------------------------
|
||||||
echo -e "注意当前设备必须有公网IP才能从公网正常访问"
|
echo -e "\033[32m是否开启公网访问Dashboard面板及socks服务?\033[0m"
|
||||||
echo -e "此功能会增加暴露风险请谨慎使用!"
|
echo -e "注意当前设备必须有公网IP才能从公网正常访问"
|
||||||
echo -e "vps设备可能还需要额外在服务商后台开启相关端口(默认为7890与9999)"
|
echo -e "\033[31m此功能会增加暴露风险请谨慎使用!\033[0m"
|
||||||
read -p "现在开启?(1/0) > " res
|
echo -e "vps设备可能还需要额外在服务商后台开启相关端口(默认为7890与9999)"
|
||||||
if [ "$res" = 1 ];then
|
echo -e "启用后会自动设置面板访问秘钥(shellclash)以及Socks密码(shell:clash)"
|
||||||
host=$(curl ip.sb 2>/dev/null | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
|
read -p "现在开启?(1/0) > " res
|
||||||
if [ -z "$host" ];then
|
if [ "$res" = 1 ];then
|
||||||
sethost
|
host=$(curl ip.sb 2>/dev/null | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
|
||||||
|
if [ -z "$host" ];then
|
||||||
|
sethost
|
||||||
|
fi
|
||||||
|
public_support=已开启
|
||||||
|
authentication=shell:clash
|
||||||
|
secret=shellclash
|
||||||
|
setconfig secret $secret
|
||||||
|
setconfig host $host
|
||||||
|
setconfig public_support $public_support
|
||||||
|
setconfig authentication \'$authentication\'
|
||||||
fi
|
fi
|
||||||
public_support=已开启
|
|
||||||
setconfig host $host
|
|
||||||
setconfig public_support $public_support
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#提示导入订阅或者配置文件
|
#提示导入订阅或者配置文件
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[32m是否导入配置文件?\033[0m(这是运行前的最后一步)"
|
echo -e "\033[32m是否导入配置文件?\033[0m(这是运行前的最后一步)"
|
||||||
|
|||||||
@@ -593,15 +593,16 @@ web_restore(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
#设置循环检测clash面板端口
|
#设置循环检测clash面板端口
|
||||||
i=1
|
while [ "$i" != 1 ];do
|
||||||
while [ $i -lt 10 ];do
|
[ "$j" = 60 ] && exit 1
|
||||||
sleep 1
|
sleep 1
|
||||||
if curl --version > /dev/null 2>&1;then
|
if curl --version > /dev/null 2>&1;then
|
||||||
test=$(curl -s http://localhost:${db_port})
|
test=$(curl -s http://localhost:${db_port})
|
||||||
else
|
else
|
||||||
test=$(wget -q -O - http://localhost:${db_port})
|
test=$(wget -q -O - http://localhost:${db_port})
|
||||||
fi
|
fi
|
||||||
[ -n "$test" ] && i=10
|
[ -n "$test" ] && i=1
|
||||||
|
j=$((j+1))
|
||||||
done
|
done
|
||||||
#发送数据
|
#发送数据
|
||||||
num=$(cat $clashdir/web_save | wc -l)
|
num=$(cat $clashdir/web_save | wc -l)
|
||||||
@@ -922,14 +923,15 @@ unset_proxy)
|
|||||||
sed -i '/ALL_PROXY/'d $profile
|
sed -i '/ALL_PROXY/'d $profile
|
||||||
;;
|
;;
|
||||||
steaming)
|
steaming)
|
||||||
|
getconfig
|
||||||
#设置循环检测clashDNS端口
|
#设置循环检测clashDNS端口
|
||||||
i=1
|
while [ "$i" != 0 ];do
|
||||||
while [ $i -lt 10 ];do
|
[ "$j" = 60 ] && exit 1
|
||||||
sleep 1
|
sleep 1
|
||||||
nslookup baidu.com 127.0.0.1:${dns_port} > /dev/null 2>&1
|
nslookup baidu.com 127.0.0.1:${dns_port} > /dev/null 2>&1
|
||||||
[ "$?" = 0 ] && i=10
|
i=$?
|
||||||
|
j=$((j+1))
|
||||||
done
|
done
|
||||||
getconfig
|
|
||||||
steaming_dns(){
|
steaming_dns(){
|
||||||
steaming_dir=$clashdir/steaming/${steaming_type}_Domains.list
|
steaming_dir=$clashdir/steaming/${steaming_type}_Domains.list
|
||||||
if [ ! -f "$steaming_dir" ];then
|
if [ ! -f "$steaming_dir" ];then
|
||||||
|
|||||||
Reference in New Issue
Block a user