Merge pull request 'fix: enable udptransport/nattraversal feature tags' (#76) from fix/udptransport-feature-tags into main
ci/woodpecker/push/release-tag Pipeline was successful
ci/woodpecker/push/pr-build Pipeline was successful
ci/woodpecker/tag/release Pipeline was successful

Reviewed-on: #76
This commit was merged in pull request #76.
This commit is contained in:
Lumpiasty committed 2026-10-26 16:04:52 +00:00
commit c71905192d
2 files changed
+37 -16

No files matched your search

+34 -16
View File
@@ -90,8 +90,20 @@ COPY patches/stderr_verbosity_filter.go cmd/tailscaled/
# dns — MagicDNS; configure MikroTik DNS to forward
# *.ts.net → 100.100.100.100; use --no-dns daemon
# flag to skip writing /etc/resolv.conf
# udptransport — REQUIRED for direct (non-DERP) peer connections. Added
# as a separate tag in v1.104.0; when omitted, magicsock
# never runs its UDP receive loops and ALL peer traffic
# is relayed over DERP. Symptom on omission: health
# warning "The MagicSock function ReceiveIPv4 is not
# running" (magicsock-receive-func-error).
# nattraversal — STUN, disco hole punching, UDP peer relay client. Also
# new in v1.104.0; without it direct UDP only works to
# peers with directly reachable endpoints. Depends on
# udptransport.
# portmapper — NAT-PMP / PCP / UPnP to punch through upstream NAT
# (depends on nattraversal)
# listenrawdisco — raw sockets for more robust disco/NAT-traversal
# (depends on udptransport)
# health — health subsystem required by 'tailscale status'
# iptables — Linux iptables support for routing rules
# unixsocketidentity — REQUIRED for the CLI to talk to the daemon. Without it,
@@ -182,31 +194,37 @@ COPY patches/stderr_verbosity_filter.go cmd/tailscaled/
# which is exactly the flash wear we want to avoid.
# logtail — no persistent log writes to flash; also pass
# --no-logs-no-support at runtime
# dnsresolvecache — persists DNS resolutions to disk; flash writes for a
# marginal cold-start benefit
# ssh — not needed; access via MikroTik SSH + tailscale CLI
# all GUI/desktop/cloud/k8s features — irrelevant for a headless router
#
# NOTE: netstack/gro are NOT in this omit list — see the opted-in section above
# for why MagicDNS quad-100 serving structurally requires them in v1.98.5.
# The omit list is wrapped in commas so each pattern matches a WHOLE tag
# (",ts_omit_dns," must not eat the prefix of ",ts_omit_dnsresolvecache,").
RUN mkdir -p /out && \
ALL_OMIT=$(GOOS= GOARCH= go run ./cmd/featuretags --min --add=osrouter) && \
TAGS=$(echo "ts_include_cli,${ALL_OMIT}" | \
TAGS=$(echo ",ts_include_cli,${ALL_OMIT}," | \
sed \
-e 's/ts_omit_advertiseexitnode,\{0,1\}//g' \
-e 's/ts_omit_advertiseroutes,\{0,1\}//g' \
-e 's/ts_omit_useexitnode,\{0,1\}//g' \
-e 's/ts_omit_useroutes,\{0,1\}//g' \
-e 's/ts_omit_dns,\{0,1\}//g' \
-e 's/ts_omit_portmapper,\{0,1\}//g' \
-e 's/ts_omit_listenrawdisco,\{0,1\}//g' \
-e 's/ts_omit_health,\{0,1\}//g' \
-e 's/ts_omit_iptables,\{0,1\}//g' \
-e 's/ts_omit_unixsocketidentity,\{0,1\}//g' \
-e 's/ts_omit_ipnbus,\{0,1\}//g' \
-e 's/ts_omit_netstack,\{0,1\}//g' \
-e 's/ts_omit_gro,\{0,1\}//g' \
-e 's/ts_omit_peerapiserver,\{0,1\}//g' \
-e 's/,$//' \
-e 's/,ts_omit_advertiseexitnode,/,/' \
-e 's/,ts_omit_advertiseroutes,/,/' \
-e 's/,ts_omit_useexitnode,/,/' \
-e 's/,ts_omit_useroutes,/,/' \
-e 's/,ts_omit_dns,/,/' \
-e 's/,ts_omit_udptransport,/,/' \
-e 's/,ts_omit_nattraversal,/,/' \
-e 's/,ts_omit_portmapper,/,/' \
-e 's/,ts_omit_listenrawdisco,/,/' \
-e 's/,ts_omit_health,/,/' \
-e 's/,ts_omit_iptables,/,/' \
-e 's/,ts_omit_unixsocketidentity,/,/' \
-e 's/,ts_omit_ipnbus,/,/' \
-e 's/,ts_omit_netstack,/,/' \
-e 's/,ts_omit_gro,/,/' \
-e 's/,ts_omit_peerapiserver,/,/' \
-e 's/^,//' -e 's/,$//' \
) && \
echo "Build tags: ${TAGS}" && \
# Map Docker's TARGETARCH/TARGETVARIANT to Go's GOARCH/GOARM.
+3
View File
@@ -156,6 +156,8 @@ that's a separate build, not just a `--platform` change.
| DNS / MagicDNS | Resolve `*.ts.net` names (resolver + resolv.conf manager). **Note:** serving `100.100.100.100` also requires `netstack` — see [Why netstack is required (even with a kernel TUN)](#why-netstack-is-required-even-with-a-kernel-tun) |
| `netstack` + `gro` | gVisor userspace stack. Counter-intuitively **required** to serve MagicDNS on `100.100.100.100`, even though the router uses a real kernel TUN — see [Why netstack is required (even with a kernel TUN)](#why-netstack-is-required-even-with-a-kernel-tun) |
| `peerapiserver` | Serves the PeerAPI, including the `/dns-query` DoH endpoint that lets **exit-node clients resolve public DNS automatically**. A declared dependency of `advertise-exit-node` that the allowlist didn't pull in — see [Why peerapiserver is required for exit-node DNS](#why-peerapiserver-is-required-for-exit-node-dns) |
| udptransport | **Required** for direct peer connections (split out in v1.104.0). Without it magicsock never runs its UDP receive loops, all traffic is relayed via DERP, and health reports "The MagicSock function ReceiveIPv4 is not running" |
| nattraversal | STUN, disco hole punching, UDP peer relay client (split out in v1.104.0). Without it direct UDP only works to peers with directly reachable endpoints |
| portmapper (NAT-PMP/PCP/UPnP) | Punch through upstream NAT |
| listenrawdisco | Raw socket disco for better NAT traversal |
| health | Powers `tailscale status` output |
@@ -172,6 +174,7 @@ that's a separate build, not just a `--platform` change.
| `cachenetmap` | **Deliberately removed** — see [Why netmap disk-caching is removed](#why-netmap-disk-caching-is-removed) |
| `logtail` | Would attempt persistent log writes; wear flash. Removing it also removes stderr verbosity filtering — restored by an injected filter, see [Log verbosity filtering](#log-verbosity-filtering) |
| `netlog` | Network flow logging; separate concern |
| `dnsresolvecache` | Persists DNS resolutions to disk — flash writes for a marginal cold-start benefit |
| `ssh` | Access via MikroTik SSH + `tailscale` CLI instead |
| `linuxdnsfight` | inotify on `/etc/resolv.conf`; no systemd in container |
| `networkmanager` / `resolved` / `dbus` / `sdnotify` | No systemd stack in container |