VLESS 协议
VLESS(Very Lightweight Encrypted Socket Agent)是一种轻量级的网络传输协议,专为高性能网络代理而设计。
协议特点
- 🚀 高性能:协议开销极低,提供优秀的传输性能
- 🔐 灵活加密:支持 TLS、Reality、XTLS 等多种加密方式
- 📡 多传输支持:TCP、WS、gRPC、H2、QUIC 等
- 🎯 反审查能力:Reality 支持有效对抗深度包检测
配置示例
基础配置
json
{
"outbounds": [
{
"type": "vless",
"tag": "vless-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"flow": "xtls-rprx-vision",
"tls": {
"enabled": true,
"server_name": "example.com",
"reality": {
"enabled": true,
"public_key": "your-public-key",
"short_id": "your-short-id"
}
}
}
]
}WebSocket 传输
json
{
"outbounds": [
{
"type": "vless",
"tag": "vless-ws-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"transport": {
"type": "ws",
"path": "/vless",
"headers": {
"Host": "example.com"
}
},
"tls": {
"enabled": true,
"server_name": "example.com"
}
}
]
}Flow 控制
xtls-rprx-vision:推荐配置,提供最好的安全性和性能xtls-rprx-vision-udp443:允许 UDP 走 443 端口flow control:根据服务器支持情况选择
使用场景
- 高性能科学上网
- 游戏加速(低延迟要求)
- 大流量数据传输
- 对抗网络审查
优缺点
优点
- 协议开销极小,性能优异
- 支持多种现代加密方式
- Reality 支持强大的反审查能力
- 与 TLS 融合度高,不易被检测
缺点
- 需要配合 TLS/Reality 使用才能保证安全性
- 配置相对复杂,需要了解各种传输选项
与其他协议对比
| 协议 | 性能 | 安全性 | 兼容性 | 配置复杂度 |
|---|---|---|---|---|
| VLESS | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ |
| VMess | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
| Trojan | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ |
| Shadowsocks | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ |
注意事项
- 必须使用 TLS/Reality:VLESS 本身不加密,生产环境必须配合 TLS 或 Reality 使用
- 选择合适的 flow:根据服务器和客户端支持情况选择 flow 控制
- 端口选择:建议使用 443 端口获得更好的兼容性
- 证书配置:确保服务器证书配置正确,避免中间人攻击