fix cidr validation & suport exit node setting

This commit is contained in:
2022-08-24 02:03:13 +06:00
parent 4f0e62de9f
commit 9ab22c99c9
4 changed files with 12 additions and 5 deletions

View File

@ -11,7 +11,7 @@
"autoApprovers": {
"routes": {
%{~ for route in routes ~}
"${route}": ["group:admin", "${tag}"],
"${route}": ["${tag}"],
%{~ endfor ~}
},
"exitNode": ["${tag}"]

View File

@ -3,4 +3,4 @@ echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf
curl -fsSL https://gist.githubusercontent.com/bdeshi/ba8fed1b5d357320d0314e8380c58454/raw/4978c0b60443e448607b59bc67c09f1dbbac9a56/tailscale-install.sh | sh
tailscale up %{ if length(routes) > 0 } --advertise-routes "${join(",", routes)}" %{ endif } --authkey "${auth_key}" --accept-dns=false
tailscale up %{ if length(routes) > 0 } --advertise-routes "${join(",", routes)}" %{ endif } %{ if exit_node } --advertise-exit-node %{ endif } --authkey "${auth_key}" --accept-dns=false