VMess, VLESS, Trojan, and Shadowsocks: Protocol Comparison & Use Cases

Compare encryption, handshake overhead, transport options, and client support for four proxy protocols to find the right fit for your network and devices.

At a Glance

This guide is for users choosing proxy nodes or setting up the same service on a computer and Android device. First, distinguish the protocol, transport, and security layer. Then compare how the four protocols handle authentication and encryption, and choose a primary node based on client compatibility and like-for-like testing. A protocol name alone does not determine speed; server routes, the complete configuration, and support in the actual core often matter more.

1. Understand the Node: Protocol, Transport, and Security Layer

A subscription entry such as “VLESS + WebSocket + TLS” combines three different components, not three interchangeable protocols. VLESS handles proxy requests and user authentication, WebSocket carries the data, and TLS protects the connection. Judging a node's speed or security by the word VLESS alone overlooks the settings that actually affect the connection.

Clients and cores are also separate. v2rayN, v2rayNG, and v2flyNG are clients for managing configurations; the core handles the actual connection. V2Ray and Xray do not support exactly the same features. Even nodes labeled VLESS may depend on a particular transport or security mechanism.

2. How the Four Protocols Handle Encryption and Authentication

All four protocols can be used for proxy connections, but they protect data differently. The table covers common configurations with broad compatibility. For newer extensions or core-specific settings, follow the server requirements and check what your local core supports.

Protocol Authentication Encryption and Security Common Configuration
VMess User identity based on a UUID; modern configurations use AEAD authentication Supports protocol-level encryption, depending on the security setting; TLS can also be added TCP;WebSocket + TLS
VLESS Usually a UUID Common configurations with encryption=none do not encrypt payloads at the protocol level; protection must come from TLS, REALITY, or another layer TCP + TLS;WebSocket + TLS;TCP + REALITY + Vision
Trojan Shared password Classic deployments rely on TLS to protect authentication and proxy data; proper certificate validation is important TCP + TLS
Shadowsocks Shared secret; the input format depends on the encryption method Protects proxy data using the selected cipher; classic AEAD and the 2022 series have different requirements Native TCP / UDP; extensions as specified by the server

VMess: Check AEAD First, Then Review Transport Settings

VMess isn't automatically unusable just because a node is old. A properly maintained AEAD node can still be a practical choice. The alterId setting in older configurations can be confusing: common modern configurations use 0 for AEAD. Don't change it to a larger number on your own. VMess authentication also depends on time, so keep your computer and phone clocks accurate.

VLESS: Common Configurations Use an Outer Security Layer

A common VLESS configuration with encryption=none does not mean the entire connection is unencrypted. An outer TLS or REALITY layer can protect it. Conversely, VLESS over TCP without a security layer is not protected in the same way just because the application accesses an HTTPS site. Some newer implementations offer additional encryption extensions, but they are not supported by every client.

Trojan and Shadowsocks: Passwords Mean Different Things

Trojan's shared password is used for authentication, while TLS protects the connection. With Shadowsocks, the password or key and the cipher together determine whether a connection can be established. For example, aes-128-gcm and chacha20-ietf-poly1305 are not interchangeable. The 2022 series also requires specific key formats; you can't simply reuse an old password and change the method.

3. Handshake Overhead and Speed: There Is No Fixed Protocol Ranking

The wait before a webpage first opens includes DNS lookup, connecting to the server, the outer security handshake, proxy authentication, and connecting to the destination. WebSocket often involves an HTTP upgrade; gRPC relies on HTTP/2; and TLS session reuse can also affect connection setup time. These combinations can't be reduced to a claim that one protocol always requires “one fewer handshake.”

Throughput is a separate consideration. Server bandwidth, peak-time congestion, packet loss, and device performance can all become bottlenecks. Under suitable conditions, VLESS + Vision can reduce some repeated-encryption overhead, but it is not a default feature of every VLESS node and does not guarantee better speed on every route.

443
A common HTTPS port, also often used by TLS nodes; the port alone does not prove TLS is enabled
1080
A commonly used SOCKS port convention, not necessarily the listening port used by your client
8388
A common port in Shadowsocks examples; use the value provided by the server when importing a node

These ports illustrate where different connection layers sit; they are not benchmark results. A server port and a local proxy port are different things: the browser connects to the local listening port, and the core then connects to the server port in the subscription. Entering the server's 443 port as your local SOCKS port will not create a proxy connection.

  1. Test on the same device, network, and at the same time. If possible, compare different protocol nodes on the same server route.
  2. For each candidate node, record five first-load timings for the same page, then run the same 30-second download test three times. Don't treat a single peak result as sustained speed.
  3. Before testing, keep the system proxy or VPN mode and routing rules consistent. Verify that the test traffic actually uses the selected node so direct connections don't skew the comparison.
  4. Record timeouts, median page-load time, and sustained download speed. TCP latency alone cannot tell you whether web browsing, video, or UDP apps will work.

4. Choosing a Protocol for Your Use Case: Start with Server Support

You can't switch a node from VMess to VLESS in the client alone without a matching server configuration. The recommendations below assume your provider has supplied a complete node for the protocol. If your current node works reliably, confirm the benefits of switching with real tests rather than judging by how new the protocol name sounds.

VLESS + REALITY + Vision

Recommended

With support on both ends and complete server settings, this is a strong candidate for an Xray setup. Verify the public key, server name, shortId, and flow. You can't fill in these values yourself based on a regular VLESS node.

Best for: Desktop and Android devices using the Xray core when the server provides a complete REALITY node.

VMess + WebSocket + TLS

Common in existing subscriptions. Check AEAD, the WebSocket path, Host, and TLS server name. Where the server allows it, this can work in setups that need WebSocket forwarding.

