Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

security: replace real tailnet host identifiers with placeholders in source and tests

[._.]/ Adam Eivy223dfef69fd6
diff --git a/client/src/lib/loopbackHost.test.js b/client/src/lib/loopbackHost.test.js
index 3fb3e009ac..ec04f0879d 100644
--- a/client/src/lib/loopbackHost.test.js
+++ b/client/src/lib/loopbackHost.test.js
@@ -18,7 +18,7 @@ describe('isLoopbackHost', () => {
['[::1]', true],
['0.0.0.0', false],
['10.0.0.1', false],
- ['100.111.11.146', false],
+ ['100.64.0.50', false],
['192.168.1.1', false],
['portos.tailnet.ts.net', false],
['126.0.0.1', false],
@@ -58,7 +58,7 @@ describe('isLoopbackOrigin', () => {
});
it('returns false for Tailscale hostname', () => {
- vi.stubGlobal('window', { location: { hostname: 'void.taile8179.ts.net', protocol: 'http:' } });
+ vi.stubGlobal('window', { location: { hostname: 'host-alpha.example-tailnet.ts.net', protocol: 'http:' } });
expect(isLoopbackOrigin()).toBe(false);
});
});
@@ -92,7 +92,7 @@ describe('describeMicAvailability', () => {
it('reports insecure-context for http on a non-loopback origin', () => {
vi.stubGlobal('window', {
- location: { hostname: '100.111.11.146', protocol: 'http:' },
+ location: { hostname: '100.64.0.50', protocol: 'http:' },
});
expect(describeMicAvailability()).toEqual({ available: false, reason: 'insecure-context' });
});
diff --git a/lib/certMeta.test.js b/lib/certMeta.test.js
index 547b63e169..6b76adf10b 100644
--- a/lib/certMeta.test.js
+++ b/lib/certMeta.test.js
@@ -31,13 +31,13 @@ describe('certMeta.readCertMeta', () => {
statSync.mockReturnValue({ mtimeMs: 1 });
readFileSync.mockReturnValue(JSON.stringify({
mode: 'tailscale',
- hostname: 'void.taile8179.ts.net',
- ips: ['100.111.11.146'],
+ hostname: 'host-alpha.example-tailnet.ts.net',
+ ips: ['100.64.0.50'],
}));
expect(readCertMeta(META_PATH)).toEqual({
mode: 'tailscale',
- hostname: 'void.taile8179.ts.net',
- ips: ['100.111.11.146'],
+ hostname: 'host-alpha.example-tailnet.ts.net',
+ ips: ['100.64.0.50'],
});
});
@@ -45,11 +45,11 @@ describe('certMeta.readCertMeta', () => {
statSync.mockReturnValue({ mtimeMs: 1 });
readFileSync.mockReturnValue(JSON.stringify({
mode: 'self-signed',
- ips: ['127.0.0.1', '100.111.11.146'],
+ ips: ['127.0.0.1', '100.64.0.50'],
}));
expect(readCertMeta(META_PATH)).toEqual({
mode: 'self-signed',
- ips: ['127.0.0.1', '100.111.11.146'],
+ ips: ['127.0.0.1', '100.64.0.50'],
});
});
diff --git a/scripts/tailnet-identity-leak.test.js b/scripts/tailnet-identity-leak.test.js
new file mode 100644
index 0000000000..f7ad5c6cf7
--- /dev/null
+++ b/scripts/tailnet-identity-leak.test.js
@@ -0,0 +1,104 @@
+import { describe, it, expect } from 'vitest';
+import { execFileSync } from 'child_process';
+import { dirname, join } from 'path';
+import { fileURLToPath } from 'url';
+
+// Regression guard: a real Tailscale MagicDNS tailnet suffix, real device
+// names, and a real CGNAT peer IP were once committed across ~14 tracked
+// files (server routes/lib, client lib, several test fixtures, doc plans,
+// and two changelog entries) — a violation of this repo's own CLAUDE.md
+// "Sensitive Data & Privacy" section, which lists Tailscale node/MagicDNS
+// names and Tailscale/LAN IPs as never-commit categories. This test fails
+// the moment a real-looking value of either kind lands in a tracked file
+// again, so the leak can't silently recur via a pasted log line, a doc
+// example lifted from a live install, or a copy-pasted test fixture.
+//
+// We enumerate via `git grep` rather than walking the tree so the check
+// covers exactly *tracked* files — gitignored runtime data (e.g. `data/`)
+// and the `lib/slashdo` submodule (a separate upstream repo, not ours to
+// police) are excluded for free.
+
+const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
+
+// This file's own detector self-check (below) necessarily contains strings
+// shaped like the patterns it's guarding against, so it must exclude
+// itself from the repo-wide scan — otherwise it would fail on its own
+// fixtures.
+const SELF_PATHSPEC = ':!scripts/tailnet-identity-leak.test.js';
+
+/**
+ * Real Tailscale MagicDNS tailnet suffixes are auto-generated as the literal
+ * `tail` prefix followed by a short lowercase alphanumeric token that always
+ * contains at least one digit (this is the exact shape of the value that
+ * leaked). Every placeholder already used across this codebase for a fake
+ * tailnet host (`tailnet`, `tailwind`-shaped words, `tail-net`, `my-machine`,
+ * `example`, `host-example`, `example-tailnet`, …) is a human-chosen word
+ * with no digit in the "tail…" segment, so this pattern flags a real-looking
+ * suffix without tripping on any existing fake one.
+ */
+const REAL_TAILNET_SUFFIX_SOURCE = '\\btail(?=[a-z0-9]*[0-9])[a-z0-9]{3,8}\\.ts\\.net';
+
+/**
+ * 100.64.0.0/10 is Tailscale's CGNAT range. Every address in this range that
+ * is an intentional test/doc fixture (CGNAT-detection unit tests, the
+ * documented Alibaba Cloud metadata IP used in SSRF-guard tests, this
+ * finding's own redacted placeholders, …) is enumerated here. Anything else
+ * found in a tracked file is treated as a possible real peer address.
+ */
+const ALLOWED_CGNAT_IPS = new Set([
+ '100.64.0.0',
+ '100.64.0.1',
+ '100.64.0.5',
+ '100.64.0.6',
+ '100.64.0.50',
+ '100.64.0.99',
+ '100.100.42.7',
+ '100.100.50.1',
+ '100.100.100.200', // documented Alibaba Cloud metadata endpoint, not a peer
+]);
+const CGNAT_IP_SOURCE = '\\b100\\.(6[4-9]|[7-9]\\d|1[01]\\d|12[0-7])\\.\\d{1,3}\\.\\d{1,3}\\b';
+const CGNAT_IP_RE = /\b100\.(6[4-9]|[7-9]\d|1[01]\d|12[0-7])\.\d{1,3}\.\d{1,3}\b/g;
+
+/** Runs `git grep -inP <pattern>` over tracked files and returns matching lines. */
+function gitGrepLines(patternSource) {
+ try {
+ const out = execFileSync(
+ 'git',
+ ['grep', '-n', '-i', '-P', patternSource, '--', '.', ':!lib/slashdo', SELF_PATHSPEC],
+ { cwd: REPO_ROOT, encoding: 'utf8' }
+ );
+ return out.trim().split('\n').filter(Boolean);
+ } catch (err) {
+ // git grep exits 1 when there are zero matches — that's the success case.
+ if (err.status === 1) return [];
+ throw err;
+ }
+}
+
+describe('no real Tailscale identity in tracked files (see CLAUDE.md Sensitive Data & Privacy)', () => {
+ it('detector matches a real-shaped tailnet suffix and not existing placeholders (self-check)', () => {
+ const re = new RegExp(REAL_TAILNET_SUFFIX_SOURCE, 'i');
+ // A synthetic value shaped like a real auto-generated Tailscale suffix
+ // (never an observed real one) — proves the detector actually fires.
+ expect(re.test('device.tail9f00c2.ts.net')).toBe(true);
+ // Every placeholder style already used in this repo must NOT trip it.
+ expect(re.test('host-alpha.example-tailnet.ts.net')).toBe(false);
+ expect(re.test('host.tailnet.ts.net')).toBe(false);
+ expect(re.test('my-machine.ts.net')).toBe(false);
+ expect(re.test('box.tail-net.ts.net')).toBe(false);
+ });
+
+ it('finds no real-looking tail<digits>.ts.net MagicDNS suffix in tracked files', () => {
+ const hits = gitGrepLines(REAL_TAILNET_SUFFIX_SOURCE);
+ expect(hits, hits.join('\n')).toEqual([]);
+ });
+
+ it('finds no un-allowlisted Tailscale CGNAT (100.64.0.0/10) address in tracked files', () => {
+ const lines = gitGrepLines(CGNAT_IP_SOURCE);
+ const offenders = lines.filter((line) => {
+ const ips = line.match(CGNAT_IP_RE) || [];
+ return ips.some((ip) => !ALLOWED_CGNAT_IPS.has(ip));
+ });
+ expect(offenders, offenders.join('\n')).toEqual([]);
+ });
+});
diff --git a/server/lib/networkExposure.test.js b/server/lib/networkExposure.test.js
index 713c01f48a..6b5eb82592 100644
--- a/server/lib/networkExposure.test.js
+++ b/server/lib/networkExposure.test.js
@@ -30,8 +30,8 @@ describe('networkExposure.isLoopbackHost', () => {
['127.0.0.1', true],
['::1', true],
['0.0.0.0', false],
- ['100.111.11.146', false],
- ['void.taile8179.ts.net', false],
+ ['100.64.0.50', false],
+ ['host-alpha.example-tailnet.ts.net', false],
['', false],
[null, false],
[undefined, false],
@@ -69,12 +69,12 @@ describe('networkExposure.getNetworkExposureStatus', () => {
it('reports HTTPS + tailscale mode when cert meta.json indicates tailscale', () => {
getHttpsEnabledAtBoot.mockReturnValue({ value: true, initialized: true });
- getSelfHost.mockReturnValue('void.taile8179.ts.net');
+ getSelfHost.mockReturnValue('host-alpha.example-tailnet.ts.net');
statSync.mockReturnValue({ mtimeMs: 1 });
readFileSync.mockReturnValue(JSON.stringify({
mode: 'tailscale',
- hostname: 'void.taile8179.ts.net',
- ips: ['100.111.11.146']
+ hostname: 'host-alpha.example-tailnet.ts.net',
+ ips: ['100.64.0.50']
}));
const status = getNetworkExposureStatus();
@@ -82,8 +82,8 @@ describe('networkExposure.getNetworkExposureStatus', () => {
expect(status.httpsEnabled).toBe(true);
expect(status.loopbackMirror.enabled).toBe(true);
expect(status.cert.mode).toBe('tailscale');
- expect(status.cert.tailscaleHost).toBe('void.taile8179.ts.net');
- expect(status.cert.ips).toEqual(['100.111.11.146']);
+ expect(status.cert.tailscaleHost).toBe('host-alpha.example-tailnet.ts.net');
+ expect(status.cert.ips).toEqual(['100.64.0.50']);
});
it('reports HTTPS + self-signed mode when meta.json mode is self-signed', () => {
@@ -92,13 +92,13 @@ describe('networkExposure.getNetworkExposureStatus', () => {
statSync.mockReturnValue({ mtimeMs: 1 });
readFileSync.mockReturnValue(JSON.stringify({
mode: 'self-signed',
- ips: ['127.0.0.1', '100.111.11.146']
+ ips: ['127.0.0.1', '100.64.0.50']
}));
const status = getNetworkExposureStatus();
expect(status.cert.mode).toBe('self-signed');
expect(status.cert.tailscaleHost).toBeNull();
- expect(status.cert.ips).toEqual(['127.0.0.1', '100.111.11.146']);
+ expect(status.cert.ips).toEqual(['127.0.0.1', '100.64.0.50']);
});
it('returns "unknown" cert mode when HTTPS is on but meta.json is missing', () => {
@@ -120,7 +120,7 @@ describe('networkExposure.getNetworkExposureStatus', () => {
process.env.HOST = '127.0.0.1';
expect(getNetworkExposureStatus().bind.audience).toBe('loopback-only');
- process.env.HOST = '100.111.11.146';
+ process.env.HOST = '100.64.0.50';
expect(getNetworkExposureStatus().bind.audience).toBe('specific-interface');
});
diff --git a/server/lib/peerSelfHost.test.js b/server/lib/peerSelfHost.test.js
index 8086c2d8b6..6f0085452a 100644
--- a/server/lib/peerSelfHost.test.js
+++ b/server/lib/peerSelfHost.test.js
@@ -38,16 +38,16 @@ describe('peerSelfHost.getSelfHost', () => {
statSync.mockReturnValue({ mtimeMs: 1 });
readFileSync.mockReturnValue(JSON.stringify({
mode: 'tailscale',
- hostname: 'void.taile8179.ts.net'
+ hostname: 'host-alpha.example-tailnet.ts.net'
}));
- expect(getSelfHost()).toBe('void.taile8179.ts.net');
+ expect(getSelfHost()).toBe('host-alpha.example-tailnet.ts.net');
});
it('returns null for self-signed mode (no announceable hostname)', () => {
statSync.mockReturnValue({ mtimeMs: 1 });
readFileSync.mockReturnValue(JSON.stringify({
mode: 'self-signed',
- ips: ['127.0.0.1', '100.111.11.146']
+ ips: ['127.0.0.1', '100.64.0.50']
}));
expect(getSelfHost()).toBeNull();
});
diff --git a/server/lib/viteAllowedHosts.js b/server/lib/viteAllowedHosts.js
index 3c29ecc140..efe88ac2ed 100644
--- a/server/lib/viteAllowedHosts.js
+++ b/server/lib/viteAllowedHosts.js
@@ -3,7 +3,7 @@
* managed app's config.
*
* Why this exists: PortOS is served over a Tailscale MagicDNS name (e.g.
- * `box.taile8179.ts.net`). When a managed app's Dev UI is launched, the browser
+ * `host-gamma.example-tailnet.ts.net`). When a managed app's Dev UI is launched, the browser
* hits the app's Vite dev server at that same hostname — and Vite ≥5 rejects it
* with "Blocked request. This host ("…") is not allowed. … add it to
* server.allowedHosts in vite.config.js" unless the host is allow-listed.
diff --git a/server/lib/viteAllowedHosts.test.js b/server/lib/viteAllowedHosts.test.js
index 40ef23cfbf..b7698bb592 100644
--- a/server/lib/viteAllowedHosts.test.js
+++ b/server/lib/viteAllowedHosts.test.js
@@ -51,11 +51,11 @@ describe('hostIsAllowed', () => {
const tailnet = { allowsAll: false, hosts: ['.ts.net'] };
it('blocks an unknown host when allowedHosts is empty', () => {
- expect(hostIsAllowed(none, 'box.taile8179.ts.net')).toBe(false);
+ expect(hostIsAllowed(none, 'host-gamma.example-tailnet.ts.net')).toBe(false);
});
it('allows everything when allowsAll', () => {
- expect(hostIsAllowed(all, 'null.taile8179.ts.net')).toBe(true);
+ expect(hostIsAllowed(all, 'host-beta.example-tailnet.ts.net')).toBe(true);
});
it('always allows localhost regardless of config', () => {
@@ -71,8 +71,8 @@ describe('hostIsAllowed', () => {
});
it('matches a leading-dot suffix entry against subdomains', () => {
- expect(hostIsAllowed(tailnet, 'box.taile8179.ts.net')).toBe(true);
- expect(hostIsAllowed(tailnet, 'null.taile8179.ts.net')).toBe(true);
+ expect(hostIsAllowed(tailnet, 'host-gamma.example-tailnet.ts.net')).toBe(true);
+ expect(hostIsAllowed(tailnet, 'host-beta.example-tailnet.ts.net')).toBe(true);
});
it('matches a leading-dot entry against the bare domain', () => {
@@ -84,7 +84,7 @@ describe('hostIsAllowed', () => {
});
it('matches an exact array entry', () => {
- expect(hostIsAllowed({ allowsAll: false, hosts: ['box.taile8179.ts.net'] }, 'box.taile8179.ts.net')).toBe(true);
+ expect(hostIsAllowed({ allowsAll: false, hosts: ['host-gamma.example-tailnet.ts.net'] }, 'host-gamma.example-tailnet.ts.net')).toBe(true);
});
it('returns false for an empty hostname', () => {
@@ -253,7 +253,7 @@ export default defineConfig({ server: { allowedHosts: true } });`;
it('reports host allowed for an admin/ config that allows all hosts', async () => {
await mkdir(join(repo, 'admin'), { recursive: true });
await writeFile(join(repo, 'admin', 'vite.config.js'), ALLOW_ALL);
- const status = await checkViteHost(repo, 'void.taile8179.ts.net');
+ const status = await checkViteHost(repo, 'host-alpha.example-tailnet.ts.net');
expect(status.hasViteConfig).toBe(true);
expect(status.allowsAll).toBe(true);
expect(status.hostAllowed).toBe(true);
diff --git a/server/routes/apps/viteTls.test.js b/server/routes/apps/viteTls.test.js
index 70b8786a28..d9df0261ba 100644
--- a/server/routes/apps/viteTls.test.js
+++ b/server/routes/apps/viteTls.test.js
@@ -46,7 +46,7 @@ describe('Apps Vite Dev-UI host guard', () => {
appsService.getAppById.mockResolvedValue({ id: 'app-001', name: 'A', repoPath: repoDir });
const response = await request(app)
- .get('/api/apps/app-001/vite-host-check?host=null.taile8179.ts.net');
+ .get('/api/apps/app-001/vite-host-check?host=host-beta.example-tailnet.ts.net');
expect(response.status).toBe(200);
expect(response.body.hasViteConfig).toBe(true);
@@ -60,7 +60,7 @@ describe('Apps Vite Dev-UI host guard', () => {
appsService.getAppById.mockResolvedValue({ id: 'app-001', name: 'A', repoPath: repoDir });
const response = await request(app)
- .get('/api/apps/app-001/vite-host-check?host=box.taile8179.ts.net');
+ .get('/api/apps/app-001/vite-host-check?host=host-gamma.example-tailnet.ts.net');
expect(response.status).toBe(200);
expect(response.body.hostAllowed).toBe(true);
@@ -71,7 +71,7 @@ describe('Apps Vite Dev-UI host guard', () => {
appsService.getAppById.mockResolvedValue({ id: 'app-001', name: 'A', repoPath: repoDir });
const response = await request(app)
- .get('/api/apps/app-001/vite-host-check?host=box.taile8179.ts.net');
+ .get('/api/apps/app-001/vite-host-check?host=host-gamma.example-tailnet.ts.net');
expect(response.status).toBe(200);
expect(response.body.hasViteConfig).toBe(false);
@@ -86,7 +86,7 @@ describe('Apps Vite Dev-UI host guard', () => {
const response = await request(app)
.post('/api/apps/app-001/fix-vite-hosts')
- .send({ mode: 'allow-all', host: 'null.taile8179.ts.net' });
+ .send({ mode: 'allow-all', host: 'host-beta.example-tailnet.ts.net' });
expect(response.status).toBe(200);
expect(response.body.strategy).toBe('inject-into-server');
@@ -113,7 +113,7 @@ describe('Apps Vite Dev-UI host guard', () => {
const response = await request(app)
.post('/api/apps/app-001/fix-vite-hosts')
- .send({ mode: 'ai', host: 'null.taile8179.ts.net' });
+ .send({ mode: 'ai', host: 'host-beta.example-tailnet.ts.net' });
expect(response.status).toBe(200);
expect(response.body.taskId).toBe('task-vite-1');
diff --git a/server/routes/instances.js b/server/routes/instances.js
index 23ffd7e86e..866b7e60d3 100644
--- a/server/routes/instances.js
+++ b/server/routes/instances.js
@@ -164,7 +164,7 @@ router.get('/sync-status', asyncHandler(async (req, res) => {
}));
// GET /api/instances/tailnet-suffix — detect local Tailscale MagicDNS suffix
-// so the UI can auto-suggest DNS names (e.g., `iphone181` + `.taile8179.ts.net`)
+// so the UI can auto-suggest DNS names (e.g., `phone-example` + `.example-tailnet.ts.net`)
// for peers that currently use bare IP addresses.
router.get('/tailnet-suffix', asyncHandler(async (req, res) => {
const bin = findTailscale();
diff --git a/server/routes/networkExposure.test.js b/server/routes/networkExposure.test.js
index 7ad2356e69..6901efd739 100644
--- a/server/routes/networkExposure.test.js
+++ b/server/routes/networkExposure.test.js
@@ -10,7 +10,7 @@ vi.mock('../lib/networkExposure.js', () => ({
httpsStateInitialized: true,
bind: { host: '0.0.0.0', port: 5555, audience: 'all-interfaces' },
loopbackMirror: { enabled: true, port: 5553 },
- cert: { mode: 'tailscale', tailscaleHost: 'void.taile8179.ts.net', ips: [] },
+ cert: { mode: 'tailscale', tailscaleHost: 'host-alpha.example-tailnet.ts.net', ips: [] },
docsUrl: 'https://github.com/atomantic/PortOS/blob/main/docs/PORTS.md',
}),
}));
@@ -26,7 +26,7 @@ describe('Network Exposure Routes', () => {
expect(res.body.scheme).toBe('https');
expect(res.body.bind.port).toBe(5555);
expect(res.body.loopbackMirror.port).toBe(5553);
- expect(res.body.cert.tailscaleHost).toBe('void.taile8179.ts.net');
+ expect(res.body.cert.tailscaleHost).toBe('host-alpha.example-tailnet.ts.net');
expect(res.body.docsUrl).toMatch(/PORTS\.md$/);
});
});
diff --git a/server/services/instances.test.js b/server/services/instances.test.js
index 91c9d7ff4b..71d93e7a17 100644
--- a/server/services/instances.test.js
+++ b/server/services/instances.test.js
@@ -287,9 +287,9 @@ describe('instances.js', () => {
readJSONFile.mockResolvedValue({ self: null, peers: [] });
fetch.mockRejectedValue(new Error('not reachable'));
- const peer = await addPeer({ address: '10.0.0.7', host: 'machine.taile8179.ts.net' });
+ const peer = await addPeer({ address: '10.0.0.7', host: 'host-delta.example-tailnet.ts.net' });
- expect(peer.host).toBe('machine.taile8179.ts.net');
+ expect(peer.host).toBe('host-delta.example-tailnet.ts.net');
expect(peer.hostManual).toBe(true);
});
@@ -521,9 +521,9 @@ describe('instances.js', () => {
const peers = [{ id: 'peer-1', name: 'host', enabled: true, host: null }];
readJSONFile.mockResolvedValue({ self: null, peers });
- const result = await updatePeer('peer-1', { host: 'void.taile8179.ts.net' });
+ const result = await updatePeer('peer-1', { host: 'host-alpha.example-tailnet.ts.net' });
- expect(result.host).toBe('void.taile8179.ts.net');
+ expect(result.host).toBe('host-alpha.example-tailnet.ts.net');
expect(disconnectFromPeer).toHaveBeenCalledWith('peer-1');
});
@@ -540,14 +540,14 @@ describe('instances.js', () => {
const peers = [{ id: 'peer-1', name: 'host', enabled: true, host: null, hostManual: false }];
readJSONFile.mockResolvedValue({ self: null, peers });
- const result = await updatePeer('peer-1', { host: 'machine.taile8179.ts.net' });
+ const result = await updatePeer('peer-1', { host: 'host-delta.example-tailnet.ts.net' });
- expect(result.host).toBe('machine.taile8179.ts.net');
+ expect(result.host).toBe('host-delta.example-tailnet.ts.net');
expect(result.hostManual).toBe(true);
});
it('should latch hostManual when user explicitly clears host (the un-revert bug)', async () => {
- const peers = [{ id: 'peer-1', name: 'host', enabled: true, host: 'machine.taile8179.ts.net', hostManual: false }];
+ const peers = [{ id: 'peer-1', name: 'host', enabled: true, host: 'host-delta.example-tailnet.ts.net', hostManual: false }];
readJSONFile.mockResolvedValue({ self: null, peers });
const result = await updatePeer('peer-1', { host: '' });
@@ -1395,21 +1395,21 @@ describe('instances.js', () => {
fetch.mockRejectedValue(new Error('offline'));
const result = await handleAnnounce({
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
- host: 'null.taile8179.ts.net'
+ host: 'host-beta.example-tailnet.ts.net'
});
expect(result.created).toBe(true);
- expect(result.peer.host).toBe('null.taile8179.ts.net');
+ expect(result.peer.host).toBe('host-beta.example-tailnet.ts.net');
});
it('should learn host on existing peer when previously absent', async () => {
const existing = {
id: 'p1',
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
@@ -1420,20 +1420,20 @@ describe('instances.js', () => {
readJSONFile.mockResolvedValue({ self: null, peers: [existing] });
const result = await handleAnnounce({
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
- host: 'null.taile8179.ts.net'
+ host: 'host-beta.example-tailnet.ts.net'
});
- expect(result.peer.host).toBe('null.taile8179.ts.net');
+ expect(result.peer.host).toBe('host-beta.example-tailnet.ts.net');
});
it('should not overwrite a user-set host on existing peer', async () => {
const existing = {
id: 'p1',
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
@@ -1444,7 +1444,7 @@ describe('instances.js', () => {
readJSONFile.mockResolvedValue({ self: null, peers: [existing] });
const result = await handleAnnounce({
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
@@ -1460,7 +1460,7 @@ describe('instances.js', () => {
// name because the only safeguard was "is existing.host empty?".
const existing = {
id: 'p1',
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
@@ -1472,11 +1472,11 @@ describe('instances.js', () => {
readJSONFile.mockResolvedValue({ self: null, peers: [existing] });
const result = await handleAnnounce({
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
- host: 'null.taile8179.ts.net'
+ host: 'host-beta.example-tailnet.ts.net'
});
expect(result.peer.host).toBeNull();
@@ -1488,7 +1488,7 @@ describe('instances.js', () => {
// explicit user intervention should latch hostManual.
const existing = {
id: 'p1',
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
@@ -1499,14 +1499,14 @@ describe('instances.js', () => {
readJSONFile.mockResolvedValue({ self: null, peers: [existing] });
const result = await handleAnnounce({
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',
- host: 'null.taile8179.ts.net'
+ host: 'host-beta.example-tailnet.ts.net'
});
- expect(result.peer.host).toBe('null.taile8179.ts.net');
+ expect(result.peer.host).toBe('host-beta.example-tailnet.ts.net');
});
it('should drop invalid host strings via validHost', async () => {
@@ -1514,7 +1514,7 @@ describe('instances.js', () => {
fetch.mockRejectedValue(new Error('offline'));
const result = await handleAnnounce({
- address: '100.111.11.146',
+ address: '100.64.0.50',
port: 5555,
instanceId: 'remote-instance',
name: 'null',