mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 12:37:40 +00:00
refactor: remove bridge protocol
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { renderWideAreaBridgeZoneText, WIDE_AREA_DISCOVERY_DOMAIN } from "./widearea-dns.js";
|
||||
import { renderWideAreaGatewayZoneText, WIDE_AREA_DISCOVERY_DOMAIN } from "./widearea-dns.js";
|
||||
|
||||
describe("wide-area DNS-SD zone rendering", () => {
|
||||
it("renders a clawdbot.internal zone with bridge PTR/SRV/TXT records", () => {
|
||||
const txt = renderWideAreaBridgeZoneText({
|
||||
it("renders a clawdbot.internal zone with gateway PTR/SRV/TXT records", () => {
|
||||
const txt = renderWideAreaGatewayZoneText({
|
||||
serial: 2025121701,
|
||||
bridgePort: 18790,
|
||||
gatewayPort: 18789,
|
||||
displayName: "Mac Studio (Clawdbot)",
|
||||
tailnetIPv4: "100.123.224.76",
|
||||
@@ -20,8 +19,8 @@ describe("wide-area DNS-SD zone rendering", () => {
|
||||
expect(txt).toContain(`$ORIGIN ${WIDE_AREA_DISCOVERY_DOMAIN}`);
|
||||
expect(txt).toContain(`studio-london IN A 100.123.224.76`);
|
||||
expect(txt).toContain(`studio-london IN AAAA fd7a:115c:a1e0::8801:e04c`);
|
||||
expect(txt).toContain(`_clawdbot-bridge._tcp IN PTR studio-london._clawdbot-bridge._tcp`);
|
||||
expect(txt).toContain(`studio-london._clawdbot-bridge._tcp IN SRV 0 0 18790 studio-london`);
|
||||
expect(txt).toContain(`_clawdbot-gateway._tcp IN PTR studio-london._clawdbot-gateway._tcp`);
|
||||
expect(txt).toContain(`studio-london._clawdbot-gateway._tcp IN SRV 0 0 18789 studio-london`);
|
||||
expect(txt).toContain(`displayName=Mac Studio (Clawdbot)`);
|
||||
expect(txt).toContain(`gatewayPort=18789`);
|
||||
expect(txt).toContain(`sshPort=22`);
|
||||
@@ -29,9 +28,8 @@ describe("wide-area DNS-SD zone rendering", () => {
|
||||
});
|
||||
|
||||
it("includes tailnetDns when provided", () => {
|
||||
const txt = renderWideAreaBridgeZoneText({
|
||||
const txt = renderWideAreaGatewayZoneText({
|
||||
serial: 2025121701,
|
||||
bridgePort: 18790,
|
||||
gatewayPort: 18789,
|
||||
displayName: "Mac Studio (Clawdbot)",
|
||||
tailnetIPv4: "100.123.224.76",
|
||||
|
||||
Reference in New Issue
Block a user