From 11bc0dde6c8b4f001d9a2294a6c010e1126d0b51 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Wed, 18 Feb 2026 22:56:18 +0000 Subject: [PATCH] fix(dcrouter): enable PROXY protocol v1 handling for SmartProxy when remoteIngress is enabled to preserve client IPs --- changelog.md | 7 +++++++ ts/00_commitinfo_data.ts | 2 +- ts/classes.dcrouter.ts | 7 +++++++ ts_web/00_commitinfo_data.ts | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 93192d6..e6bfc37 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2026-02-18 - 6.13.1 - fix(dcrouter) +enable PROXY protocol v1 handling for SmartProxy when remoteIngress is enabled to preserve client IPs + +- Set smartProxyConfig.acceptProxyProtocol = true when options.remoteIngressConfig.enabled +- Whitelist loopback address by setting smartProxyConfig.proxyIPs = ['127.0.0.1'] +- Only applies when remoteIngress is enabled; used to accept tunneled connections forwarded by the hub to preserve original client IPs + ## 2026-02-18 - 6.13.0 - feat(remoteingress) include listenPorts for allowed edges sent to the Rust hub and always resync allowed edges when edge properties change diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index cd2c751..c5ae802 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: '6.13.0', + version: '6.13.1', description: 'A multifaceted routing service handling mail and SMS delivery functions.' } diff --git a/ts/classes.dcrouter.ts b/ts/classes.dcrouter.ts index 246f779..3acc64d 100644 --- a/ts/classes.dcrouter.ts +++ b/ts/classes.dcrouter.ts @@ -586,6 +586,13 @@ export class DcRouter { }; } + // When remoteIngress is enabled, the hub binary forwards tunneled connections + // to SmartProxy with PROXY protocol v1 headers to preserve client IPs. + if (this.options.remoteIngressConfig?.enabled) { + smartProxyConfig.acceptProxyProtocol = true; + smartProxyConfig.proxyIPs = ['127.0.0.1']; + } + // Create SmartProxy instance console.log('[DcRouter] Creating SmartProxy instance with config:', JSON.stringify({ routeCount: smartProxyConfig.routes?.length, diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index cd2c751..c5ae802 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: '6.13.0', + version: '6.13.1', description: 'A multifaceted routing service handling mail and SMS delivery functions.' }