Compare commits
105
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca2c76e77e | ||
|
|
787cbb0c10 | ||
|
|
14d77c183d | ||
|
|
e763cfeda4 | ||
|
|
06a2bd64b9 | ||
|
|
a280b5d517 | ||
|
|
c5049a1bf5 | ||
|
|
c0ffa09887 | ||
|
|
9e02e86f4f | ||
|
|
ab4523a6c3 | ||
|
|
45868e68ab | ||
|
|
8aec78b500 | ||
|
|
b63aadbc79 | ||
|
|
ce8b20c4a5 | ||
|
|
7c8a03dfff | ||
|
|
1eb7c57129 | ||
|
|
40979fdd4c | ||
|
|
f9d8ee2b36 | ||
|
|
c21d66f105 | ||
|
|
c71905192d | ||
|
|
b1bf9719c0
|
||
|
|
b931314a4c | ||
|
|
86670c94bb | ||
|
|
c05cbc1401 | ||
|
|
b4a1cc860f | ||
|
|
3ac116aab5 | ||
|
|
b2f2443421 | ||
|
|
80edf9679f | ||
|
|
08bb3e38dd | ||
|
|
c6ed7992d6 | ||
|
|
74d24e7bc8 | ||
|
|
8bd883a29e | ||
|
|
42e01d5510 | ||
|
|
c84a0bff3d | ||
|
|
0394699170 | ||
|
|
43890cbc7d | ||
|
|
494230875a | ||
|
|
b8fb844468 | ||
|
|
e428d79ed7 | ||
|
|
ac132d5701 | ||
|
|
5f5c9c58a8 | ||
|
|
b556029a10 | ||
|
|
2d731f7853 | ||
|
|
1136539f49 | ||
|
|
a3ed139d44 | ||
|
|
101a64d779 | ||
|
|
ecf8f35c89 | ||
|
|
4ace464a2b | ||
|
|
e29e6f204b | ||
|
|
d7635a7da9 | ||
|
|
b7228d98d2 | ||
|
|
9734687641 | ||
|
|
97d7567266 | ||
|
|
149a3beb06 | ||
|
|
af00049b21 | ||
|
|
cbf8599a7f | ||
|
|
458cc25c05 | ||
|
|
84379aebf1 | ||
|
|
82f239be1f | ||
|
|
41012011d9 | ||
|
|
63d16c7ee3 | ||
|
|
6323311920 | ||
|
|
b5c9bd8182 | ||
|
|
1e55402ce1 | ||
|
|
3f2d48f321 | ||
|
|
c5e1c8be24 | ||
|
|
db9361045d | ||
|
|
561f067bb6 | ||
|
|
284ea0ddad | ||
|
|
a2a2c4bdc8 | ||
|
|
5d6fce8985 | ||
|
|
9ef4a1b006 | ||
|
|
40be2b1ab6 | ||
|
|
b32a1d495e | ||
|
|
22b57a8ce0 | ||
|
|
0f6860c0ed | ||
|
|
fabcc8f43d | ||
|
|
7a32c26fbc | ||
|
|
290c8e71ca | ||
|
|
fe979a6698 | ||
|
|
aec542e727 | ||
|
|
62a9f41071 | ||
|
|
0e42ef9a25 | ||
|
|
fb2eda403b | ||
|
|
391fabddf9 | ||
|
|
38ddb5fc06 | ||
|
|
cc6fbedf5b | ||
|
|
ff97e5e630 | ||
|
|
b5da91e772 | ||
|
|
8363cfe970 | ||
|
|
0fa1df814f | ||
|
|
77d7cdcd25 | ||
|
|
a121513f32 | ||
|
|
a396d20a18 | ||
|
|
0753c314a9
|
||
|
|
cd83a6146f | ||
|
|
b96f88680f | ||
|
|
8092d27cb9 | ||
|
|
5bb34731cb | ||
|
|
c191d8dc47 | ||
|
|
ad3850b634 | ||
|
|
0d8851a16a | ||
|
|
9fc48bac7b | ||
|
|
2e2ccb4f3e | ||
|
|
e009040cb4
|
No files matched your search
@@ -30,7 +30,7 @@ when:
|
||||
|
||||
steps:
|
||||
- name: Build all arches (no push)
|
||||
image: woodpeckerci/plugin-docker-buildx:6.1.0
|
||||
image: woodpeckerci/plugin-docker-buildx:6.1.2
|
||||
privileged: true
|
||||
settings:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
@@ -29,7 +29,7 @@ when:
|
||||
|
||||
steps:
|
||||
- name: Get git token from OpenBao
|
||||
image: quay.io/openbao/openbao:2.5.4
|
||||
image: quay.io/openbao/openbao:2.7.1
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
ROLE_ID:
|
||||
@@ -44,7 +44,7 @@ steps:
|
||||
- bao kv get -mount secret -field RENOVATE_TOKEN renovate > /woodpecker/git_token
|
||||
|
||||
- name: Auto-tag mt.1 on Tailscale bump
|
||||
image: alpine/git:v2.52.0
|
||||
image: alpine/git:v2.54.0
|
||||
environment:
|
||||
CI_REPO_URL: https://gitea.lumpiasty.xyz/lumpiasty/mikrotik-tailscale.git
|
||||
commands:
|
||||
@@ -72,7 +72,7 @@ steps:
|
||||
- git push "https://woodpecker:$GIT_TOKEN@gitea.lumpiasty.xyz/lumpiasty/mikrotik-tailscale.git" "$TAG"
|
||||
- echo "Pushed $TAG"
|
||||
- name: Invalidate OpenBao token
|
||||
image: quay.io/openbao/openbao:2.5.4
|
||||
image: quay.io/openbao/openbao:2.7.1
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
commands:
|
||||
|
||||
@@ -25,7 +25,7 @@ when:
|
||||
|
||||
steps:
|
||||
- name: Get registry creds from OpenBao
|
||||
image: quay.io/openbao/openbao:2.5.4
|
||||
image: quay.io/openbao/openbao:2.7.1
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
ROLE_ID:
|
||||
@@ -43,7 +43,7 @@ steps:
|
||||
- 'printf "PLUGIN_PASSWORD=%s\n" "$(bao kv get -mount secret -field REGISTRY_PASSWORD container-registry)" >> /woodpecker/registry.env'
|
||||
|
||||
- name: Build and push multi-arch image
|
||||
image: woodpeckerci/plugin-docker-buildx:6.1.0
|
||||
image: woodpeckerci/plugin-docker-buildx:6.1.2
|
||||
privileged: true
|
||||
settings:
|
||||
registry: gitea.lumpiasty.xyz
|
||||
@@ -57,7 +57,7 @@ steps:
|
||||
# Credentials (PLUGIN_USERNAME / PLUGIN_PASSWORD) come from OpenBao.
|
||||
env_file: /woodpecker/registry.env
|
||||
- name: Invalidate OpenBao token
|
||||
image: quay.io/openbao/openbao:2.5.4
|
||||
image: quay.io/openbao/openbao:2.7.1
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
commands:
|
||||
|
||||
@@ -30,7 +30,7 @@ skip_clone: true
|
||||
|
||||
steps:
|
||||
- name: Get renovate token from OpenBao
|
||||
image: quay.io/openbao/openbao:2.5.4
|
||||
image: quay.io/openbao/openbao:2.7.1
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
ROLE_ID:
|
||||
@@ -45,8 +45,9 @@ steps:
|
||||
- bao kv get -mount secret -field RENOVATE_TOKEN renovate > /woodpecker/renovate_token
|
||||
- bao kv get -mount secret -field GITHUB_COM_TOKEN renovate > /woodpecker/github_com_token
|
||||
- name: renovate
|
||||
pull: true
|
||||
# Renovate's built-in "woodpecker" manager tracks this image automatically.
|
||||
image: renovate/renovate:43.220.0
|
||||
image: renovate/renovate:44
|
||||
environment:
|
||||
# --- platform / target ---
|
||||
RENOVATE_PLATFORM: gitea
|
||||
@@ -75,7 +76,7 @@ steps:
|
||||
- export GITHUB_COM_TOKEN=$(cat /woodpecker/github_com_token)
|
||||
- /usr/local/sbin/renovate-entrypoint.sh renovate
|
||||
- name: Invalidate OpenBao token
|
||||
image: quay.io/openbao/openbao:2.5.4
|
||||
image: quay.io/openbao/openbao:2.7.1
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
commands:
|
||||
|
||||
+64
-20
@@ -1,4 +1,4 @@
|
||||
# syntax=docker/dockerfile:1.24.0@sha256:87999aa3d42bdc6bea60565083ee17e86d1f3339802f543c0d03998580f9cb89
|
||||
# syntax=docker/dockerfile:1.28.0@sha256:bb22d9815c728170f72750f4e5b0d672e06176142e1d602c7e66c050100b7e5b
|
||||
# =============================================================================
|
||||
# Multi-architecture build
|
||||
# =============================================================================
|
||||
@@ -27,15 +27,15 @@
|
||||
# xx: Dockerfile cross-compilation helpers (provides xx-clang, xx-apk, etc.)
|
||||
# =============================================================================
|
||||
# renovate: datasource=docker depName=tonistiigi/xx versioning=docker
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.9.0@sha256:c64defb9ed5a91eacb37f96ccc3d4cd72521c4bd18d5442905b95e2226b0e707 AS xx
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.10.0@sha256:40fe21f44bb8cddf1eb1226db190d0a984118f62ee02a91b77d99448d28264a6 AS xx
|
||||
|
||||
# =============================================================================
|
||||
# Stage 1: Build Tailscale combined binary (cross-compiled, runs natively)
|
||||
# =============================================================================
|
||||
FROM --platform=$BUILDPLATFORM golang:1.26.4-alpine@sha256:f1ddd9fe14fffc091dd98cb4bfa999f32c5fc77d2f2305ea9f0e2595c5437c14 AS builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.27.4-alpine@sha256:70bd7ddea8b6cbe5d6943cde279d6b67feb10cc924fb9100d1d8757c1575b280 AS builder
|
||||
|
||||
# renovate: datasource=github-releases depName=tailscale packageName=tailscale/tailscale versioning=semver
|
||||
ARG TAILSCALE_VERSION=v1.98.5
|
||||
ARG TAILSCALE_VERSION=v1.104.6
|
||||
|
||||
# Provided automatically by buildx for the target platform.
|
||||
ARG TARGETOS
|
||||
@@ -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,
|
||||
@@ -133,6 +145,31 @@ COPY patches/stderr_verbosity_filter.go cmd/tailscaled/
|
||||
# gro — Generic Receive Offload (perf). Depends on netstack;
|
||||
# pulled in with it. Small, and improves throughput on
|
||||
# the netstack DNS/inject path.
|
||||
# peerapiserver — REQUIRED to be a functional exit node. In v1.98.5
|
||||
# 'advertiseexitnode' DECLARES a dependency on
|
||||
# peerapiserver (featuretags.go Deps, "to run the ExitDNS
|
||||
# server"), but this build's allowlist works by stripping
|
||||
# individual ts_omit_ tags and does NOT re-resolve Deps —
|
||||
# so featuretags --min still emitted ts_omit_peerapiserver
|
||||
# and our advertiseexitnode opt-in alone left it omitted.
|
||||
# peerapiserver gates the entire PeerAPI HTTP server,
|
||||
# including the /dns-query DoH endpoint (peerapi.go,
|
||||
# guarded by buildfeatures.HasPeerAPIServer). Without it
|
||||
# initPeerAPIListenerLocked() returns early: the node
|
||||
# never advertises the PeerAPIDNS service, so exit-node
|
||||
# CLIENTS' exitNodeCanProxyDNS(thisNode) returns false.
|
||||
# With no tailnet global nameserver configured, the
|
||||
# client's resolver then has an empty Routes["."] and
|
||||
# returns an INSTANT authoritative SERVFAIL locally
|
||||
# (forwarder.go servfailResponse, aa=1, 0 ms, no I/O) —
|
||||
# i.e. devices using this router as their exit node could
|
||||
# not resolve PUBLIC names. Including peerapiserver makes
|
||||
# the node serve the exit-node DoH DNS proxy, so clients
|
||||
# get public DNS automatically (the normal exit-node
|
||||
# behavior) with no tailnet DNS config required.
|
||||
# peerapiserver has NO Deps and pulls in no large
|
||||
# subsystems — a small addition. (outboundproxy is NOT
|
||||
# needed for this and stays omitted.)
|
||||
#
|
||||
# Everything else remains omitted, including (rationale):
|
||||
# clientupdate — DELIBERATELY removed. The built-in updater would download
|
||||
@@ -157,30 +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/,$//' \
|
||||
-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.
|
||||
@@ -277,7 +321,7 @@ RUN printf '%s\n' \
|
||||
# only for this one lightweight probe step (busybox --help per applet), not
|
||||
# for the compile itself. The probe can alternatively be skipped by using
|
||||
# a pre-enumerated applet list, but the current approach is simpler.
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.24.0@sha256:a2d49ea686c2adfe3c992e47dc3b5e7fa6e6b5055609400dc2acaeb241c829f4 AS busybox
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.24.4@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf AS busybox
|
||||
|
||||
# Copy xx cross-compilation helpers (xx-clang, xx-apk, xx-info, etc.)
|
||||
COPY --from=xx / /
|
||||
|
||||
@@ -155,6 +155,9 @@ that's a separate build, not just a `--platform` change.
|
||||
| `accept-routes` | Receive subnet routes from other tailnet nodes |
|
||||
| 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 |
|
||||
@@ -171,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 |
|
||||
@@ -308,6 +312,80 @@ itself is refactored — re-test whether `netstack` can be dropped again. The
|
||||
canary is simple: from inside the container, `dig google.com @100.100.100.100`
|
||||
must return answers and `ping <host>.<tailnet>.ts.net` must resolve.
|
||||
|
||||
### Why peerapiserver is required for exit-node DNS
|
||||
|
||||
This is a second non-obvious DNS inclusion, and it exposes a limitation of the
|
||||
allowlist build strategy.
|
||||
|
||||
**Symptom.** With `netstack` enabled, MagicDNS worked from the router and from
|
||||
LAN hosts, including public names. But a device using this router **as its exit
|
||||
node** could not resolve public names: `dig google.com @100.100.100.100` on the
|
||||
*client* returned an instant authoritative `SERVFAIL` (`flags: qr aa rd ad`,
|
||||
`Query time: 0 msec`, "recursion not available"). Tailnet names and raw-IP
|
||||
connectivity (e.g. `ping 1.1.1.1`) through the exit node worked.
|
||||
|
||||
**Root cause.** The `SERVFAIL` is generated **on the client**, locally, with no
|
||||
network I/O — which is why it is instant and authoritative. The path
|
||||
(traced through v1.98.5 source):
|
||||
|
||||
1. The client's query for `google.com` reaches its in-process resolver, which
|
||||
determines the name is not a tailnet name and marks it for forwarding
|
||||
(`net/dns/resolver/tsdns.go`).
|
||||
2. The forwarder looks up which upstream resolver to use for the catch-all
|
||||
`"."` route (`net/dns/resolver/forwarder.go` → `resolvers()`).
|
||||
3. That route set is **empty**, so `forwardWithDestChan` short-circuits and
|
||||
synthesises an authoritative `SERVFAIL` (`servfailResponse`, `aa=1`) without
|
||||
opening any socket. The query never reaches this router at all.
|
||||
|
||||
Why the route set is empty: when a client selects an exit node,
|
||||
`dnsConfigForNetmap` (`ipn/ipnlocal/node_backend.go`) deliberately routes **all**
|
||||
default DNS through the exit node and drops the client's own LAN/system
|
||||
resolver — the whole premise of an exit node is "send everything, including
|
||||
DNS, through me." It does this by setting the client's default resolver to the
|
||||
exit node's **DoH proxy** URL (`http://<peer>/dns-query`). But that only happens
|
||||
if `exitNodeCanProxyDNS(thisRouter)` returns true — i.e. if **this router
|
||||
advertises a working PeerAPI DoH endpoint**. If it does not, and there is no
|
||||
tailnet global nameserver to fall back to, the client ends up with an empty
|
||||
default route and returns `SERVFAIL`.
|
||||
|
||||
**Why this router didn't advertise the DoH proxy.** The `/dns-query` DoH
|
||||
endpoint is part of the **PeerAPI server**, gated by
|
||||
`buildfeatures.HasPeerAPIServer` (`ipn/ipnlocal/peerapi.go`). With
|
||||
`ts_omit_peerapiserver`, `initPeerAPIListenerLocked()` returns early: no PeerAPI
|
||||
listener is created, the `PeerAPIDNS` service is never advertised, and
|
||||
`peerCanProxyDNS()` is false for this node on every client.
|
||||
|
||||
**The allowlist gap that caused it.** In `feature/featuretags/featuretags.go`,
|
||||
`advertiseexitnode` **declares a dependency on `peerapiserver`** ("to run the
|
||||
ExitDNS server"). Upstream's own `--add` resolution would have pulled it in.
|
||||
But this build's allowlist works differently: it runs `featuretags --min` to get
|
||||
the full omit set, then strips the specific `ts_omit_<feature>` tags it wants —
|
||||
it does **not** re-resolve transitive `Deps`. So opting in `advertiseexitnode`
|
||||
did not pull in `peerapiserver`, and `featuretags --min` had emitted
|
||||
`ts_omit_peerapiserver`, leaving the node an exit node *without* its declared
|
||||
ExitDNS dependency — a feature combination upstream's graph says shouldn't
|
||||
occur. Including `peerapiserver` explicitly closes the gap.
|
||||
|
||||
> **Known limitation:** the allowlist (strip-individual-`ts_omit_`-tags) does
|
||||
> not resolve feature dependencies. When opting a feature in, check its `Deps`
|
||||
> in `featuretags.go` and add them explicitly. `peerapiserver` is the only such
|
||||
> gap found and fixed so far; a full dependency audit has not been done.
|
||||
|
||||
**Cost.** Negligible. `peerapiserver` has **no** `Deps` and pulls in no large
|
||||
subsystems; measured at ~+10 kB on the UPX'd binary (arm64), rootfs unchanged
|
||||
within measurement noise.
|
||||
|
||||
**Result.** The router now serves the exit-node DoH DNS proxy, so devices using
|
||||
it as their exit node resolve public names automatically — the normal exit-node
|
||||
behavior — with **no** tailnet DNS configuration required. (Setting a tailnet
|
||||
global nameserver in the admin console is an alternative runtime fix that also
|
||||
works, by populating the client's default resolver directly; it is not required
|
||||
once the router serves the proxy.)
|
||||
|
||||
**Canary for future bumps:** from a client using this router as exit node,
|
||||
`dig google.com @100.100.100.100` must return real answers with `flags: ... ra`
|
||||
(recursion available) and a non-zero query time.
|
||||
|
||||
### Log verbosity filtering
|
||||
|
||||
Upstream `tailscaled` embeds verbosity tags (`[v1]`, `[v2]`, …) inside its log
|
||||
|
||||
Reference in new issue
Block a user