~增加tailscale设置

This commit is contained in:
juewuy
2025-12-12 21:46:14 +08:00
parent c387fd4e76
commit 7bdd32459f
3 changed files with 53 additions and 30 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# Copyright (C) Juewuy
[ "ts_advertise_routes" = true ] && advertise_routes='"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"'
cat >"$TMPDIR"/jsons/tailscale.json <<EOF
{
"endpoints": [
{
"type": "tailscale",
"tag": "ts-ep",
"state_directory": "/tmp/ShellCrash/tailscale",
"auth_key": "$ts_auth_key",
"hostname": "ShellCrash-ts-ep",
"advertise_routes": [$advertise_routes],
"advertise_exit_node": $ts_advertise_exit_node,
"udp_timeout": "5m"
}
]
}
EOF