Advanced 12-minute read

V2Ray Protocol Guide For Beginners: VMess, VLESS, Or Trojan

New to V2Ray and unsure whether VMess, VLESS, Trojan, or Shadowsocks is right for you? This beginner-friendly guide compares compatibility, security, perform…

Choosing a V2Ray protocol can be confusing when a subscription lists VMess, VLESS, Trojan, and Shadowsocks together. These names do not describe four interchangeable labels for the same connection. Each protocol handles authentication, encryption, compatibility, and transport negotiation differently. A node that looks attractive because it uses a newer protocol may still be a poor choice if your client version, core, network environment, or subscription format does not support its parameters correctly.

For beginners using v2rayN on Windows, macOS, or Linux, or v2rayNG on Android, the practical decision is usually not “which protocol is the fastest in every situation?” It is “which complete combination of protocol, transport, security settings, client core, and server configuration can connect reliably and remain easy to troubleshoot?” The protocol is only one layer of the connection. Address, port, UUID or password, SNI, flow, WebSocket path, TLS mode, and routing settings must also agree with the server.

Quick summary

Use VLESS with Reality or TLS when your provider offers a current Xray configuration and your client supports it; choose VMess when compatibility with older profiles matters; consider Trojan when the server is explicitly configured for it and you prefer password-based authentication; use Shadowsocks for a simpler, broadly supported encrypted proxy rather than treating it as another VMess variant.

Start with the complete connection stack

A node entry contains more than a protocol name. A useful way to read it is as a stack with several independent layers. The protocol defines how the client authenticates and communicates with the server. The transport defines how bytes are carried, such as TCP, WebSocket, HTTP/2, or another supported method. The security layer protects the transport or supplies a browser-like handshake, commonly through TLS or Reality. The client core then creates a local inbound, such as a SOCKS or HTTP port, and the application traffic is sent into that inbound through the system proxy or TUN mode.

4
main protocol choices
3
common identity types
10808
typical local SOCKS port
2026
current setup baseline

For example, “VLESS + TCP + Reality” and “VLESS + WebSocket + TLS” both use VLESS for the user identity, but they do not have the same transport or handshake. A configuration imported from a subscription normally carries all of these fields. If you manually edit one field without understanding its relationship with the others, a valid server profile can become unusable even though the protocol label remains correct.

ProtocolIdentityTypical current combinationBeginner consideration
VMessUUIDWebSocket + TLS, TCPStrong legacy compatibility, but configuration details matter
VLESSUUIDTCP + Reality, TCP + TLSGood default for modern Xray profiles
TrojanPasswordTCP + TLSSimple identity model, but server TLS must be correct
ShadowsocksPassword and methodEncrypted proxy transportSimple and widely supported, with fewer Xray-specific features

Best starting point when the subscription provides a complete VLESS + Reality or VLESS + TLS profile and the client uses a current Xray core. It separates user identity from the encryption or transport layer and is common in modern deployments.

Suitable for: daily use, current Xray nodes, new subscriptions

A mature protocol with a large installed base. It remains useful for older servers and profiles, especially when a provider has already tested VMess with its WebSocket, TLS, or other transport settings.

Suitable for: legacy nodes, older client compatibility

A password-authenticated protocol commonly paired with TLS. It can be straightforward when the certificate, server name, and password are supplied correctly, but it should not be selected merely because its name sounds more secure.

Suitable for: explicit Trojan subscriptions, TLS-based deployments

A separate encrypted proxy design rather than a V2Ray user protocol. It is often easy to import and broadly supported, but protocol-specific features such as UUID-based VLESS identity or Xray flow settings do not apply.

Suitable for: simple proxy access, broad client support

Understand what VMess, VLESS, and Trojan actually change

VMess: mature compatibility with more legacy baggage

VMess identifies a user with a UUID and carries protocol metadata that the server validates. It has been used for many years and appears in a large number of existing subscription profiles. In v2rayN and v2rayNG, a VMess link may include the server address, port, UUID, alter identifier, encryption setting, network type, host, path, TLS flag, and server name. The exact fields depend on the transport and the format generated by the provider.

For a beginner, VMess is not automatically difficult, but it is easier to break through a small mismatch. A WebSocket profile needs the correct path and host header. A TLS profile needs an appropriate server name and a certificate that the server presents for that name. A TCP profile must match the server’s expected security and transport parameters. The value alterId belongs to older VMess configuration models; it should not be invented or changed when importing a current subscription unless the server documentation specifically requires it.

VLESS: a lightweight identity protocol for modern Xray profiles

VLESS generally uses a UUID for user identification but keeps the protocol layer comparatively lightweight. Encryption is normally supplied by the selected transport security, such as TLS or Reality, rather than by treating the protocol itself as a complete encrypted tunnel. This is why the VLESS protocol name alone is not enough to judge security. “VLESS without suitable transport security” and “VLESS + Reality” are different practical configurations.

VLESS is frequently paired with TCP and Reality, or with TCP, TLS, and a compatible flow setting. Some profiles use xtls-rprx-vision in the flow field. That field is not a general performance switch: it must be supported by both the selected Xray core and the server-side configuration. If the subscription provides a flow value, keep it unchanged unless you know why it is being edited. Removing it, adding it to a profile that does not support it, or combining it with the wrong transport can cause handshake failures.

Trojan: password authentication inside a TLS-oriented design

Trojan commonly authenticates the user with a password and is designed to operate with TLS. In a client profile, the important fields normally include the server address, remote port, password, TLS enabled state, server name, and sometimes transport-specific values. A Trojan node with a wrong SNI or an invalid certificate relationship may fail before password authentication is meaningfully tested.

Trojan can be a good choice when the provider gives a clearly documented profile and the server is known to be configured for it. It is not a drop-in replacement for VLESS: a Trojan password cannot be pasted into the UUID field of a VLESS profile, and changing the protocol selector while leaving the remaining parameters untouched does not convert a node. The server must accept the same protocol and expect the same authentication method.

VLESS + Reality

Identity
UUID
Transport
TCP
Flow
xtls-rprx-vision when supplied
Security
Reality
Fingerprint
chrome or provider value

Import the complete profile; do not guess the public key, short ID, SNI, or flow.

VMess + WebSocket + TLS

Identity
UUID
Transport
WebSocket
Path
Provider-defined path
Host
Provider-defined host
Security
TLS

The path, Host header, SNI, and TLS state must match the server profile exactly.

Choose based on your client and network situation

The safest beginner rule is to choose the protocol that is already supplied in a complete, tested subscription profile. A protocol comparison is useful for understanding the options, but it cannot compensate for missing server parameters. If a provider supplies VLESS + Reality, VMess + WebSocket + TLS, and Trojan profiles for the same location, start with VLESS + Reality on a current Xray core, then keep a VMess or Trojan profile as a compatibility fallback if it is also maintained.

On v2rayN, the core type can usually be selected from a settings path similar to Settings → Parameters settings → Core type. The exact wording can differ between releases, so look for the active core selection rather than relying on a screenshot from an older version. Xray is generally the appropriate core for current VLESS, Reality, and Vision-based profiles. A legacy v2ray core may not understand newer Xray-specific fields. When a subscription contains mixed protocol types, test one profile at a time and verify which core is active before concluding that the node is invalid.

On v2rayNG, first confirm that the imported profile is complete, then select the profile and start the connection using the intended VPN or local proxy mode. Android permissions, battery restrictions, private DNS behavior, and per-application routing can affect the result independently of the protocol. A node may pass a latency test while a selected application remains outside the VPN route. Test with a browser and check the connection log instead of using only the displayed delay value.

Transport choice also changes the diagnosis. A TCP-based profile often fails with a connection refusal or timeout when the remote port is blocked. WebSocket profiles may reach a server or intermediary but fail when the path or Host header is wrong. TLS and Reality profiles may show handshake or certificate-related errors when the server name, public key, short ID, fingerprint, or clock is incorrect. These are not interchangeable failure modes, so the log message is more valuable than the protocol name alone.

  1. Update the client

    Install a current v2rayN or v2rayNG release from the site’s download page, then confirm that the selected core supports the imported profile.

  2. Import the profile

    Use the subscription group or share-link import function. Do not manually recreate a VLESS, VMess, or Trojan entry when the provider already supplies a complete link.

  3. Check key fields

    Open the profile editor and verify the address, port, UUID or password, transport, TLS or Reality state, SNI, path, and flow against the provider’s values.

  4. Select the core

    In v2rayN, open Settings → Parameters settings → Core type and select the required Xray or compatible core. Restart the core after changing it.

  5. Activate and test

    Set the profile as the active server, enable the intended system proxy or TUN mode, then test one website and inspect the first relevant log line.

