diegosouzapw/OmniRoute · error · Error
TPROXY CA trust install is Linux-only.
Error message
TPROXY CA trust install is Linux-only.
What it means
Error "TPROXY CA trust install is Linux-only." thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/mitm/tproxy/caTrust.ts:87
};
/**
* Install the dynamic CA cert (PEM) into the OS trust store under the dedicated
* TPROXY slot. Stages the PEM to a temp file, then (privileged) copies it into the
* anchor dir and refreshes the trust store. Throws on non-Linux hosts.
*/
export async function installTproxyCa(
caPem: string,
sudoPassword = "",
deps: Partial<CaTrustDeps> = {}
): Promise<void> {
if (process.env.OMNIROUTE_SKIP_SYSTEM_TRUST === "1" && deps.run === undefined) {
console.log("[tproxy-ca] OMNIROUTE_SKIP_SYSTEM_TRUST=1 — skipping OS trust-store mutation");
return;
}
const d = { ...realDeps, ...deps };
if (d.platform() !== "linux") {
throw new Error("TPROXY CA trust install is Linux-only.");
}
const cfg = d.certConfig();
const staged = path.join(d.tmpDir(), TPROXY_CA_CERT_NAME);
const dest = `${cfg.dir}/${TPROXY_CA_CERT_NAME}`;
d.writeFile(staged, caPem);
try {
await d.run("sudo", ["-S", "mkdir", "-p", cfg.dir], sudoPassword);
await d.run("sudo", ["-S", "cp", staged, dest], sudoPassword);
await d.run("sudo", ["-S", cfg.cmd], sudoPassword);
} finally {
d.rmFile(staged);
}
}
/**
* Remove the TPROXY CA from the OS trust store (its dedicated slot only — leaves
* the static MITM cert untouched) and refresh. No-op on non-Linux hosts.
*/View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/mitm/tproxy/caTrust.ts:87 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/a9e292a157946b63.
Report an issue: GitHub.