feat(edge,protocol,test): add configurable edge bind address and expand flow-control test coverage

This commit is contained in:
2026-03-16 23:35:02 +00:00
parent 982f648928
commit 17d1a795cd
8 changed files with 636 additions and 3 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/remoteingress',
version: '4.6.1',
version: '4.7.0',
description: 'Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.'
}

View File

@@ -14,6 +14,7 @@ type TEdgeCommands = {
hubPort: number;
edgeId: string;
secret: string;
bindAddress?: string;
};
result: { started: boolean };
};
@@ -38,6 +39,7 @@ export interface IEdgeConfig {
hubPort?: number;
edgeId: string;
secret: string;
bindAddress?: string;
}
const MAX_RESTART_ATTEMPTS = 10;
@@ -132,6 +134,7 @@ export class RemoteIngressEdge extends EventEmitter {
hubPort: edgeConfig.hubPort ?? 8443,
edgeId: edgeConfig.edgeId,
secret: edgeConfig.secret,
...(edgeConfig.bindAddress ? { bindAddress: edgeConfig.bindAddress } : {}),
});
this.started = true;
@@ -227,6 +230,7 @@ export class RemoteIngressEdge extends EventEmitter {
hubPort: this.savedConfig.hubPort ?? 8443,
edgeId: this.savedConfig.edgeId,
secret: this.savedConfig.secret,
...(this.savedConfig.bindAddress ? { bindAddress: this.savedConfig.bindAddress } : {}),
});
this.started = true;