mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
479 B
32 lines
479 B
package io
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
type VMessInput struct {
|
|
version byte
|
|
userHash [16]byte
|
|
randHash [256]byte
|
|
respKey [32]byte
|
|
iv [16]byte
|
|
command byte
|
|
port uint16
|
|
target [256]byte
|
|
data []byte
|
|
}
|
|
|
|
type VMessReader struct {
|
|
conn *net.Conn
|
|
}
|
|
|
|
func NewVMessReader(conn *net.Conn) (VMessReader, error) {
|
|
var reader VMessReader
|
|
reader.conn = conn
|
|
return reader, nil
|
|
}
|
|
|
|
func (*VMessReader) Read() (VMessInput, error) {
|
|
var input VMessInput
|
|
return input, nil
|
|
} |