NEW Check if your VPN is honest — a free subscription audit in 60 seconds →
← Back to library
Basics Theory

Choosing a protocol and transport for your VPN

Start with the connections that pass through the networks you need and the applications your users have, rather than with the newest name.

A single profile is rarely the best option for every network. A connection that works well at home may be unreliable on mobile data; a fast server-side test does not reproduce a phone’s path. A VPN operator’s task is therefore to provide a clear primary route and a useful backup, rather than as many switches as possible in the application.

Separate the three layers

In VLESS + XHTTP + TLS, the three components have different roles: VLESS is the protocol, XHTTP is the transport, and TLS protects the connection. The current Xray compatibility table lists these layers separately. It describes valid settings; reachability from a particular network still needs testing.

For operations, record the complete setup. “REALITY” without a transport and a supported application is not enough for somebody else to reproduce the connection.

Start with the user’s requirements

Answer four questions first. Which devices will connect? From which networks? Who will maintain the server? Which activity must keep working: browsing, file uploads, video calls, or a continuously running application?

Then select candidates to test:

Setup When to include it What to check first
VLESS + RAW + REALITY A direct route to the node is needed Address reachability, matching parameters, and the required applications
VLESS + XHTTP + TLS A route through HTTP infrastructure is needed Compatibility throughout the chain, uploads, downloads, and recovery after idle time
VLESS + gRPC + TLS Compatible infrastructure is already working HTTP/2, reverse-proxy settings, and interruptions to long-lived connections
Hysteria 2 A separate QUIC-based path is worth testing UDP reachability, the certificate, and matching client settings

Plain VLESS over TCP and TLS cannot be sent through an HTTP CDN as though it were a web page: the intermediary needs a supported HTTP transport. REALITY also cannot simply terminate at an HTTP CDN like ordinary TLS; that requires a different architecture. If the CDN offers a layer-4 product, check its capabilities separately.

For a direct node, compare a straightforward direct route. For an HTTP proxy, first check a compatible HTTP transport. For a UDP backup, assess UDP reachability from the required networks. The table selects candidates; their speed must be measured separately. The developers of Xray’s gRPC transport, for example, recommend considering XHTTP. That does not mean a working gRPC deployment should immediately be disabled.

A backup must address the actual failure

Suppose the main profile cannot reach the node’s IP address. A second profile with a different name but the same address and the same unreachable first hop may offer no backup at all. Find the stage where the connection ends: name resolution, connection to the address, the secure handshake, or data transfer.

Likewise, Hysteria is not a form of XHTTP. The Hysteria 2 specification describes its own QUIC-based protocol. Testing that branch makes sense only where the required network path is available.

Test the backup under the same reproducible failure that breaks the primary route. If both rely on one unreachable address, adding a second name to the subscription does not solve the problem.

Use the same acceptance checks

Choose two or three candidates and define the same actions in advance:

  1. Start after fully closing the application.
  2. Browse sites and upload a file, rather than only running a brief reachability check.
  3. Leave the connection idle for a few minutes, then resume using it.
  4. Switch between Wi-Fi and mobile data.
  5. Use the required call or application.
  6. Update the subscription and reconnect.

For each run, record the device, network, profile, and specific outcome. Keep connection-setup latency, transfer speed, and stability separate: they are different characteristics.

Configure automatic selection separately

Two profiles in a subscription do not automatically create failover. The specific client or its configuration must implement it: a candidate group, probes, a selection rule, and behavior when every candidate fails. Test that failure in a separate test profile. The application should either select a reachable route or report the error clearly while retaining the expected direct-connection policy.

Present clear choices to the user

A final subscription needs clearly named options: a primary route, a backup, and a specialist option if there is a clear reason for it. Explain when to switch in one sentence beside the name.

Next, learn how XHTTP works, set up a site for REALITY, or find the cause of a connection failure. Choose the guide for the part you need to configure or investigate.

Next guide How internet censorship works: DPI, TSPU, blocking → ↗ Article unclear or something off? Message me and I will help or fix it. @notrealvpn →
This material is educational and covers network-infrastructure engineering. You are responsible for complying with the laws of your jurisdiction.