Are you an LLM? You can read better optimized documentation at /en\wiki\vmess.md for this page in Markdown format
VMess protocol
VMess is a dedicated protocol developed by the V2Ray project. Its rich feature set and extensibility have made it one of the most widely used proxy protocols.
Characteristics
- 🔐 Layered encryption: built-in encryption and authentication
- 📡 Flexible transports: TCP, WebSocket, gRPC, HTTP/2, QUIC and more
- 🎯 Camouflage: can mimic a variety of network traffic
- 🔄 Dynamic ports: supports dynamic port switching
- 🛡️ Protection: resists replay attacks and obfuscates traffic
Configuration examples
Basic TCP configuration
json
{
"outbounds": [
{
"type": "vmess",
"tag": "vmess-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"security": "auto",
"alter_id": 0,
"transport": {
"type": "tcp"
}
}
]
}WebSocket transport
json
{
"outbounds": [
{
"type": "vmess",
"tag": "vmess-ws-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"security": "auto",
"alter_id": 0,
"transport": {
"type": "ws",
"path": "/vmess",
"headers": {
"Host": "example.com"
}
},
"tls": {
"enabled": true,
"server_name": "example.com"
}
}
]
}gRPC transport
json
{
"outbounds": [
{
"type": "vmess",
"tag": "vmess-grpc-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"security": "auto",
"alter_id": 0,
"transport": {
"type": "grpc",
"service_name": "TunService"
},
"tls": {
"enabled": true,
"server_name": "example.com"
}
}
]
}Transport options in detail
TCP
- The most basic transport
- Good compatibility, but may be throttled by QoS
- Suited to stable networks
WebSocket
- Based on HTTP, so it slips through firewalls easily
- Supports CDN acceleration
- Good for deployments behind a web server
gRPC
- Based on HTTP/2, high performance
- Supports streaming
- Good for enterprise environments
QUIC
- Based on UDP, low latency
- Strong packet loss resilience
- Good for mobile networks
HTTP/2
- Multiplexed
- Header compression
- Good for modern networks
Security settings
Encryption methods
auto: automatically pick the best cipheraes-128-gcm: a solid choicechacha20-poly1305: friendly to mobile devices
alter_id
- Set it to 0 (recommended for modern setups)
- Older VMess deployments may require alter_id > 0
Use cases
- Traditional proxying needs
- Environments that need many transport options
- Enterprise deployments
- Compatibility with the V2Ray ecosystem
Pros and cons
Pros
- A mature, stable protocol with a complete ecosystem
- Many transports, so it adapts well
- Solid security mechanisms
- Good cross-platform support
Cons
- The protocol is relatively complex
- Traffic characteristics are fairly obvious
- Many options, so there is a learning curve
Troubleshooting
Connection failures
- Check the UUID and server details
- Verify the transport settings
- Confirm the TLS certificate configuration
- Review firewall and network settings
Slow speeds
- Try a different transport
- Change the encryption method
- Check server load
- Optimize network routing
DNS issues
- Configure a suitable DNS server
- Avoid DNS poisoning
- Use DoH or DoT