/** One process as `ps` lists it. */ export interface ProcessEntry { pid: number; command: string; } export interface TunnelProcessDeps { listProcesses: () => Promise; kill: (pid: number, signal: NodeJS.Signals) => void; isRunning: (pid: number) => boolean; sleep: (ms: number) => Promise; } export declare function defaultTunnelProcessDeps(): TunnelProcessDeps; /** The frpc config the server writes for its tunnel in `dataDir`. */ export declare function tunnelConfigPath(dataDir: string): string; /** * True when `command` runs an frpc on exactly `configPath`: another data * dir's tunnel (another account, Vana Desktop) never matches. */ export declare function isTunnelClientFor(command: string, configPath: string): boolean; /** Pids of every frpc running on `dataDir`'s tunnel config. */ export declare function findTunnelClients(dataDir: string, deps?: TunnelProcessDeps): Promise; /** * Stop every frpc running on `dataDir`'s tunnel config: SIGTERM, then * SIGKILL what is left after `timeoutMs`. Returns the pids it stopped. Only * call it while no server runs from `dataDir`, or after it exited. */ export declare function stopTunnelClients(dataDir: string, deps?: TunnelProcessDeps, timeoutMs?: number): Promise; //# sourceMappingURL=tunnel-process.d.ts.map