1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-16 04:35:24 +00:00

update vmess format

This commit is contained in:
V2Ray 2015-09-05 23:03:56 +02:00
parent 7c20b392d4
commit 1e9b8a2cdd
2 changed files with 12 additions and 3 deletions

View File

@ -1,9 +1,19 @@
package net
import (
"net"
)
type VMessHandler struct {
}
func (*VMessHandler) Listen(port uint8) error {
listener, err := net.Listen("tcp", ":" + string(port))
if err != nil {
return err
}
return nil
}

View File

@ -13,6 +13,7 @@
* 1 字节:保留,总是 0x00
* 16 字节:请求数据 IV
* 16 字节:响应数据 IV
* 4 字节:认证信息 V
* 1 字节:指令
* 0x00保留
* 0x01TCP 请求
@ -32,10 +33,8 @@
其中指令部分经过 AES-256 加密Key 为 left(用户 VID, 32);数据部分使用块密码加密
## 数据应答
版本部分:
* 1 字节:版本号,目前为 0x1
认证部分:
* 16 字节md5(用户 VID + 'ANS')
* 4 字节:认证信息 V
数据部分
* N 字节:应答数据