Selfsteal: your node website and its TLS architecture
Your own website gives you control over the REALITY target. Understand the browser and VPN paths, the local TLS port, and the checks required after certificate renewal.
Go to practice →What you control
With Selfsteal, the REALITY target website runs on the node itself. You manage its domain, certificate, and pages. This lets you maintain the site alongside the server and investigate its availability without depending on another website operator.
Consider a Linux node using example.com. Xray accepts public TCP/443, while nginx serves HTTPS on 127.0.0.1:9443. DNS for the name points to this node. The server-side target identifies the local site; the parameters are described in the REALITY documentation.
Two connection paths
- A browser connects to
example.com:443. Xray passes the ordinary connection to local nginx on 9443, which serves the website and terminates its TLS connection. - A VPN application connects to the same public port. Xray checks the REALITY parameters and handles the authenticated tunnel. The website does not process all VPN traffic.
These paths need separate checks. An opening page confirms the web path. Verifying the VPN requires a client using the issued profile and actual traffic through the tunnel. The browser’s HTTPS indicator does not check user authorization, REALITY credentials, or application routing.
Port ownership
| Address or port | Component | Purpose |
|---|---|---|
| Public TCP/443 | Xray | Accept external connections |
127.0.0.1:9443 |
nginx with TLS | Serve the local target site |
| Public TCP/80 | HTTP server | HTTP-01 when selected for ACME; ordinary requests can redirect to HTTPS |
| Node API port | Management service | Accept only permitted panel sources |
The TLS server loads the certificate. Here, nginx reads the certificate files on 9443 even though visitors use public port 443. The process, listener address, and certificate files form the HTTPS configuration, as shown in the nginx guide.
9443 is an internal port chosen for this example. Independent VPSs can use the same number. Changing it requires updating the nginx listener, target, and diagnostics together. Sending traffic back to the same Xray listener instead of nginx creates a loop.
Networking between the services
Loopback works here because the processes share a network namespace. A Linux container using network_mode: host shares the host namespace, as explained by Docker. Separate bridge containers have separate loopback interfaces. Moving between those arrangements requires checking the addresses.
This example pairs Xray’s xver: 1 for sending PROXY protocol with nginx’s proxy_protocol listener setting. nginx receives a PROXY header before TLS. It is not an HTTP header, and enabling it on only one side breaks the connection. The nginx listener documentation describes this expectation. An ordinary TLS probe sent directly to 9443 may therefore fail even when the service chain works. Start by checking the public path.
Differences between nodes
Check the domain, certificate, SNI, and keys of each installation. Generate independent REALITY keys for new independent nodes. Updating page styling does not require replacing credentials already used by clients.
Sites can have different contents when they have different purposes. Invented organizations, random pages, or daily port changes provide no measured guarantee of camouflage. Maintain working links and coherent content, then check the site after changes.
Renewal and acceptance
Certificate renewal must include loading the renewed certificate into nginx. Certbot provides a deploy-hook for actions after successful renewal; see its renewal guide.
Check the schedule, the test-renewal result, and the certificate served publicly. ACME testing and verifying the server’s loaded certificate are separate tasks. Repeat both browser and tunnel checks after renewal, including traffic after an idle period from the intended network. If TCP cannot reach the node’s IP, investigate that reachability first.
The Selfsteal practical guide covers configuring this service chain.
Next guide Selfsteal with nginx: public 443 and local TLS → ↗ Article unclear or something off? Message me and I will help or fix it. @notrealvpn →