mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-13 20:12:03 +09:00
Document automatic exit node selection and related node attributes
- Add "Automatic exit node selection" to route docs - Add suggest-exit-node and suggest-exit-node-ui as supported nodeAttrs Fixes: #3444
This commit is contained in:
committed by
nblock
parent
febe3ee341
commit
38722e5eeb
@@ -283,6 +283,58 @@ $ sudo tailscale up --login-server <YOUR_HEADSCALE_URL> --advertise-tags tag:exi
|
||||
Please see the [official Tailscale documentation](https://tailscale.com/docs/reference/syntax/policy-file#autoapprovers)
|
||||
for more information on auto approvers.
|
||||
|
||||
### Automatic exit node selection
|
||||
|
||||
A Tailscale client can be configured to select one of the available exit nodes automatically. This may be useful when
|
||||
there are multiple exit nodes available and clients should use an exit node without requiring a user to manually switch
|
||||
between them.
|
||||
|
||||
The policy snippet below defines the tag `tag:exit` for exit nodes. Exit nodes with that tag are suggested to clients
|
||||
with the [`suggest-exit-node` node attribute](policy.md#node-attributes). Additionally, GUI clients should display the
|
||||
"Recommended" exit node selector.
|
||||
|
||||
```json title="Automatic exit node selection"
|
||||
{
|
||||
"tagOwners": {
|
||||
"tag:exit": ["infra@"]
|
||||
},
|
||||
"nodeAttrs": [
|
||||
{
|
||||
// Suggest exit nodes tagged with tag:exit
|
||||
"target": ["tag:exit"],
|
||||
"attr": ["suggest-exit-node"]
|
||||
},
|
||||
{
|
||||
// Show "recommended" exit node selector in GUIs
|
||||
"target": ["*"],
|
||||
"attr": ["suggest-exit-node-ui"]
|
||||
}
|
||||
],
|
||||
"grants": [
|
||||
{
|
||||
"src": ["..."],
|
||||
"dst": ["autogroup:internet"],
|
||||
"ip": ["*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The Tailscale client can suggest a viable exit node with:
|
||||
|
||||
```console
|
||||
$ sudo tailscale exit-node suggest
|
||||
```
|
||||
|
||||
or automatically select one by using `auto:any` as exit node identifier:
|
||||
|
||||
```console
|
||||
$ sudo tailscale set --exit-node=auto:any
|
||||
```
|
||||
|
||||
Please see the [official Tailscale documentation](https://tailscale.com/docs/features/exit-nodes/auto-exit-nodes) for
|
||||
more information on automatic exit node selection.
|
||||
|
||||
## High availability
|
||||
|
||||
Headscale supports high availability routing. Multiple subnet routers with overlapping routes or multiple exit nodes can
|
||||
|
||||
Reference in New Issue
Block a user