mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-24 17:32:18 +00:00
26 lines
728 B
TypeScript
26 lines
728 B
TypeScript
// Port Forwarding Types
|
|
export type PortForwardingType = 'local' | 'remote' | 'dynamic';
|
|
type PortForwardingStatus = 'inactive' | 'connecting' | 'active' | 'error';
|
|
|
|
export interface PortForwardingRule {
|
|
id: string;
|
|
label: string;
|
|
order?: number;
|
|
type: PortForwardingType;
|
|
// Common fields
|
|
localPort: number;
|
|
bindAddress: string; // e.g., '127.0.0.1', '0.0.0.0'
|
|
// For local and remote forwarding
|
|
remoteHost?: string;
|
|
remotePort?: number;
|
|
// Host to tunnel through
|
|
hostId?: string;
|
|
// Auto-start: if true, this rule will automatically start when the app launches
|
|
autoStart?: boolean;
|
|
// Runtime state
|
|
status: PortForwardingStatus;
|
|
error?: string;
|
|
createdAt: number;
|
|
lastUsedAt?: number;
|
|
}
|