feat(remoteingress): derive effective remote ingress listen ports from route configs and expose them via ops API

This commit is contained in:
2026-02-17 10:55:31 +00:00
parent 018efa32f6
commit 69be2295f1
10 changed files with 128 additions and 15 deletions

View File

@@ -1,3 +1,5 @@
import type { IRouteConfig } from '@push.rocks/smartproxy';
/**
* A stored remote ingress edge registration.
*/
@@ -23,3 +25,25 @@ export interface IRemoteIngressStatus {
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[];
}
/**
* 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;
};