You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for registering as a tailscale service host
Optionally register as a tailcale service host, instead of as an HTTP tsnet host.
Notes:
- uses x-forwarded-for for the remote IP, since we don't have the peer IP from the request (there's an internal proxy in place)
Fixes: #214
Signed-off-by: Chris Rose <offline@offby1.net>
By default, golink registers as a regular tailnet node. However, you can register it as a [Tailscale Service],
63
+
which provides more stable identity and is especially useful for ephemeral infrastructure (like fly.io)
64
+
where storage may be lost.
65
+
66
+
To register as a service:
67
+
68
+
```bash
69
+
TS_AUTHKEY="tskey-auth-<key>" go run ./cmd/golink -sqlitedb golink.db --register-as-service=svc:golink
70
+
```
71
+
72
+
Or using the environment variable:
73
+
74
+
```bash
75
+
TS_SERVICE_NAME="svc:golink" TS_AUTHKEY="tskey-auth-<key>" go run ./cmd/golink -sqlitedb golink.db
76
+
```
77
+
78
+
**Requirements:**
79
+
- The node must be tagged (e.g., `tag:golink`)
80
+
- Your ACL policy must define the service and include auto-approvers
81
+
- Services only support HTTPS on port 443
82
+
83
+
**Admin Capabilities in Service Mode:**
84
+
85
+
Admin capability grants work in service mode by looking up the user's capabilities via the Tailscale daemon status API. This means admin permissions are properly enforced based on your ACL policy, just like in regular mode.
0 commit comments