Tailscale 操作筆記（使用 Headscale）

登出目前 Tailscale 使用者
tailscale logout

登入 Headscale 自架登入伺服器
tailscale up --login-server=https://headscale.lotimmy.com

使用預先產生的 Auth Key 進行登入
tailscale up --login-server=https://headscale.lotimmy.com --authkey <你的-preauth-key>

範例：使用實際的 Auth Key
tailscale up --login-server=https://headscale.lotimmy.com --authkey tskey-xxxxxxx

正式使用 Auth Key 登入（可取代上方範例）
tailscale up --login-server=https://headscale.lotimmy.com --authkey d07067c4bcc950e7f1b02d4b492859b84ca464350d86273e

登入並接受子網路路由（子網路代理模式）
tailscale up --login-server=https://headscale.lotimmy.com --authkey d07067c4bcc950e7f1b02d4b492859b84ca464350d86273e --accept-routes

完整範例：廣播子網段、設為出口節點、指定主機名稱
tailscale up \
  --accept-routes \
  --advertise-routes=192.168.88.0/24 \
  --advertise-exit-node \
  --login-server=https://headscale.lotimmy.com \
  --authkey=d07067c4bcc950e7f1b02d4b492859b84ca464350d86273e \
  --hostname=ip-192-168-88-81

檢查目前連線狀態
tailscale status

查詢本機 Tailscale IP
tailscale ip

