diff --git a/changelog.md b/changelog.md index 65bf4d3..394ba47 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-04-02 - 12.2.2 - fix(route-config) +sync applied routes to remote ingress manager after route updates + +- add an optional route-applied callback to RouteConfigManager +- forward merged SmartProxy routes to RemoteIngressManager whenever routes are updated + ## 2026-04-02 - 12.2.1 - fix(web-ui) align dees-table props and action handlers in security profile and network target views diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 9cfa197..1d79d97 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '12.2.1', + version: '12.2.2', description: 'A multifaceted routing service handling mail and SMS delivery functions.' } diff --git a/ts/classes.dcrouter.ts b/ts/classes.dcrouter.ts index dd31ef0..9456b4c 100644 --- a/ts/classes.dcrouter.ts +++ b/ts/classes.dcrouter.ts @@ -478,6 +478,12 @@ export class DcRouter { } : undefined, this.referenceResolver, + // Sync merged routes to RemoteIngressManager whenever routes change + (routes) => { + if (this.remoteIngressManager) { + this.remoteIngressManager.setRoutes(routes as any[]); + } + }, ); this.apiTokenManager = new ApiTokenManager(); await this.apiTokenManager.initialize(); diff --git a/ts/config/classes.route-config-manager.ts b/ts/config/classes.route-config-manager.ts index 142ecd6..d0c6219 100644 --- a/ts/config/classes.route-config-manager.ts +++ b/ts/config/classes.route-config-manager.ts @@ -23,6 +23,7 @@ export class RouteConfigManager { private getHttp3Config?: () => IHttp3Config | undefined, private getVpnAllowList?: (tags?: string[]) => string[], private referenceResolver?: ReferenceResolver, + private onRoutesApplied?: (routes: plugins.smartproxy.IRouteConfig[]) => void, ) {} /** Expose stored routes map for reference resolution lookups. */ @@ -393,6 +394,12 @@ export class RouteConfigManager { } await smartProxy.updateRoutes(enabledRoutes); + + // Notify listeners (e.g. RemoteIngressManager) of the merged route set + if (this.onRoutesApplied) { + this.onRoutesApplied(enabledRoutes); + } + logger.log('info', `Applied ${enabledRoutes.length} routes to SmartProxy (${this.storedRoutes.size} programmatic, ${this.overrides.size} overrides)`); } } diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 9cfa197..1d79d97 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '12.2.1', + version: '12.2.2', description: 'A multifaceted routing service handling mail and SMS delivery functions.' }