mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 08:21:40 +00:00
Merge branch 'dev' of https://github.com/juewuy/ShellCrash into dev
This commit is contained in:
@@ -667,7 +667,7 @@ if [ "$USER" != "root" ] && [ -z "$systype" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$(echo "$url" | grep master)" ]; then
|
if echo "$url" | grep -q 'master'; then
|
||||||
setversion
|
setversion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -484,8 +484,10 @@ set_shadowsocks(){
|
|||||||
*) errornum ;;
|
*) errornum ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# 自定义端点
|
# 自定义端点
|
||||||
set_tailscale() {
|
set_tailscale() {
|
||||||
|
while true; do
|
||||||
[ -n "$ts_auth_key" ] && ts_auth_key_info='*********'
|
[ -n "$ts_auth_key" ] && ts_auth_key_info='*********'
|
||||||
echo "-----------------------------------------------"
|
echo "-----------------------------------------------"
|
||||||
echo -e "\033[31m注意:\033[0m脚本默认内核为了节约内存没有编译Tailscale模块\n如需使用请先前往自定义内核更新完整版内核文件!"
|
echo -e "\033[31m注意:\033[0m脚本默认内核为了节约内存没有编译Tailscale模块\n如需使用请先前往自定义内核更新完整版内核文件!"
|
||||||
@@ -502,7 +504,9 @@ set_tailscale(){
|
|||||||
echo "-----------------------------------------------"
|
echo "-----------------------------------------------"
|
||||||
read -p "请输入对应数字 > " num
|
read -p "请输入对应数字 > " num
|
||||||
case "$num" in
|
case "$num" in
|
||||||
0) ;;
|
"" | 0)
|
||||||
|
break
|
||||||
|
;;
|
||||||
1)
|
1)
|
||||||
if [ -n "$ts_auth_key" ]; then
|
if [ -n "$ts_auth_key" ]; then
|
||||||
[ "$ts_service" = ON ] && ts_service=OFF || ts_service=ON
|
[ "$ts_service" = ON ] && ts_service=OFF || ts_service=ON
|
||||||
@@ -511,18 +515,15 @@ set_tailscale(){
|
|||||||
echo -e "\033[31m请先设置秘钥!\033[0m"
|
echo -e "\033[31m请先设置秘钥!\033[0m"
|
||||||
sleep 1
|
sleep 1
|
||||||
fi
|
fi
|
||||||
set_tailscale
|
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
read -p "请输入秘钥(输入0删除) > " text
|
read -p "请输入秘钥(输入0删除) > " text
|
||||||
[ "$text" = 0 ] && unset ts_auth_key ts_auth_key_info || ts_auth_key="$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"
|
setconfig ts_auth_key "$ts_auth_key" "$GT_CFG_PATH"
|
||||||
set_tailscale
|
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
[ "$ts_subnet" = true ] && ts_subnet=false || ts_subnet=true
|
[ "$ts_subnet" = true ] && ts_subnet=false || ts_subnet=true
|
||||||
setconfig ts_subnet "$ts_subnet" "$GT_CFG_PATH"
|
setconfig ts_subnet "$ts_subnet" "$GT_CFG_PATH"
|
||||||
set_tailscale
|
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
[ "$ts_exit_node" = true ] && ts_exit_node=false || {
|
[ "$ts_exit_node" = true ] && ts_exit_node=false || {
|
||||||
@@ -531,16 +532,19 @@ set_tailscale(){
|
|||||||
sleep 3
|
sleep 3
|
||||||
}
|
}
|
||||||
setconfig ts_exit_node "$ts_exit_node" "$GT_CFG_PATH"
|
setconfig ts_exit_node "$ts_exit_node" "$GT_CFG_PATH"
|
||||||
set_tailscale
|
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
read -p "请输入希望在Tailscale显示的设备名称 > " ts_hostname
|
read -p "请输入希望在Tailscale显示的设备名称 > " ts_hostname
|
||||||
setconfig ts_hostname "$ts_hostname" "$GT_CFG_PATH"
|
setconfig ts_hostname "$ts_hostname" "$GT_CFG_PATH"
|
||||||
set_tailscale
|
|
||||||
;;
|
;;
|
||||||
*) errornum ;;
|
*)
|
||||||
|
errornum
|
||||||
|
sleep 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
set_wireguard(){
|
set_wireguard(){
|
||||||
[ -n "$wg_public_key" ] && wgp_key_info='*********' || unset wgp_key_info
|
[ -n "$wg_public_key" ] && wgp_key_info='*********' || unset wgp_key_info
|
||||||
[ -n "$wg_private_key" ] && wgv_key_info='*********' || unset wgv_key_info
|
[ -n "$wg_private_key" ] && wgv_key_info='*********' || unset wgv_key_info
|
||||||
|
|||||||
Reference in New Issue
Block a user