github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/proxy/vmess/encoding/encoding.go (about) 1 package encoding 2 3 import ( 4 "v2ray.com/core/common/net" 5 "v2ray.com/core/common/protocol" 6 ) 7 8 //go:generate go run v2ray.com/core/common/errors/errorgen 9 10 const ( 11 Version = byte(1) 12 ) 13 14 var addrParser = protocol.NewAddressParser( 15 protocol.AddressFamilyByte(byte(protocol.AddressTypeIPv4), net.AddressFamilyIPv4), 16 protocol.AddressFamilyByte(byte(protocol.AddressTypeDomain), net.AddressFamilyDomain), 17 protocol.AddressFamilyByte(byte(protocol.AddressTypeIPv6), net.AddressFamilyIPv6), 18 protocol.PortThenAddress(), 19 )