1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00
v2fly/proxy/vmess/encoding/encoding.go

20 lines
478 B
Go
Raw Normal View History

2017-04-08 19:43:25 -04:00
package encoding
2018-02-23 17:42:01 -05:00
import (
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
)
2018-09-30 17:08:41 -04:00
//go:generate errorgen
2018-02-23 17:42:01 -05:00
const (
Version = byte(1)
)
var addrParser = protocol.NewAddressParser(
2018-02-23 18:57:54 -05:00
protocol.AddressFamilyByte(byte(protocol.AddressTypeIPv4), net.AddressFamilyIPv4),
protocol.AddressFamilyByte(byte(protocol.AddressTypeDomain), net.AddressFamilyDomain),
protocol.AddressFamilyByte(byte(protocol.AddressTypeIPv6), net.AddressFamilyIPv6),
2018-02-23 17:42:01 -05:00
protocol.PortThenAddress(),
)