1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-02 20:15:24 +00:00
v2fly/spec/vmess.md
2015-09-12 22:11:54 +02:00

47 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# VMess 设计
## 摘要
* 版本1
## 数据请求
版本部分:
* 1 字节:版本号,目前为 0x1
认证部分:
* 16 字节md5(用户 ID + 'ASK')
指令部分:
* 1 字节:随机填充长度 M (0 < M <= 32)
* M 字节随机填充内容
* 16 字节请求数据 IV
* 16 字节请求数据 Key
* 4 字节认证信息 V
* 1 字节指令
* 0x00保留
* 0x01TCP 请求
* 0x02UDP 请求
* 2 字节目标端口
* 1 字节目标类型
* 0x01IPv4
* 0x02域名
* 0x03IPv6
* 目标地址
* 4 字节IPv4
* 1 字节长度 + 域名
* 16 字节IPv6
* 1 字节随机填充长度 M2 (0 < M2 <= 32)使得指令部分长度为 16 的倍数字节
* M2 字节随机填充内容
数据部分
* N 字节请求数据
其中指令部分经过 AES-128 加密Key md5(用户 ID + 'PWD')数据部分使用 AES-128-CBC 加密
## 数据应答
认证部分
* 4 字节认证信息 V
数据部分
* N 字节应答数据
其中数据部分使用 AES-128-CBC 加密IV md5(请求数据 IV)Key md5(请求数据 Key)