mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 18:10:39 +09:00
Harden tailnet bind setup
This commit is contained in:
parent
6208899d0a
commit
a77206812e
6 changed files with 88 additions and 8 deletions
|
|
@ -45,6 +45,8 @@ if (!isSameFile && existsSync(CWD_ENV_PATH)) {
|
|||
|
||||
maybeRepairLegacyWorktreeConfigAndEnvFiles();
|
||||
|
||||
const TAILSCALE_DETECT_TIMEOUT_MS = 3000;
|
||||
|
||||
type DatabaseMode = "embedded-postgres" | "postgres";
|
||||
|
||||
export interface Config {
|
||||
|
|
@ -94,6 +96,7 @@ function detectTailnetBindHost(): string | undefined {
|
|||
const stdout = execFileSync("tailscale", ["ip", "-4"], {
|
||||
encoding: "utf8",
|
||||
stdio: ["ignore", "pipe", "ignore"],
|
||||
timeout: TAILSCALE_DETECT_TIMEOUT_MS,
|
||||
});
|
||||
return stdout
|
||||
.split(/\r?\n/)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue