From f33c1bfe4f64e655eb1fb8b199dc3c6c499b3882 Mon Sep 17 00:00:00 2001 From: Debian Date: Sun, 24 May 2026 12:16:08 +0200 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20ForwardProxy=20ACL-Labels=20+=20Di?= =?UTF-8?q?agnostics-Output=20vollst=C3=A4ndig=20=C3=BCbersetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ForwardProxy: ACL_TYPE_KEYS-Array + t('fwd.aclTypes.*') statt hartkodierter gemischter DE/EN-Labels; action-Select und value-Placeholder ebenso via t() - Diagnostics: '(kein Output)' → t('diag.noOutput') — war einzige sichtbare deutsche Konstante außerhalb t() - en/de common.json: fwd.aclTypes.*, fwd.actions.*, fwd.valuePlaceholder, diag.noOutput hinzugefügt Co-Authored-By: Claude Sonnet 4.6 --- VERSION | 2 +- cmd/edgeguard-api/main.go | 2 +- management-ui/src/i18n/locales/de/common.json | 25 ++++++++++++-- management-ui/src/i18n/locales/en/common.json | 25 ++++++++++++-- management-ui/src/pages/Diagnostics/index.tsx | 2 +- .../src/pages/ForwardProxy/index.tsx | 34 +++++++------------ 6 files changed, 61 insertions(+), 29 deletions(-) diff --git a/VERSION b/VERSION index 025bc6d..8cf600f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.77 +1.1.78 diff --git a/cmd/edgeguard-api/main.go b/cmd/edgeguard-api/main.go index 4b25009..f215f35 100644 --- a/cmd/edgeguard-api/main.go +++ b/cmd/edgeguard-api/main.go @@ -60,7 +60,7 @@ import ( usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users" ) -var version = "1.1.77" +var version = "1.1.78" func main() { addr := os.Getenv("EDGEGUARD_API_ADDR") diff --git a/management-ui/src/i18n/locales/de/common.json b/management-ui/src/i18n/locales/de/common.json index 76bb2c6..052abc9 100644 --- a/management-ui/src/i18n/locales/de/common.json +++ b/management-ui/src/i18n/locales/de/common.json @@ -881,6 +881,7 @@ "aclType": "Typ", "aclTypeExtra": "Was Squid prüft (Quelle, Domain, Port, …).", "value": "Wert", + "valuePlaceholder": ".example.com oder 10.10.20.0/24 oder 443", "valueExtra": "Format hängt vom Typ ab — IPs/CIDRs für src/dst, Domain mit führendem . für dstdomain (.example.com matcht auch sub.example.com), Regex für *_regex-Typen.", "action": "Aktion", "priority": "Priority", @@ -890,7 +891,26 @@ "edit": "ACL bearbeiten", "deleteConfirm": "ACL {{name}} wirklich löschen?", "emptyTitle": "Noch keine Forward-Proxy-ACLs.", - "emptyDesc": "Default ohne ACLs: nur localnet (10/8, 172.16/12, 192.168/16) darf raus. Lege eine ACL an, um spezifische Domains/IPs/Ports gezielt zu erlauben oder zu blocken." + "emptyDesc": "Default ohne ACLs: nur localnet (10/8, 172.16/12, 192.168/16) darf raus. Lege eine ACL an, um spezifische Domains/IPs/Ports gezielt zu erlauben oder zu blocken.", + "actions": { + "allow": "allow — Zugriff erlauben", + "deny": "deny — Zugriff blockieren" + }, + "aclTypes": { + "src": "src — Quell-IP/CIDR", + "dst": "dst — Ziel-IP/CIDR", + "dstdomain": "dstdomain — Ziel-Domain (exact)", + "srcdomain": "srcdomain — Quell-Domain (rDNS)", + "port": "port — Ziel-Port", + "proto": "proto — http/https/ftp/...", + "method": "method — GET/POST/CONNECT/...", + "time": "time — Wochentag/Zeit", + "url_regex": "url_regex — kompletter URL-Match", + "urlpath_regex": "urlpath_regex — Path-Teil", + "dstdom_regex": "dstdom_regex — Domain-Regex", + "srcdom_regex": "srcdom_regex — Quell-Domain-Regex", + "browser": "browser — User-Agent-Regex" + } }, "common": { "yes": "Ja", @@ -1055,7 +1075,8 @@ "curl": { "intro": "HTTPS-Probe mit -IsSv: TLS-Handshake-Details + Header. Folgt KEINE Redirects." }, "tcp": { "intro": "Pure TCP-Connect ohne I/O. Ideal um zu prüfen ob ein Backend-Port erreichbar ist." }, "securityTitle": "Sicherheits-Hinweis", - "securityDesc": "Endpoints sind hinter Admin-Auth. Targets werden gegen eine strikte Allow-Liste validiert (keine Shell-Metazeichen). curl ist auf http(s) beschränkt — kein file:// / smb:// / data://." + "securityDesc": "Endpoints sind hinter Admin-Auth. Targets werden gegen eine strikte Allow-Liste validiert (keine Shell-Metazeichen). curl ist auf http(s) beschränkt — kein file:// / smb:// / data://.", + "noOutput": "(kein Output)" }, "backups": { "title": "Backups", diff --git a/management-ui/src/i18n/locales/en/common.json b/management-ui/src/i18n/locales/en/common.json index 63100b4..b0c53b4 100644 --- a/management-ui/src/i18n/locales/en/common.json +++ b/management-ui/src/i18n/locales/en/common.json @@ -881,6 +881,7 @@ "aclType": "Type", "aclTypeExtra": "What Squid matches (source, domain, port, …).", "value": "Value", + "valuePlaceholder": ".example.com or 10.10.20.0/24 or 443", "valueExtra": "Format depends on type — IPs/CIDRs for src/dst, domain with leading dot for dstdomain (.example.com also matches sub.example.com), regex for *_regex types.", "action": "Action", "priority": "Priority", @@ -890,7 +891,26 @@ "edit": "Edit ACL", "deleteConfirm": "Really delete ACL {{name}}?", "emptyTitle": "No forward-proxy ACLs yet.", - "emptyDesc": "Default with no ACLs: only localnet (10/8, 172.16/12, 192.168/16) is allowed out. Add an ACL to selectively allow or block specific domains/IPs/ports." + "emptyDesc": "Default with no ACLs: only localnet (10/8, 172.16/12, 192.168/16) is allowed out. Add an ACL to selectively allow or block specific domains/IPs/ports.", + "actions": { + "allow": "allow — permit access", + "deny": "deny — block access" + }, + "aclTypes": { + "src": "src — source IP/CIDR", + "dst": "dst — destination IP/CIDR", + "dstdomain": "dstdomain — destination domain (exact)", + "srcdomain": "srcdomain — source domain (rDNS)", + "port": "port — destination port", + "proto": "proto — http/https/ftp/...", + "method": "method — GET/POST/CONNECT/...", + "time": "time — weekday/time range", + "url_regex": "url_regex — full URL regex", + "urlpath_regex": "urlpath_regex — URL path regex", + "dstdom_regex": "dstdom_regex — destination domain regex", + "srcdom_regex": "srcdom_regex — source domain regex", + "browser": "browser — User-Agent regex" + } }, "common": { "yes": "Yes", @@ -1055,7 +1075,8 @@ "curl": { "intro": "HTTPS probe with -IsSv: TLS handshake details + headers. Does NOT follow redirects." }, "tcp": { "intro": "Pure TCP connect (no I/O). Ideal to verify a backend port is reachable." }, "securityTitle": "Security note", - "securityDesc": "Endpoints are behind admin auth. Targets are validated against a strict allow-list (no shell metachars). curl is restricted to http(s) — no file:// / smb:// / data://." + "securityDesc": "Endpoints are behind admin auth. Targets are validated against a strict allow-list (no shell metachars). curl is restricted to http(s) — no file:// / smb:// / data://.", + "noOutput": "(no output)" }, "backups": { "title": "Backups", diff --git a/management-ui/src/pages/Diagnostics/index.tsx b/management-ui/src/pages/Diagnostics/index.tsx index 0a0dc20..a93bd67 100644 --- a/management-ui/src/pages/Diagnostics/index.tsx +++ b/management-ui/src/pages/Diagnostics/index.tsx @@ -74,7 +74,7 @@ function ToolCard({ icon, title, intro, children, result, loading, run }: { borderRadius: 6, overflow: 'auto', maxHeight: 320, whiteSpace: 'pre-wrap', wordBreak: 'break-all', }}> - {result.output || result.error || '(kein Output)'} + {result.output || result.error || t('diag.noOutput')} )} diff --git a/management-ui/src/pages/ForwardProxy/index.tsx b/management-ui/src/pages/ForwardProxy/index.tsx index 8b85ea6..c876c06 100644 --- a/management-ui/src/pages/ForwardProxy/index.tsx +++ b/management-ui/src/pages/ForwardProxy/index.tsx @@ -40,24 +40,10 @@ interface FormValues { comment?: string } -// ACL-Typen aus Squid's Vokabular — dieselbe Whitelist wie der -// Backend-Validator. Mehr Typen kann Squid (browser, time-of-day, -// arp, ...) — die spielen wir später dazu. -const ACL_TYPES = [ - { value: 'src', label: 'src — Quell-IP/CIDR' }, - { value: 'dst', label: 'dst — Ziel-IP/CIDR' }, - { value: 'dstdomain', label: 'dstdomain — Ziel-Domain (exact)' }, - { value: 'srcdomain', label: 'srcdomain — Quell-Domain (rDNS)' }, - { value: 'port', label: 'port — Ziel-Port' }, - { value: 'proto', label: 'proto — http/https/ftp/...' }, - { value: 'method', label: 'method — GET/POST/CONNECT/...' }, - { value: 'time', label: 'time — Wochentag/Zeit' }, - { value: 'url_regex', label: 'url_regex — kompletter URL-Match' }, - { value: 'urlpath_regex', label: 'urlpath_regex — Path-Teil' }, - { value: 'dstdom_regex', label: 'dstdom_regex — Domain-Regex' }, - { value: 'srcdom_regex', label: 'srcdom_regex — Quell-Domain-Regex' }, - { value: 'browser', label: 'browser — User-Agent-Regex' }, -] +const ACL_TYPE_KEYS = [ + 'src', 'dst', 'dstdomain', 'srcdomain', 'port', 'proto', 'method', + 'time', 'url_regex', 'urlpath_regex', 'dstdom_regex', 'srcdom_regex', 'browser', +] as const async function listACLs(): Promise { const r = await apiClient.get('/forward-proxy/acls') @@ -222,17 +208,21 @@ export default function ForwardProxyPage() { +