feat(gateway): improve wide-area discovery

This commit is contained in:
Peter Steinberger
2026-01-09 13:45:25 +01:00
parent 7b81d97ec2
commit 1716c01bdf
7 changed files with 392 additions and 1 deletions

View File

@@ -10,11 +10,14 @@ describe("wide-area DNS-SD zone rendering", () => {
const txt = renderWideAreaBridgeZoneText({
serial: 2025121701,
bridgePort: 18790,
gatewayPort: 18789,
displayName: "Mac Studio (Clawdbot)",
tailnetIPv4: "100.123.224.76",
tailnetIPv6: "fd7a:115c:a1e0::8801:e04c",
hostLabel: "studio-london",
instanceLabel: "studio-london",
sshPort: 22,
cliPath: "/opt/homebrew/bin/clawdbot",
});
expect(txt).toContain(`$ORIGIN ${WIDE_AREA_DISCOVERY_DOMAIN}`);
@@ -27,12 +30,16 @@ describe("wide-area DNS-SD zone rendering", () => {
`studio-london._clawdbot-bridge._tcp IN SRV 0 0 18790 studio-london`,
);
expect(txt).toContain(`displayName=Mac Studio (Clawdbot)`);
expect(txt).toContain(`gatewayPort=18789`);
expect(txt).toContain(`sshPort=22`);
expect(txt).toContain(`cliPath=/opt/homebrew/bin/clawdbot`);
});
it("includes tailnetDns when provided", () => {
const txt = renderWideAreaBridgeZoneText({
serial: 2025121701,
bridgePort: 18790,
gatewayPort: 18789,
displayName: "Mac Studio (Clawdbot)",
tailnetIPv4: "100.123.224.76",
tailnetDns: "peters-mac-studio-1.sheep-coho.ts.net",