This commit is contained in:
juewuy
2026-01-15 18:49:15 +08:00
2 changed files with 61 additions and 57 deletions

View File

@@ -667,7 +667,7 @@ if [ "$USER" != "root" ] && [ -z "$systype" ]; then
done
fi
if [ -n "$(echo "$url" | grep master)" ]; then
if echo "$url" | grep -q 'master'; then
setversion
fi

View File

@@ -484,8 +484,10 @@ set_shadowsocks(){
*) errornum ;;
esac
}
#自定义端点
set_tailscale(){
# 自定义端点
set_tailscale() {
while true; do
[ -n "$ts_auth_key" ] && ts_auth_key_info='*********'
echo "-----------------------------------------------"
echo -e "\033[31m注意\033[0m脚本默认内核为了节约内存没有编译Tailscale模块\n如需使用请先前往自定义内核更新完整版内核文件"
@@ -502,27 +504,26 @@ set_tailscale(){
echo "-----------------------------------------------"
read -p "请输入对应数字 > " num
case "$num" in
0) ;;
"" | 0)
break
;;
1)
if [ -n "$ts_auth_key" ];then
if [ -n "$ts_auth_key" ]; then
[ "$ts_service" = ON ] && ts_service=OFF || ts_service=ON
setconfig ts_service "$ts_service"
else
echo -e "\033[31m请先设置秘钥\033[0m"
sleep 1
fi
set_tailscale
;;
2)
read -p "请输入秘钥(输入0删除) > " text
[ "$text" = 0 ] && unset ts_auth_key ts_auth_key_info || ts_auth_key="$text"
setconfig ts_auth_key "$ts_auth_key" "$GT_CFG_PATH"
set_tailscale
;;
3)
[ "$ts_subnet" = true ] && ts_subnet=false || ts_subnet=true
setconfig ts_subnet "$ts_subnet" "$GT_CFG_PATH"
set_tailscale
;;
4)
[ "$ts_exit_node" = true ] && ts_exit_node=false || {
@@ -531,16 +532,19 @@ set_tailscale(){
sleep 3
}
setconfig ts_exit_node "$ts_exit_node" "$GT_CFG_PATH"
set_tailscale
;;
5)
read -p "请输入希望在Tailscale显示的设备名称 > " ts_hostname
setconfig ts_hostname "$ts_hostname" "$GT_CFG_PATH"
set_tailscale
;;
*) errornum ;;
*)
errornum
sleep 1
;;
esac
done
}
set_wireguard(){
[ -n "$wg_public_key" ] && wgp_key_info='*********' || unset wgp_key_info
[ -n "$wg_private_key" ] && wgv_key_info='*********' || unset wgv_key_info