import type { IRouteConfig } from '@push.rocks/smartproxy';
/**
 * A stored remote ingress edge registration.
 */
export interface IRemoteIngress {
    id: string;
    name: string;
    secret: string;
    listenPorts: number[];
    /** UDP listen ports (e.g. for QUIC/HTTP3). Derived from routes with transport 'udp' or 'all'. */
    listenPortsUdp?: number[];
    enabled: boolean;
    /** Whether to auto-derive ports from remoteIngress-tagged routes. Defaults to true. */
    autoDerivePorts: boolean;
    tags?: string[];
    createdAt: number;
    updatedAt: number;
    /** Effective ports (union of manual + derived) — only present in API responses. */
    effectiveListenPorts?: number[];
    /** Ports explicitly set by the user — only present in API responses. */
    manualPorts?: number[];
    /** Ports auto-derived from route configs — only present in API responses. */
    derivedPorts?: number[];
    /** Effective UDP ports (union of manual + derived) — only present in API responses. */
    effectiveListenPortsUdp?: number[];
}
/**
 * Runtime status of a remote ingress edge.
 */
export interface IRemoteIngressStatus {
    edgeId: string;
    connected: boolean;
    publicIp: string | null;
    activeTunnels: number;
    lastHeartbeat: number | null;
    connectedAt: number | null;
}
/**
 * Route-level remote ingress configuration.
 * When attached to a route, signals that traffic for this route
 * should be accepted from remote edge nodes.
 */
export interface IRouteRemoteIngress {
    /** Whether this route receives traffic from edge nodes */
    enabled: boolean;
    /** Optional filter: only edges whose id or tags match get this route's ports.
     *  When absent, the route applies to all edges. */
    edgeFilter?: string[];
}
/**
 * Route-level VPN access configuration.
 * When attached to a route, controls VPN client access.
 */
export interface IRouteVpn {
    /** Enable VPN client access for this route */
    enabled: boolean;
    /** When true (default), ONLY VPN clients can access this route (replaces ipAllowList).
     *  When false, VPN client IPs are added alongside the existing allowlist. */
    mandatory?: boolean;
    /** Only allow VPN clients with these server-defined tags. Omitted = all VPN clients. */
    allowedServerDefinedClientTags?: string[];
}
/**
 * Extended route config used within dcrouter.
 * Adds optional `remoteIngress` and `vpn` properties to SmartProxy's IRouteConfig.
 * SmartProxy ignores unknown properties at runtime.
 */
export type IDcRouterRouteConfig = IRouteConfig & {
    remoteIngress?: IRouteRemoteIngress;
    vpn?: IRouteVpn;
};
