3x-ui/internal/web
Rouzbeh† a0f4c13dc5
fix(sockopt): honor trustedXForwardedFor on gRPC inbounds (xray v26.6.22) (#5503)
* fix(sockopt): honor trustedXForwardedFor on gRPC inbounds

xray-core v26.6.22 (commit 711aea4) switched the gRPC server from reading
the x-real-ip gRPC metadata to resolving the client IP from X-Forwarded-For
via sockopt.trustedXForwardedFor, matching ws/httpupgrade/xhttp.

The panel already exposed the trustedXForwardedFor field and wire output, but
the per-transport gate (TRUSTED_HEADER_NETWORKS) still omitted grpc. On a gRPC
inbound this raised a false "transport does not honor this header" warning and
mis-flagged the Cloudflare real-client-IP preset. Add grpc to the gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(i18n): note gRPC in trustedXForwardedFor hint (all locales)

Follow-up to the gRPC gate fix: the trustedXForwardedForHint tooltip across
all 13 locales said the header is honored "only on WebSocket, HTTPUpgrade and
XHTTP". xray-core v26.6.22 added gRPC, so list it too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:55:12 +02:00
..
controller feat(backup): prefer browser request host for backup filename 2026-06-23 01:13:09 +02:00
entity Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
global refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
job Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
locale refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
middleware refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
network refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
runtime perf(scale): speed up traffic, auto-renew, and node bulk ops at 50k-100k clients 2026-06-20 10:35:46 +02:00
service Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
session refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
translation fix(sockopt): honor trustedXForwardedFor on gRPC inbounds (xray v26.6.22) (#5503) 2026-06-23 14:55:12 +02:00
websocket refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
cadence_test.go refactor(web): centralize background job cadences (#5269) 2026-06-14 22:50:24 +02:00
web.go Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
web_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
web_mtls_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00