Best for: Existing, well-maintained VMess services or setups that already use WebSocket forwarding.

Trojan + TLS

Authentication and transport settings are relatively straightforward, but a valid certificate and correct server name are still required. Traditional Trojan's use of TLS does not mean every forwarding service supports it; a standard HTTP reverse proxy cannot replace TCP forwarding.

Best for: Services with an existing domain and TLS setup that use password authentication.

Shadowsocks AEAD

Common configurations focus on the address, port, cipher, and password. If you need UDP, check support on the server and client as well as the current traffic-routing mode. TCP support alone does not guarantee UDP will work.

Best for: Services configured with a compatible cipher, or users who want to keep a native TCP / UDP proxy setup.

5. Using v2rayN, v2rayNG, and v2flyNG Together

To check compatibility, verify the client version, core version, and complete protocol combination—not just the client name. v2rayN is a desktop client and can use different cores depending on the distribution and configuration. v2rayNG uses the Xray core; v2flyNG uses the V2Fly core. The latter two are not interchangeable for every node just because their names look similar.

Use the Same Subscription on Both Devices: Check the Core and Traffic Routing Separately

Desktop: v2rayN
  • Choose the appropriate release for Windows, macOS, or Linux.
  • Before using REALITY / Vision nodes, confirm that the running core is Xray and supports the combination.
  • Select a node and connect, then check the system proxy or TUN status and routing rules.
  • Check the local listening port in the current settings; don't reuse a value from another device.
Android: v2rayNG / v2flyNG
  • For nodes that require Xray features, use v2rayNG and check that the installed version is compatible.
  • Choose nodes supported by the V2Fly core in v2flyNG; don't assume it supports Xray-specific combinations.
  • After importing the same subscription, verify the node settings and grant the required system VPN permission.
  • Check per-app proxy settings so the apps you're testing are not excluded from the proxy.

The same subscription can provide nodes on both devices, but local ports, routing rules, DNS, and per-app settings do not sync automatically.

In the classic v2rayN interface, subscription management is commonly found under “Subscription Group” → “Subscription Group Settings,” while local settings are under “Settings” → “Parameter Settings.” The cross-platform desktop interface may use different names; follow the labels in your current version. On Android, use the add option on the main screen to import a share link, then review the selected node's edit screen. Don't assume button locations are identical across versions.

6. Checking Protocol Settings: What to Check First When a Connection Fails

Before changing settings, keep a copy of the original configuration from your service provider for comparison. Change only one setting at a time, based on evidence, then reconnect and check the logs. Changing the port, SNI, and transport all at once leaves you with no useful point of reference.

Node Type Fields to Check First Common Mistake
VMess UUID, alterId, security, system time, transport path Applying a nonzero alterId from an old guide to a modern AEAD node
VLESS + TLS UUID, encryption, server name, transport type, flow Forcing Vision on a WebSocket node or leaving out TLS
VLESS + REALITY UUID, public key, shortId, server name, fingerprint, flow Copying a public key from another node or changing only the security type to REALITY
Trojan Password, port, TLS server name, certificate validation Assuming the server name must be the IP address just because the connection address is an IP
Shadowsocks method, password or key, port, UDP support Mixing key formats for the 2022 series and classic AEAD

The server name for a TLS node usually matches a domain covered by the certificate, and may differ from the connection address. WebSocket's Host is an HTTP-layer field; the server can configure it separately from TLS SNI, but both must meet its requirements. If you see a certificate error, check the system time, domain, and certificate chain. Don't use allowInsecure as a routine fix.

If the logs show that the connection succeeded but some sites won't load, focus on DNS, routing rules, and the connection to the destination. Switching protocols might happen to put you on a different route, but that doesn't prove the original protocol was the problem. For general troubleshooting steps, see Troubleshooting. If a concept is unclear, check the Quick Reference.

7. Frequently Asked Questions About Choosing a Protocol

VLESS uses encryption=none. Should I change it to an encryption option?

Don't change it on your own. Open the node editor and check whether the required TLS or REALITY settings are already configured. Common VLESS setups use none and protect the connection at an outer layer. Any additional encryption extension must be supported by both ends; enabling it only on the client won't work.

Trojan has the right password, but why does the handshake still fail?

Check the port and TLS server name first, then look for system clock or certificate errors. The TLS handshake can fail before password authentication begins, so repeatedly changing the password won't help. Use the server name provided with the node; don't guess based on its label.

Shadowsocks loads webpages, but games won't connect. Why?

Check whether the game uses UDP, then verify UDP forwarding on the server, the local traffic-routing mode, and per-app rules. A standard HTTP proxy cannot handle arbitrary UDP apps. On desktop, make sure TUN is configured correctly; on Android, check that the game isn't excluded from VPN routing.

Some nodes from the same subscription are missing in v2flyNG. What should I do?

Check the complete settings for missing or failed nodes. If they require Xray features such as REALITY / Vision, use v2rayNG with support for that combination, or ask your provider for nodes compatible with V2Fly. Don't change an unsupported security type to TLS as a workaround.

Should I just choose whichever protocol has the lowest latency?

First check whether the test measures a TCP connection or an actual proxy request. Repeat the tests under the same conditions described above, comparing page loads, sustained downloads, and timeouts. Keeping one reliable primary node and one tested backup is more useful than ranking nodes by protocol name.

A good choice comes down to three steps: check what the server provides, confirm the client and core fully support it, then compare real-world performance on your current network. VMess, VLESS, Trojan, and Shadowsocks all require matching configurations. Changing a protocol name won't fix routing, DNS, or poor network routes.

Download v2rayN