Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): machines on one tailnet can link without Tailscale HTTPS #48213

OpenJarne47(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48213/headopened View on GitHub

Showing 5 changed files with 101 additions and 45 deletions (loading 2).

x
0 of 5 viewed, 5 left
26 additions and 0 deletionsapps/server/src/environment/DirectEndpoints.test.tsModified
View file
@@ -120,6 +120,32 @@
]);
});
​
+ it("lists the MagicDNS name over http only when it listens on the tailnet", () => {
+ const magicDnsName = "bb-1.tail1234.ts.net";
+ expect(
+ resolveBoundEndpoints({
+ platform: "darwin",
+ host: "0.0.0.0",
+ port: 3773,
+ interfaces: INTERFACES,
+ magicDnsName,
+ }),
+ ).toEqual([
+ { kind: "lan", httpBaseUrl: "http://192.168.1.10:3773/" },
+ { kind: "tailnet", httpBaseUrl: "http://100.101.102.103:3773/" },
+ { kind: "tailnet", httpBaseUrl: "http://bb-1.tail1234.ts.net:3773/" },
+ ]);
+ expect(
+ resolveBoundEndpoints({
+ platform: "darwin",
+ host: "192.168.1.10",
+ port: 3773,
+ interfaces: INTERFACES,
+ magicDnsName,
+ }),
+ ).toEqual([{ kind: "lan", httpBaseUrl: "http://192.168.1.10:3773/" }]);
+ });
+​