Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop a second instance hijacking the Tailscale Serve mapping #10364

Closedsensei-woo(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10364/headopened View on GitHub

Showing 7 changed files with 57 additions and 82 deletions (loading 4).

x
0 of 7 viewed, 7 left
2 additions and 45 deletionsapps/server/src/cli/pair.tsModified
View file
@@ -31,15 +31,11 @@
import * as References from "effect/References";
import * as Schema from "effect/Schema";
import { Command, Flag, GlobalFlag } from "effect/unstable/cli";
-import {
- FetchHttpClient,
- HttpClient,
- HttpClientRequest,
- HttpClientResponse,
-} from "effect/unstable/http";
+import { FetchHttpClient } from "effect/unstable/http";
​
import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";
import * as ServerConfig from "../config.ts";
+import { type EnvironmentProbeResult, probeEnvironmentDescriptor } from "../environmentProbe.ts";
import { resolveBaseDir } from "../os-jank.ts";
import {
type PersistedServerRuntimeState,
@@ -56,8 +52,6 @@
} from "../startupAccess.ts";
import { baseDirFlag, DurationFromString } from "./config.ts";
​
-const WELL_KNOWN_ENVIRONMENT_PATH = "/.well-known/t3/environment";
-const PAIR_PROBE_TIMEOUT = Duration.millis(2_500);
// Tailscale provisions an HTTPS certificate on the first request to a fresh
// serve mapping, which can take a few seconds.
const TAILSCALE_PROBE_ATTEMPTS = 5;
@@ -193,43 +187,6 @@