最后活跃于 3 hours ago

add your tailscale IPs to your hosts file when you're scared of messing up your DNS

willpower232 修订了这个 Gist 3 hours ago. 转到此修订

1 file changed, 8 insertions

tailscaleToHostCtl.sh(文件已创建)

@@ -0,0 +1,8 @@
1 + #!/bin/bash
2 +
3 + tailscale status | while IFS= read -r aHost; do
4 + hostname=$(echo "$aHost" | awk '{print $2}' | cut -d '-' -f 1)
5 + ip=$(echo "$aHost" | awk '{print $1}')
6 +
7 + hostctl add domains tailscale "$hostname.ts" --ip "$ip"
8 + done
上一页 下一页