mirror of
https://github.com/Fluent-networks/tailscale-mikrotik.git
synced 2025-08-15 23:18:00 +02:00
0.1.26
Add UPDATE_TAILSCALE option.
This commit is contained in:
parent
c2c60fd964
commit
08c077d081
3 changed files with 9 additions and 1 deletions
|
@ -73,6 +73,7 @@ This section follows the Mikrotik Container documentation with additional steps
|
|||
| ADVERTISE_ROUTES | Comma-separated list of routes to advertise | |
|
||||
| CONTAINER_GATEWAY | The container bridge (veth1) IP address on the router | |
|
||||
| LOGIN_SERVER | Headscale login server | Only required for Headscale control server. Do not set if using Tailscale |
|
||||
| UPDATE_TAILSCALE | Update tailscale on container startup | |
|
||||
| TAILSCALE_ARGS | Additional arguments passed to tailscale | Optional |
|
||||
| TAILSCALED_ARGS | Additional arguments passed to tailscaled | Optional |
|
||||
|
||||
|
@ -83,6 +84,7 @@ add name="tailscale" key="PASSWORD" value="xxxxxxxxxxxxxx"
|
|||
add name="tailscale" key="AUTH_KEY" value="tskey-xxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
add name="tailscale" key="ADVERTISE_ROUTES" value="192.168.88.0/24"
|
||||
add name="tailscale" key="CONTAINER_GATEWAY" value="172.17.0.1"
|
||||
add name="tailscale" key="UPDATE_TAILSCALE"
|
||||
add name="tailscale" key="TAILSCALE_ARGS" value="--accept-routes --advertise-exit-node"
|
||||
```
|
||||
Example Headscale control server configuration:
|
||||
|
|
3
build.sh
3
build.sh
|
@ -26,7 +26,7 @@
|
|||
#
|
||||
PLATFORM="linux/arm/v7"
|
||||
TAILSCALE_VERSION=1.52.1
|
||||
VERSION=0.1.25
|
||||
VERSION=0.1.26
|
||||
|
||||
set -eu
|
||||
|
||||
|
@ -41,6 +41,7 @@ cd tailscale && eval $(./build_dist.sh shellvars) && cd ..
|
|||
|
||||
docker buildx build \
|
||||
--no-cache \
|
||||
--build-arg TAILSCALE_VERSION=$TAILSCALE_VERSION \
|
||||
--build-arg VERSION_LONG=$VERSION_LONG \
|
||||
--build-arg VERSION_SHORT=$VERSION_SHORT \
|
||||
--build-arg VERSION_GIT_HASH=$VERSION_GIT_HASH \
|
||||
|
|
|
@ -21,6 +21,11 @@ for s in "${SUBNETS[@]}"; do
|
|||
ip route add "$s" via "${CONTAINER_GATEWAY}"
|
||||
done
|
||||
|
||||
# Perform an update if set
|
||||
if [[ ! -z "${UPDATE_TAILSCALE+x}" ]]; then
|
||||
/usr/local/bin/tailscale update --yes
|
||||
fi
|
||||
|
||||
# Set login server for tailscale
|
||||
if [[ -z "$LOGIN_SERVER" ]]; then
|
||||
LOGIN_SERVER=https://controlplane.tailscale.com
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue