Skip to content

Commit

Permalink
advanced_config
Browse files Browse the repository at this point in the history
  • Loading branch information
lmagyar committed Nov 11, 2023
1 parent b74614f commit d27a67b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tailscale/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ device. See [Key expiry][tailscale_info_key_expiry] for more information.
```yaml
accept_dns: true
accept_routes: true
advanced_config: false
advertise_exit_node: true
advertise_routes:
- 192.168.1.0/24
Expand Down Expand Up @@ -96,6 +97,36 @@ More information: [Subnet routers][tailscale_info_subnets]

When not set, this option is enabled by default.

### Option: `advanced_config`

This option overrides the add-on's Tailscale Proxy and Tailscale Funnel
settings, they will not have any effect when this option is enabled. The add-on
will not change any proxy or funnel related tailscale settings on startup.
Tailscale will save and reuse any manually configured settings.

**Important:** See also the "Option: `proxy`" and "Option: `funnel`" sections of
this documentation for the necessary configuration changes in Home Assistant and
at tailscale!

When not set, this option is disabled by default.

This option is for advanced users who really know what they are doing. Though it
is recommended even for them, to set up proxy and funnel at first, and only
start advanced manual configuration when the basic proxy and funnel features are
working properly.

Recommended steps to configure:

1. Login to this add-on's container with `docker exec -it
addon_09716aab_tailscale /bin/bash`

1. Fine tune your tailscale settings with manual `/opt/tailscale serve --bg ...` and
`/opt/tailscale funnel --bg ...` commands.

1. Enable the `advanced_config` option.

1. Restart the add-on.

### Option: `advertise_exit_node`

This option allows you to advertise this Tailscale instance as an exit node.
Expand Down
1 change: 1 addition & 0 deletions tailscale/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ map:
schema:
accept_dns: bool?
accept_routes: bool?
advanced_config: bool?
advertise_exit_node: bool?
advertise_routes:
- "match(^(((25[0-5]|(2[0-4]|1\\d|[1-9]?)\\d)\\.){3}(25[0-5]|(2[0-4]|1\\d|[1-9]?)\\d)\\/(3[0-2]|[12]?\\d)|[a-fA-F\\d.:]+:[a-fA-F\\d.:]+\\/(12[0-8]|(1[01]|[1-9]?)\\d))$)?"
Expand Down
6 changes: 6 additions & 0 deletions tailscale/rootfs/etc/s6-overlay/scripts/stage2_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ fi
if bashio::config.false 'taildrop'; then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/taildrop
fi

# Disable proxy and funnel service when advanced_config has been enabled
if bashio::config.true "advanced_config"; then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/proxy
rm /etc/s6-overlay/s6-rc.d/user/contents.d/funnel
fi
7 changes: 7 additions & 0 deletions tailscale/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ configuration:
This option allows you to accept subnet routes advertised by other nodes
in your tailnet.
When not set, this option is enabled by default.
advanced_config:
name: Advanced (Tailscale Proxy and Funnel) config
description: >-
This option overrides the add-on's Tailscale Proxy and Tailscale Funnel
settings. The add-on will not change any proxy or funnel related tailscale
settings on startup.
When not set, this option is disabled by default.
advertise_exit_node:
name: Advertise as an exit node
description: >-
Expand Down

0 comments on commit d27a67b

Please sign in to comment.