proxy_check_fingerprint_runtime
Check fingerprint spoofing backend readiness without sending traffic to ensure correct configuration before use.
Instructions
Check fingerprint spoofing backend readiness without sending traffic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tls.ts:212-230 (registration)The 'proxy_check_fingerprint_runtime' tool is registered on the MCP server using server.tool(), with an empty schema ({}) and an async handler that calls checkSpoofRuntime().
// ── Check fingerprint spoof runtime readiness ── server.tool( "proxy_check_fingerprint_runtime", "Check fingerprint spoofing backend readiness without sending traffic.", {}, async () => { try { const runtime = await checkSpoofRuntime(); return { content: [{ type: "text" as const, text: JSON.stringify(runtime), }], }; } catch (e) { return { content: [{ type: "text" as const, text: JSON.stringify({ status: "error", error: String(e) }) }] }; } }, ); - src/tools/tls.ts:217-230 (handler)The async handler function for the tool. It calls checkSpoofRuntime(), wraps the result in JSON, and catches any errors returning an error response.
async () => { try { const runtime = await checkSpoofRuntime(); return { content: [{ type: "text" as const, text: JSON.stringify(runtime), }], }; } catch (e) { return { content: [{ type: "text" as const, text: JSON.stringify({ status: "error", error: String(e) }) }] }; } }, ); - src/tls-spoof.ts:191-209 (helper)The checkSpoofRuntime() function that implements the actual logic: instantiates an Impit object to verify the native Rust NAPI module is available and returns readiness status.
export async function checkSpoofRuntime(): Promise<FingerprintRuntimeCheck> { let impitReady = false; let impitDetail: string | undefined; try { new Impit({ browser: "chrome131" as unknown as never }); impitReady = true; } catch (e) { impitDetail = (e as Error).message; } const runtimes: FingerprintRuntimeStatus[] = [ { name: "impit-node", ready: impitReady, ...(impitDetail ? { detail: impitDetail } : {}) }, ]; return { status: "success", ready: impitReady, backend: "impit-node", runtimes, }; } - src/tls-spoof.ts:32-48 (schema)The FingerprintRuntimeStatus and FingerprintRuntimeCheck interfaces define the shape of the response returned by checkSpoofRuntime().
export interface FingerprintRuntimeStatus { name: string; ready: boolean; detail?: string; } export interface FingerprintRuntimeCheck { status: "success"; ready: boolean; backend: string; /** * Per-backend readiness so callers can render multi-backend UIs without * re-querying. Today there's a single backend (impit-node); the array * keeps the contract forward-compatible if more land later. */ runtimes: FingerprintRuntimeStatus[]; }