github.com/imannamdari/v2ray-core/v5@v5.0.5/proxy/vmess/encoding/encoding.go (about) 1 package encoding 2 3 import ( 4 "github.com/imannamdari/v2ray-core/v5/common/net" 5 "github.com/imannamdari/v2ray-core/v5/common/protocol" 6 ) 7 8 //go:generate go run github.com/imannamdari/v2ray-core/v5/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 )