Spaces:
Paused
Paused
X-UI Deployment Scheme
This document outlines the architecture for deploying and accessing the X-UI web interface, leveraging Nginx for secure HTTPS access and Chisel for tunneling.
Components:
X-UI Docker Container:
- Runs the X-UI application, listening on port
2053. - Includes a
chiselclient that establishes a reverse tunnel.
- Runs the X-UI application, listening on port
Chisel Client (inside Docker Container):
- Connects to
vds1.iri1968.dpdns.orgon port80. - Establishes a reverse tunnel:
R:8443:localhost:2053. This means any traffic sent tolocalhost:8443onvds1.iri1968.dpdns.orgwill be forwarded tolocalhost:2053inside the Docker container (where X-UI is running).
- Connects to
Nginx on
vds1.iri1968.dpdns.org:- HTTPS Listener (Port 443):
- Listens for secure HTTPS traffic on
vds1.iri1968.dpdns.org. - Uses Let's Encrypt SSL certificates for secure communication.
- Proxies all incoming requests to
http://localhost:8443on thevds1server. - Includes WebSocket support headers (
UpgradeandConnection: upgrade) for proper X-UI panel and proxy traffic handling.
- Listens for secure HTTPS traffic on
- HTTP Listener (Port 80):
- Listens for insecure HTTP traffic on
vds1.iri1968.dpdns.org. - Redirects all HTTP traffic to HTTPS (
https://$host$request_uri;).
- Listens for insecure HTTP traffic on
- HTTPS Listener (Port 443):
Access Flow:
User Access (Browser):
- The user opens their web browser and navigates to
https://vds1.iri1968.dpdns.org.
- The user opens their web browser and navigates to
Nginx Processing (on
vds1.iri1968.dpdns.org):- Nginx receives the HTTPS request on port
443. - It decrypts the SSL traffic using the configured certificates.
- Nginx then proxies this request internally to
http://localhost:8443on thevds1server.
- Nginx receives the HTTPS request on port
Chisel Server Processing (on
vds1.iri1968.dpdns.org):- The
chiselserver (which is configured to listen on port8443due to the reverse tunnel initiated by the client in the Docker container) receives the request from Nginx. - The
chiselserver forwards this request through the establishedchiseltunnel back to thechiselclient running inside the Docker container.
- The
Chisel Client & X-UI (inside Docker Container):
- The
chiselclient inside the Docker container receives the request from thechiselserver. - It then forwards this request to
localhost:2053within its own container, where the X-UI web interface is actively listening. - X-UI processes the request and sends the response back through the same tunnel in reverse.
- The
Summary of Access Points:
- Primary Access (Recommended):
https://vds1.iri1968.dpdns.org(secure, external access via Nginx and Chisel tunnel). - Direct Container Access (Local Only):
http://localhost:2053(if the container's port 2053 is mapped to the host's 2053, for local testing/development).
This setup ensures secure, encrypted communication from the user's browser to the Nginx server, and then leverages the chisel tunnel for secure and reliable internal communication to the X-UI application, even if the X-UI container is behind a NAT or firewall.