mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #3651] 3xui + docker + nginx proxy manager #2450
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#2450
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zero-proger on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3651
Question
I have such a problem.
I use 3xui in a docker container
There is NPM (Nginx Proxy Manager) and its configuration in docker
They are on the same network and there is a rule in NPM to use the panel in the proxy-host.
Domain:
xray.example.comScheme:
httpHost:
xrayPort:
2053Certificate:
Received by letsencryptDomain:
vless.example.comScheme:
httpHost:
xrayPort:
8443Certificate:
Received by letsencryptWhen I want to create an inbound in the 3xui panel:
Protocol:
vlessPort:
8443Authentication:
noneTransmission:
TCP (RAW)External proxy:
vless.example.com(configured in NPM to forward port 443 to xray:8443)Security:
RealityuTLS:
RandomTarget:
vk.com:443SNI:
vk.comPublic Key (Private Key)
Get New certSniffing:
HTTP TLS QUICFor some reason, nothing works for me, I also tried different tranfers and different protocols.
I need to be sure to use port 443 to connect to vless.
Checklist
@Frew777 commented on GitHub (Jan 8, 2026):
VLESS + Reality behind Nginx Proxy Manager will not work because Reality requires end-to-end TLS that reaches Xray directly. NPM always terminates TLS and proxies at the HTTP layer, so it cannot forward a Reality handshake intact. HTTP-based transports like WS, gRPC, or xHTTP can be proxied through NPM, but Reality cannot. External Proxy settings only affect headers and real IP propagation — they do not enable raw TLS passthrough.
@Frew777 commented on GitHub (Jan 8, 2026):
VLESS + Reality cannot work behind Nginx Proxy Manager (NPM). This is not a 3x-ui bug, but a fundamental architectural limitation.
Reality is a VLESS transport that requires a direct, end-to-end TLS connection between the client and Xray. Xray must receive the original TLS ClientHello in order to handle SNI, uTLS fingerprinting, and Reality’s handshake logic. There must be no TLS termination or MITM proxy in between.
Nginx Proxy Manager is an HTTP reverse proxy. It always terminates TLS on itself and then forwards traffic at the HTTP layer (HTTP, WebSocket, or gRPC). NPM does not support raw TCP/TLS passthrough and does not forward the client’s TLS handshake to backend services.
Because of this:
HTTP-based transports (VLESS over WebSocket, gRPC, or xHTTP) work with NPM because they are proxied at layer 7 after TLS termination. Reality is not an HTTP-based transport and cannot be encapsulated this way.
External Proxy / real IP settings in 3x-ui do not change this behavior. They only affect HTTP headers (e.g., X-Forwarded-For) and do not provide TLS passthrough.
To use VLESS + Reality, Xray must be exposed directly to the client or placed behind a layer-4 proxy that supports TLS passthrough and SNI-based routing (e.g., nginx stream, HAProxy). Nginx Proxy Manager cannot fulfill this role.
@Frew777 commented on GitHub (Jan 8, 2026):
I also tried setting up VLESS using this kind of scheme. I have a server running Nginx Proxy Manager on port 443. In theory, if NPM supported PROXY protocol, it would be possible to place a plain nginx in front of NPM as a front proxy and configure SNI-based routing there. However, this approach will not work in practice because NPM does not support PROXY protocol.
As a result, the client’s TLS connection cannot be forwarded intact, and transports like Reality cannot function behind NPM.
@zero-proger commented on GitHub (Jan 9, 2026):
I understand that setting up streams in NPM won't help you achieve your goal?
@nebulosa2007 commented on GitHub (Jan 10, 2026):
https://github.com/XTLS/Xray-examples/tree/main/All-in-One-fallbacks-Nginx
@lxpcfc commented on GitHub (Jan 14, 2026):
services:
xray:
networks:
- npm_npm
services:
npm:
networks:
- npm
they're in different networks
@zero-proger commented on GitHub (Feb 13, 2026):
it's one network, they're just in different files, and npm has become npm_npm, by the name of the network and the service where it was created.