From 0743daf56ab8dc1b6ad6b352638e66bc37306b59 Mon Sep 17 00:00:00 2001 From: Pallavi Kumari Date: Fri, 24 Oct 2025 16:30:34 +0530 Subject: [PATCH] add en-US for proxy protocol --- messages/en-US.json | 14 ++++++++-- .../resources/[niceId]/proxy/page.tsx | 28 ++++++++++--------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 4cffaf98..f9b2c4c7 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1891,5 +1891,15 @@ "cannotbeUndone": "This can not be undone.", "toConfirm": "to confirm", "deleteClientQuestion": "Are you sure you want to remove the client from the site and organization?", - "clientMessageRemove": "Once removed, the client will no longer be able to connect to the site." -} + "clientMessageRemove": "Once removed, the client will no longer be able to connect to the site.", + "proxyProtocol": "Proxy Protocol Settings", + "proxyProtocolDescription": "Configure Proxy Protocol to preserve client IP addresses for TCP/UDP services.", + "enableProxyProtocol": "Enable Proxy Protocol", + "proxyProtocolInfo": "Preserve client IP addresses for TCP/UDP backends", + "proxyProtocolVersion": "Proxy Protocol Version", + "version1": " Version 1 (Recommended)", + "version2": "Version 2", + "versionDescription": "Version 1 is text-based and widely supported. Version 2 is binary and more efficient but less compatible.", + "warning": "Warning", + "proxyProtocolWarning": "Your backend application must be configured to accept Proxy Protocol connections. If your backend doesn't support Proxy Protocol, enabling this will break all connections. Make sure to configure your backend to trust Proxy Protocol headers from Traefik." +} \ No newline at end of file diff --git a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx index 5af5b318..5ef2ccd5 100644 --- a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx @@ -809,7 +809,7 @@ export default function ReverseProxyTargets(props: { } else { // For TCP/UDP resources, save proxy protocol settings const proxyData = proxySettingsForm.getValues(); - + const payload = { proxyProtocol: proxyData.proxyProtocol || false, proxyProtocolVersion: proxyData.proxyProtocolVersion || 1 @@ -1701,10 +1701,10 @@ export default function ReverseProxyTargets(props: { - Proxy Protocol Settings + {t("proxyProtocol")} - Configure Proxy Protocol to preserve client IP addresses for TCP/UDP services. + {t("proxyProtocolDescription")} @@ -1725,8 +1725,12 @@ export default function ReverseProxyTargets(props: { )} /> - + {proxySettingsForm.watch("proxyProtocol") && ( <> ( - Proxy Protocol Version + {t("proxyProtocolVersion")} - Version 1 is text-based and widely supported. Version 2 is binary and more efficient but less compatible. + {t("versionDescription")} )} @@ -1777,9 +1781,7 @@ export default function ReverseProxyTargets(props: { - Warning: Your backend application must be configured to accept Proxy Protocol connections. - If your backend doesn't support Proxy Protocol, enabling this will break all connections. - Make sure to configure your backend to trust Proxy Protocol headers from Traefik. + {t("warning")}: {t("proxyProtocolWarning")}