A practical two-profile fallback plan

Primary profile
  • VLESS + Reality
  • Current Xray core
  • Used for daily traffic
  • Keep all imported parameters
Compatibility profile
  • VMess + WebSocket + TLS or Trojan
  • Provider-tested legacy option
  • Used when the primary path fails
  • Test separately, not simultaneously

A fallback is useful only when it is a separately valid server profile; changing the protocol field of the primary node does not create one.

Avoid common selection mistakes

The first mistake is judging speed from the protocol label alone. Throughput and latency depend heavily on server distance, congestion, packet loss, CPU load, transport overhead, and the quality of the local network. On a stable connection, several protocols may deliver similar results. On a lossy or filtered path, a different transport or server location may matter more than switching from VMess to VLESS.

The second mistake is confusing a successful latency test with successful application traffic. A test may use a particular destination, local DNS path, or core operation that does not represent a browser, a command-line tool, or an Android application. After selecting a node, confirm that the system proxy is enabled and that the application is configured to use it. In TUN mode, check whether the application is included in the selected route and whether DNS handling is consistent with the mode.

The third mistake is changing several fields at once. If you replace the protocol, enable TLS, change the port, and alter the SNI in one edit, the resulting failure provides no useful evidence. Restore the original subscription profile, duplicate it if the client supports duplication, and change only one known parameter for a controlled test. Subscription updates may overwrite manual edits, so record which profile is being tested and whether it belongs to the current group.

Do not disable TLS certificate verification as a first response to a failed connection. This may hide a wrong SNI, an expired certificate, a server-side deployment error, or a malicious interception risk. Correct the server name and system clock, confirm that the subscription is current, and ask the provider for a replacement profile when the certificate relationship is genuinely broken.

client profile
  protocol: VLESS / VMess / Trojan / Shadowsocks
  transport: TCP / WebSocket / other supplied value
  security: TLS / Reality / none as explicitly documented
  identity: UUID or password
  routing: direct / proxy / block

local client
  SOCKS: 127.0.0.1:10808
  HTTP:  127.0.0.1:10809
  core:   selected Xray-compatible runtime

The local ports shown above are common examples, not universal defaults. If another application already occupies port 10808 or 10809, v2rayN may fail to start the inbound even when the remote node is healthy. Check the client’s actual local port settings and the startup log before troubleshooting the remote protocol.

Beginner questions about protocol choice

Should I always choose VLESS because it is newer?

No. Choose a complete VLESS profile when the server and current Xray core support it. If an older server supplies a tested VMess profile and the VLESS details are incomplete, the VMess profile is the more sensible choice.

Is Trojan automatically safer than VMess?

Neither name proves that the deployment is safer. Security depends on the server configuration, TLS or Reality parameters, certificate validation, password or UUID handling, and the software versions on both sides. Use the profile supplied by the server operator.

Can I change VMess to VLESS in the editor?

No. The server must accept VLESS and provide the corresponding identity, transport, security, and routing parameters. Import a real VLESS link instead of changing only the protocol selector.

Why does a Shadowsocks node look different?

Shadowsocks uses its own password and encryption-method model. It does not use a VLESS UUID, VMess alter identifier, or Reality public key. Enter or import it as a Shadowsocks profile and keep its method and password unchanged.

For most beginners in 2026, the decision can remain simple: use the current VLESS profile when it includes complete Reality or TLS parameters and the client’s Xray core supports them; use VMess for a known-good older deployment; use Trojan when the server specifically provides a valid Trojan configuration; and use Shadowsocks when simple, broad compatibility is the priority. Once the node connects, focus on the next layers—local proxy activation, DNS behavior, routing rules, and application coverage—because a correct protocol alone does not guarantee that every request will use the proxy.

Download v2rayN