2026-02-17 10:55:31 +00:00
|
|
|
import type { IRouteConfig } from '@push.rocks/smartproxy';
|
|
|
|
|
|
2026-02-16 11:25:16 +00:00
|
|
|
/**
|
|
|
|
|
* A stored remote ingress edge registration.
|
|
|
|
|
*/
|
|
|
|
|
export interface IRemoteIngress {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
secret: string;
|
|
|
|
|
listenPorts: number[];
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
tags?: string[];
|
|
|
|
|
createdAt: number;
|
|
|
|
|
updatedAt: 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;
|
|
|
|
|
}
|
2026-02-17 10:55:31 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Extended route config used within dcrouter.
|
|
|
|
|
* Adds the optional `remoteIngress` property to SmartProxy's IRouteConfig.
|
|
|
|
|
* SmartProxy ignores unknown properties at runtime.
|
|
|
|
|
*/
|
|
|
|
|
export type IDcRouterRouteConfig = IRouteConfig & {
|
|
|
|
|
remoteIngress?: IRouteRemoteIngress;
|
|
|
|
|
};
|