feat(remoteingress): derive effective remote ingress listen ports from route configs and expose them via ops API
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user