VMess, VLESS, Trojan, and Shadowsocks: How to Choose a Proxy Protocol

Compare encryption, handshake overhead, transport options, and client support across four popular protocols, with practical guidance for everyday browsing, mobile networks, and multiple devices.

At a glance

Already have a server or subscription? First, make sure your client correctly recognizes the protocol, transport, and security settings. Then test the initial connection, recovery after switching networks, and whether the same configuration works on your other devices. This guide distinguishes protocol-level encryption from transport-layer protection, compares two common sets of settings, and outlines a repeatable testing method to help you decide whether to switch protocols or simply fix a parameter.

Encryption and Transport: How the Four Proxy Protocols Differ

The client first applies its routing rules to decide whether a connection goes direct or through a proxy. Once a proxy is selected, the core builds a request using the relevant protocol and connects to the server over the configured transport and security layers. VLESS, WebSocket, and TLS describe a proxy protocol, a transport, and a connection security layer, respectively—they are not mutually exclusive options. Proxy protection typically covers the connection between your client and the proxy server. When you visit an HTTPS site, the browser-to-site HTTPS connection is a separate layer.

App requestRouting decisionProtocol encapsulationTransport connectionServer forwarding
ProtocolEncryptionNew connection overheadCommon transport setupsWhat to check in the client
VMessModern configurations typically use VMess AEAD request headers; payload encryption depends on the security setting.If TLS or WebSocket is layered on top, factor in the connection setup cost for those layers too.TCP, or WebSocket + TLS.Check the system time, UUID, and payload encryption setting.
VLESSWith the common encryption=none setting, protection is provided by the outer layer.A lighter protocol header alone doesn't guarantee a faster initial connection; the outer layers and connection reuse still matter.TCP + TLS. With REALITY, check core compatibility separately.Check the UUID, security layer, and whether the server requires a specific flow.
TrojanCommon configurations send authentication details and requests over a TLS connection.The first request includes the outer TLS handshake; authentication is sent with the protocol request.Typically TCP + TLS.Check the password, TLS server name, and certificate validation result.
ShadowsocksAEAD ciphers encrypt and authenticate proxy traffic; the method and key must match.Standard AEAD does not add a separate TLS handshake, but the underlying connection still takes time to establish.Commonly TCP and UDP; actual support depends on both endpoints and how traffic is handled locally.Check the encryption method and whether the core supports the specific protocol variant used by the server.

A client's name doesn't guarantee compatibility. On Android, v2rayNG uses the Xray core, while v2flyNG uses the V2Fly core. On desktop, v2rayN depends on the core used by the current outbound. For configurations involving REALITY, a specific flow, or a Shadowsocks 2022 method, check the core actually installed on the device and its version. Being able to import a link only means the client recognizes at least some of its fields; it doesn't mean every parameter will work when connecting.

Understanding Handshake Overhead: Test Initial Connections, Reuse, and Recovery Separately

For a new TCP + TLS connection, TCP is established first, followed by TLS negotiation. If you also use the common HTTP/1.1 WebSocket setup, an upgrade request comes next. Reused connections don't need to repeat every step for each request. After a network switch, however, the old connection may fail, adding setup overhead again even if the protocol hasn't changed.

443
The default HTTPS port—not a fixed port for proxy protocols
1 RTT
Round trips for a standard full TLS 1.3 handshake, excluding TCP setup and DNS
101
Response status code for a successful HTTP/1.1 WebSocket upgrade
  1. Initial connection: On the same device and network, run five fresh-connection tests against the same HTTPS test page you control. Disable browser caching and confirm that each run actually creates a new proxy connection; simply refreshing the page doesn't rule out connection reuse. Record the median time to first byte and the number of failures.
  2. Connection reuse: Keep the outbound connection open and make the same request five times in a row, recording whether responses stay consistent. If the client only reports a TCP probe, don't treat that number as the page's time to first byte.
  3. Recovery: On the same device, switch from Wi-Fi to mobile data and record how many seconds it takes to regain access to the test page. Repeat each configuration five times and count timeouts as failures. If the two setups use different servers or transports, the results compare the complete configurations, not just the protocols.

Identify the failure stage before comparing speed

