mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-24 21:46:07 +00:00
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>
This commit is contained in:
@@ -562,7 +562,7 @@
|
||||
"tcpCongestion": "تراکم TCP",
|
||||
"dialerProxy": "Dialer Proxy",
|
||||
"trustedXForwardedFor": "X-Forwarded-For مورد اعتماد",
|
||||
"trustedXForwardedForHint": "این هدر درخواست برای گرفتن IP واقعی کاربر مورد اعتماد قرار میگیرد (مثلاً CF-Connecting-IP پشت CDN کلودفلر). فقط روی ترنسپورتهای WebSocket، HTTPUpgrade و XHTTP اعمال میشود. برای نادیدهگرفتن هدرها خالی بگذارید.",
|
||||
"trustedXForwardedForHint": "این هدر درخواست برای گرفتن IP واقعی کاربر مورد اعتماد قرار میگیرد (مثلاً CF-Connecting-IP پشت CDN کلودفلر). فقط روی ترنسپورتهای WebSocket، HTTPUpgrade، XHTTP و gRPC اعمال میشود. برای نادیدهگرفتن هدرها خالی بگذارید.",
|
||||
"proxyProtocolHint": "پذیرش هدر PROXY protocol برای گرفتن IP واقعی کاربر از یک تونل/رله L4 بالادست (HAProxy، gost، nginx-stream، Xray dokodemo-door) یا Cloudflare Spectrum. بالادست باید PROXY protocol را ارسال کند. روی TCP، WebSocket، HTTPUpgrade و gRPC کار میکند؛ روی mKCP خیر.",
|
||||
"realClientIp": "IP واقعی کاربر",
|
||||
"realClientIpHint": "وقتی ترافیک از طریق CDN یا رله به این ورودی میرسد، بهجای ثبت آدرس واسط، IP واقعی کاربر گرفته میشود. یک پریست انتخاب کنید تا فیلدهای sockopt مربوطه پایین تکمیل شوند. این فیلدها هرگز در اشتراکها به کلاینتها ارسال نمیشوند.",
|
||||
|
||||
Reference in New Issue
Block a user