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

@@ -955,10 +955,15 @@ export class DcRouter {
// Update configuration
this.options.smartProxyConfig = config;
// Update routes on RemoteIngressManager so derived ports stay in sync
if (this.remoteIngressManager && config.routes) {
this.remoteIngressManager.setRoutes(config.routes as any[]);
}
// Start new SmartProxy with updated configuration (will include email routes if configured)
await this.setupSmartProxy();
console.log('SmartProxy configuration updated');
}
@@ -1587,6 +1592,10 @@ export class DcRouter {
this.remoteIngressManager = new RemoteIngressManager(this.storageManager);
await this.remoteIngressManager.initialize();
// Pass current routes so the manager can derive edge ports from remoteIngress-tagged routes
const currentRoutes = this.options.smartProxyConfig?.routes || [];
this.remoteIngressManager.setRoutes(currentRoutes as any[]);
// Create and start the tunnel manager
this.tunnelManager = new TunnelManager(this.remoteIngressManager, {
tunnelPort: this.options.remoteIngressConfig.tunnelPort ?? 8443,