First rule out configurations that repeatedly fail to connect on the network you need to use. If the remaining options have similar initial load times, choose for mobile use based on recovery time after a network switch and failure rate. One lower latency reading isn't a reason to change protocols.

After importing a subscription, which settings need to match the server?

In v2rayNG, tap the “+” in the top-right corner of the main screen to import a link or QR code, then open the imported entry for editing. Check the address and port first, followed by the transport and security layers, then the credentials and transport-specific fields. The examples below show two common combinations, not interchangeable settings. Use the values configured on the server and reverse proxy.

VLESS + TCP + TLS

Transport type
tcp; some interfaces label this RAW/TCP
Protocol encryption
This setup uses none
Security layer
tls
TLS server name
Use the name specified in the configuration that matches the certificate
Flow
Leave blank for a standard setup; use the specified value if required by the server

Setting protocol encryption to none does not mean you can disable TLS.

VMess + WebSocket + TLS

Transport type
ws
WebSocket path
Must match the server endpoint, for example /ws
WebSocket Host
Enter the value required by the server or reverse proxy
Security layer
tls
Payload encryption
Commonly auto; follow the configuration requirements

Check the WebSocket Host and TLS server name separately: Host is used for the HTTP request, while the server name is used for TLS.

Using the same 443 port doesn't prove that two connections use the same protocol. If the TLS certificate doesn't match, first check the address, TLS server name, and system time. If TLS succeeds but the WebSocket upgrade returns 404, check the Host, path, and whether the reverse proxy routes the request to the right endpoint. Change one setting at a time and retest to avoid conflating issues.

Choosing a Setup for Everyday Browsing, Mobile Networks, and Multiple Devices

  • Everyday browsing: If your VMess + WebSocket + TLS setup is stable, there's no need to rebuild the endpoint just to change protocols. If you also have a working VLESS + TCP + TLS setup, test both on the same network with fresh connections and reused requests. Extra upgrade steps are more likely to affect initial load when new connections are frequent; once a persistent connection is established, that overhead usually isn't incurred again.
  • Mobile networks: Switch between your usual Wi-Fi and mobile data and compare how quickly candidate VLESS, Trojan, or Shadowsocks setups recover. If web browsing works but a voice app doesn't, check separately whether UDP is handled locally, routing selects the intended outbound, and the server supports UDP forwarding. Changing the protocol name alone won't pinpoint the failing layer.
  • Multiple devices: Start testing on the oldest or hardest-to-update device. Import a candidate configuration into desktop v2rayN and every Android client you plan to use, then check that each can connect after a restart. If standard TLS works but one device doesn't recognize REALITY fields, keep both outbounds for now and migrate only after that device is updated and verified.
  • Already have a Shadowsocks server: Test it with the method and key provided by the server. Don't treat different methods as speed presets that can be swapped at will in the client. If browsing works but an app needs UDP, test that app separately; a successful TCP test doesn't verify UDP.

Common Questions About Switching Protocols and Troubleshooting Connections

Can I keep the same server address when switching from VMess to VLESS?

Only if the server explicitly offers VLESS at that endpoint. Keep the original configuration, import the VLESS configuration provided by the server, and test each one after checking the port, UUID, transport, and security layer. Changing the protocol in the client doesn't change the server endpoint.

Trojan reports a certificate name mismatch. What should I change?

Compare the TLS server name in the configuration with the names covered by the server certificate. If the connection address is an IP, the TLS server name may still need to be the domain specified by the server. Keep certificate verification enabled, and check the system time and certificate validity period.

Why does the same subscription work on desktop but not Android?

Connect both devices to the same Wi-Fi, open the details for the same entry, and compare the transport, security layer, and protocol-specific fields one by one. If fields are missing on Android, check the import format and client version. If the fields match but the logs report an unsupported feature, check which core each device actually uses and its version.

Why can I browse even though the latency test shows a result?

First check whether the test measures TCP, a request through the proxy, or something else. Then check whether browser traffic is being routed through the proxy. On desktop, verify that the system proxy is enabled and the browser uses it. On Android, check that the VPN is running and that per-app routing hasn't excluded the browser. Finally, retest with the same HTTPS test page to avoid mistaking a routing issue for a protocol issue.

Download a V2Ray Client