From 0c2b45ea6f6f2dd2d20720628bc8c1b333d1f30c Mon Sep 17 00:00:00 2001 From: oqyude Date: Fri, 28 Aug 2026 00:12:14 +0300 Subject: [PATCH] Revert "vds/nginx: forward real client IP to 3x-ui" This reverts commit 2cd636b6d4a944e3fc4c006406c385ea0f1d6ddc. --- modules/vds/nginx.nix | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/modules/vds/nginx.nix b/modules/vds/nginx.nix index d4a9990..cb8ee78 100644 --- a/modules/vds/nginx.nix +++ b/modules/vds/nginx.nix @@ -6,16 +6,6 @@ }: let server = "100.64.0.0"; - # Forward real client IP/host to 3x-ui so it can manage addresses - # (subscription URLs, logs, geo-rules, fail2ban) as if it shared the - # host network. With podman bridge networking, the source IP that - # 3x-ui sees is the bridge gateway instead of the actual client. - proxyHeaders = '' - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - ''; in { users.users.nginx.extraGroups = [ "acme" ]; @@ -34,22 +24,18 @@ in "/" = { proxyPass = "http://localhost:2049"; proxyWebsockets = true; - extraConfig = proxyHeaders; }; "/subs/" = { proxyPass = "http://localhost:2096"; proxyWebsockets = true; - extraConfig = proxyHeaders; }; "/subsjs/" = { proxyPass = "http://localhost:2096"; proxyWebsockets = true; - extraConfig = proxyHeaders; }; "/clash/" = { proxyPass = "http://localhost:2096"; proxyWebsockets = true; - extraConfig = proxyHeaders; }; }; };