Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): VirtualBox and VMware host adapters on Windows are no longer advertised as LAN routes #21056

ClosedSunkenInTime(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/21056/headopened View on GitHub

Showing 2 changed files with 91 additions and 10 deletions.

x
0 of 2 viewed, 2 left
76 additions and 9 deletionsapps/server/src/environment/DirectEndpoints.test.tsModified
View file
@@ -86,26 +86,38 @@
},
];
​
-const virtualInterface = (address: string) => [
+const virtualInterface = (address: string, mac = "02:42:ac:11:00:01") => [
address,
netmask: "255.255.0.0",
family: "IPv4" as const,
- mac: "02:42:ac:11:00:01",
+ mac,
internal: false,
cidr: `${address}/16`,
},
];
​
+const WINDOWS_HOST_ADAPTERS = {
+ "VirtualBox-Host-Only-Netzwerk": virtualInterface("192.168.56.1", "0a:00:27:00:01:01"),
+ "Renamed network": virtualInterface("192.168.150.1", "00:50:56:c0:00:08"),
+};
+​
describe("resolveBoundEndpoints", () => {
it("lists every external IPv4 address for a wildcard bind, tagging the tailnet one", () => {
- expect(resolveBoundEndpoints({ host: "0.0.0.0", port: 3773, interfaces: INTERFACES })).toEqual([
+ expect(
+ resolveBoundEndpoints({
+ platform: "linux",
+ host: "0.0.0.0",
+ port: 3773,