Skip to content

Commit

Permalink
Documentation improvements (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmagyar authored Oct 23, 2023
1 parent b12118f commit 715fe84
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 45 deletions.
69 changes: 35 additions & 34 deletions tailscale/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ network right from their interface.
<https://login.tailscale.com/>

The add-on exposes "Exit Node" capabilities that you can enable from your
Tailscale account. Additionally, if the Supervisor managed your network (
which is the default), the add-on will also advertise routes to your
subnets on all supported interfaces to Tailscale.
Tailscale account. Additionally, if the Supervisor managed your network (which
is the default), the add-on will also advertise routes to your subnets on all
supported interfaces to Tailscale.

Consider disabling key expiry to avoid losing connection to your Home Assistant
device. See [Key expiry][tailscale_info_key_expiry] for more information.
Expand All @@ -60,10 +60,10 @@ device. See [Key expiry][tailscale_info_key_expiry] for more information.
accept_dns: true
accept_routes: true
advertise_exit_node: true
funnel: false
advertise_routes:
- 192.168.1.0/24
- fd12:3456:abcd::/64
funnel: false
log_level: info
login_server: "https://controlplane.tailscale.com"
proxy: false
Expand Down Expand Up @@ -92,7 +92,7 @@ by adding `100.100.100.100` as a DNS server in your Pi-hole or AdGuard Home.
This option allows you to accept subnet routes advertised by other nodes in
your tailnet.

More information: <https://tailscale.com/kb/1019/subnets/>
More information: [Subnet routers][tailscale_info_subnets]

When not set, this option is enabled by default.

Expand All @@ -103,7 +103,7 @@ This option allows you to advertise this Tailscale instance as an exit node.
By setting a device on your network as an exit node, you can use it to
route all your public internet traffic as needed, like a consumer VPN.

More information: <https://tailscale.com/kb/1103/exit-nodes/>
More information: [Exit nodes][tailscale_info_exit_nodes]

When not set, this option is enabled by default.

Expand Down Expand Up @@ -191,32 +191,9 @@ you are troubleshooting.

### Option: `login_server`

This option lets you specify you to specify a custom control server instead of
the default (`https://controlplane.tailscale.com`). This is useful if you
are running your own Tailscale control server, for example, a self-hosted
[Headscale] instance.

### Option: `userspace_networking`

The add-on uses [userspace networking mode][tailscale_info_userspace_networking]
to make your Home Assistant instance (and optionally the local subnets)
accessible within your tailnet.

When not set, this option is enabled by default.

If you need to access other clients on your tailnet from your Home Assistant
instance, disable userspace networking mode, which will create a `tailscale0`
network interface on your host.

If you want to access other clients on your tailnet even from your local subnet,
execute steps 2 and 3 as described on [Site-to-site
networking][tailscale_info_site_to_site].

In case your local subnets collide with subnet routes within your tailnet, your
local network access has priority, and these addresses won't be routed toward
your tailnet. This will prevent your Home Assistant instance from losing network
connection. This also means that using the same subnet on multiple nodes for load
balancing and failover is impossible with the current add-on behavior.
This option lets you to specify a custom control server instead of the default
(`https://controlplane.tailscale.com`). This is useful if you are running your
own Tailscale control server, for example, a self-hosted [Headscale] instance.

### Option: `proxy`

Expand Down Expand Up @@ -249,7 +226,7 @@ More information: [Enabling HTTPS][tailscale_info_https]

1. Navigate to the [DNS page][tailscale_dns] of the admin console:

- Choose a Tailnet name.
- Choose a tailnet name.

- Enable MagicDNS if not already enabled.

Expand Down Expand Up @@ -277,7 +254,7 @@ only when you really understand why you need this.
This option allows you to specify specific ACL tags for this Tailscale
instance. They need to start with `tag:`.

More information: <https://tailscale.com/kb/1068/acl-tags/>
More information: [ACL tags][tailscale_info_acls]

### Option: `taildrop`

Expand All @@ -289,6 +266,28 @@ When not set, this option is enabled by default.

Received files are stored in the `/share/taildrop` directory.

### Option: `userspace_networking`

The add-on uses [userspace networking mode][tailscale_info_userspace_networking]
to make your Home Assistant instance (and optionally the local subnets)
accessible within your tailnet.

When not set, this option is enabled by default.

If you need to access other clients on your tailnet from your Home Assistant
instance, disable userspace networking mode, which will create a `tailscale0`
network interface on your host.

If you want to access other clients on your tailnet even from your local subnet,
execute steps 2 and 3 as described on [Site-to-site
networking][tailscale_info_site_to_site].

In case your local subnets collide with subnet routes within your tailnet, your
local network access has priority, and these addresses won't be routed toward
your tailnet. This will prevent your Home Assistant instance from losing network
connection. This also means that using the same subnet on multiple nodes for load
balancing and failover is impossible with the current add-on behavior.

## Changelog & Releases

This repository keeps a change log using [GitHub's releases][releases]
Expand Down Expand Up @@ -365,9 +364,11 @@ SOFTWARE.
[tailscale_acls]: https://login.tailscale.com/admin/acls
[tailscale_dns]: https://login.tailscale.com/admin/dns
[tailscale_info_acls]: https://tailscale.com/kb/1068/acl-tags/
[tailscale_info_exit_nodes]: https://tailscale.com/kb/1103/exit-nodes/
[tailscale_info_funnel]: https://tailscale.com/kb/1223/tailscale-funnel/
[tailscale_info_funnel_policy_requirement]: https://tailscale.com/kb/1223/tailscale-funnel/#tailnet-policy-file-requirement
[tailscale_info_https]: https://tailscale.com/kb/1153/enabling-https/
[tailscale_info_key_expiry]: https://tailscale.com/kb/1028/key-expiry/
[tailscale_info_site_to_site]: https://tailscale.com/kb/1214/site-to-site/
[tailscale_info_subnets]: https://tailscale.com/kb/1019/subnets/
[tailscale_info_userspace_networking]: https://tailscale.com/kb/1112/userspace-networking/
3 changes: 2 additions & 1 deletion tailscale/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ schema:
login_server: url?
proxy: bool?
snat_subnet_routes: bool?
tags: ["match(^tag:[a-zA-Z0-9]-?[a-zA-Z0-9]+$)?"]
tags:
- "match(^tag:[a-zA-Z0-9]-?[a-zA-Z0-9]+$)?"
taildrop: bool?
userspace_networking: bool?
8 changes: 4 additions & 4 deletions tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ do
sleep 2
done

bashio::log.info "Tailscale is running"

# Warn about key expiration
if keyexpiry=$(/opt/tailscale status --self=true --peers=false --json | jq -rce '.Self.KeyExpiry'); then
bashio::log.warning "The connection's key will expire on: ${keyexpiry}"
bashio::log.warning "Consider disabling key expiry to avoid losing connection to your Home Assistant device."
bashio::log.warning "Please check your configuration based on the add-on's documentation under \"Configuration\""
fi

bashio::log.info "Tailscale is running"

# Warn about colliding subnet routes if non-userspace networking and accepting routes are enabled
if bashio::config.false "userspace_networking" && \
(! bashio::config.has_value "accept_routes" || \
Expand All @@ -120,12 +120,12 @@ then
done
fi

# Warn about userspace networking
# Notify about userspace networking
if ! bashio::config.has_value "userspace_networking" || \
bashio::config.true "userspace_networking";
then
bashio::log.notice "The add-on uses userspace networking mode."
bashio::log.notice "If you need to access other clients on your tailnet from your Home Assistant instance,"
bashio::log.notice "disable userspace networking mode, that will create a \"tailscale0\" network interface on your host."
bashio::log.notice "Please check your configuration based on the add-on's Documentation under \"Option: userspace_networking\""
bashio::log.notice "Please check your configuration based on the add-on's documentation under \"Option: userspace_networking\""
fi
2 changes: 1 addition & 1 deletion tailscale/rootfs/etc/s6-overlay/s6-rc.d/proxy/run
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if bashio::config.true 'proxy'; then
bashio::exit.nok
fi
bashio::log.info "Tailscale Proxy is enabled:"
bashio::log.info " Your Home Assistant instance is available within your Tailnet VPN at"
bashio::log.info " Your Home Assistant instance is available within your tailnet VPN at"
bashio::log.info " https://${domain}"

fi
2 changes: 1 addition & 1 deletion tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if bashio::debug ; then
exec /opt/tailscaled "${options[@]}"
else
bashio::log.notice \
"Tailscale logs will be suppressed after 200 lines, set add-on's "\
"Tailscale logs will be suppressed after 200 lines, set add-on's" \
"configuration option 'log_level' to 'debug' to see further logs"

/opt/tailscaled "${options[@]}" 2>&1 \
Expand Down
2 changes: 1 addition & 1 deletion tailscale/rootfs/etc/s6-overlay/s6-rc.d/web/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ==============================================================================
# Home Assistant Community Add-on: Tailscale
# Runs tailscale web interface
# =============================================================================
# ==============================================================================
declare -a options

bashio::log.info 'Starting Tailscale web...'
Expand Down
2 changes: 1 addition & 1 deletion tailscale/rootfs/etc/s6-overlay/scripts/stage2_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/mss-clamping
fi

# Disable taildrop service when it is has been explicitly disabled
# Disable taildrop service when it has been explicitly disabled
if bashio::config.false 'taildrop'; then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/taildrop
fi
4 changes: 2 additions & 2 deletions tailscale/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ configuration:
disable, you can do so using this option.
When not set, this option is enabled by default.
accept_routes:
name: Accept Routes
name: Accept routes
description: >-
This option allows you to accept subnet routes advertised by other nodes
in your tailnet.
Expand Down Expand Up @@ -73,7 +73,7 @@ configuration:
name: Userspace networking mode
description: >-
This option allows you to enable userspace networking mode.
If you need to access other clients on your Tailnet from your Home
If you need to access other clients on your tailnet from your Home
Assistant instance, disable userspace networking mode, which will create a
`tailscale0` network interface on your host.
When not set, this option is enabled by default.

0 comments on commit 715fe84

Please sign in to comment.