Files
Netcatty/infrastructure/config/sftpTransferPool.ts
T
bincxz 3f706abfeb feat(ssh): unify transport leases and converge transfer keep-alive
Introduce a main-process SSH transport registry (borrow/return leases,
ControlPersist-style idle park) shared by shell, SFTP, transfer, and
port-forward. Transfer pool becomes channel concurrency only; remove the
separate transfer-pool idle TTL UI in favor of a single SSH keep-alive
setting. Register dedicated SFTP dials, reuse parked transports, and fix
TTL 0 (park until quit), jump-host endpoint keys, and remote unforwardIn.
2026-07-28 18:57:14 +08:00

35 lines
1.2 KiB
TypeScript

/**
* @deprecated Transfer channel pool no longer parks SSH connections.
* Keep-alive is owned by the main-process SSH transport registry
* (`sshTransportIdleTtl.ts` / settings "SSH connection keep-alive").
*
* These symbols remain for import stability in older tests/call sites.
*/
import {
DEFAULT_SSH_TRANSPORT_IDLE_TTL_MS,
SSH_TRANSPORT_IDLE_TTL_PRESETS_MS,
resolveSshTransportIdleTtlMs,
} from "./sshTransportIdleTtl.ts";
/** @deprecated Use DEFAULT_SSH_TRANSPORT_IDLE_TTL_MS */
export const DEFAULT_SFTP_TRANSFER_POOL_IDLE_TTL_MS = DEFAULT_SSH_TRANSPORT_IDLE_TTL_MS;
/** @deprecated Use SSH_TRANSPORT_IDLE_TTL_PRESETS_MS */
export const SFTP_TRANSFER_POOL_IDLE_TTL_PRESETS_MS = SSH_TRANSPORT_IDLE_TTL_PRESETS_MS;
/** @deprecated */
export type SftpTransferPoolIdleTtlMs = (typeof SFTP_TRANSFER_POOL_IDLE_TTL_PRESETS_MS)[number];
/** @deprecated Use resolveSshTransportIdleTtlMs */
export function resolveSftpTransferPoolIdleTtlMs(
readStoredValue: () => number | null | undefined,
): number {
return resolveSshTransportIdleTtlMs(readStoredValue);
}
/** @deprecated Transfer channels close when idle; always treated as reclaim-enabled. */
export function isTransferPoolIdleReclaimDisabled(_idleTtlMs: number): boolean {
return false;
}