Skip to content

Commit

Permalink
Make UDP port configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
lmagyar committed Aug 23, 2024
1 parent 885fe51 commit 474690b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tailscale/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ tags:
- tag:example
- tag:homeassistant
taildrop: true
udp_port: 12345
userspace_networking: true
```
Expand Down Expand Up @@ -311,6 +312,17 @@ When not set, this option is enabled by default.

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

### Option: `udp_port`

UDP port to listen on for WireGuard and peer-to-peer traffic.

Use this option (and router port forwarding) if you experience that Tailscale
can't establish peer-to-peer connections to some of your devices (usually behind
CGNAT networks). You can test connections with `tailscale ping
<hostname-or-ip>`.

When not set, an automatically selected port is used by default.

### Option: `userspace_networking`

The add-on uses [userspace networking mode][tailscale_info_userspace_networking]
Expand Down
1 change: 1 addition & 0 deletions tailscale/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ schema:
tags:
- "match(^tag:[a-zA-Z][a-zA-Z0-9-]*$)?"
taildrop: bool?
udp_port: port?
userspace_networking: bool?
6 changes: 6 additions & 0 deletions tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ if ! bashio::debug ; then
options+=(--no-logs-no-support)
fi

# Use configured UDP port
if bashio::config.has_value "udp_port";
then
options+=(--port=$(bashio::config "udp_port"))
fi

# Use userspace networking by default when not set, or when explicitly enabled
if ! bashio::config.has_value "userspace_networking" || \
bashio::config.true "userspace_networking";
Expand Down
5 changes: 5 additions & 0 deletions tailscale/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ configuration:
This option allows you to enable Taildrop, a file sharing service
that allows you to share files with other Tailscale nodes.
When not set, this option is enabled by default.
udp_port:
name: UDP port
description: >-
UDP port to listen on for WireGuard and peer-to-peer traffic.
When not set, an automatically selected port is used by default.
userspace_networking:
name: Userspace networking mode
description: >-
Expand Down

0 comments on commit 474690b

Please sign in to comment.