~调整Tailscale的缓存目录为安装目录,增加设备名称设置选项

~修复部分设备开机初始化失败的bug
~部分代码细节优化
This commit is contained in:
juewuy
2026-01-01 10:43:25 +08:00
parent abb90eb6f0
commit 5aafe92198
9 changed files with 21 additions and 16 deletions

View File

@@ -4,15 +4,16 @@
[ "$ts_service" = ON ] && {
[ "$ts_subnet" = true ] && advertise_routes='"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"'
[ -z "$ts_exit_node" ] && ts_exit_node=false
[ -z "$ts_hostname" ] && ts_hostname='ShellCrash'
cat >"$TMPDIR"/jsons/tailscale.json <<EOF
{
"endpoints": [
{
"type": "tailscale",
"tag": "ts-ep",
"state_directory": "/tmp/ShellCrash/tailscale",
"state_directory": "$CRASHDIR/tailscale",
"auth_key": "$ts_auth_key",
"hostname": "ShellCrash-ts-ep",
"hostname": "$ts_hostname",
"advertise_routes": [$advertise_routes],
"advertise_exit_node": $ts_exit_node,
"udp_timeout": "5m"