1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-26 12:05:35 -05:00

remove duplicated address type def

This commit is contained in:
Darien Raymond
2017-10-21 21:59:46 +02:00
parent f1a15e92f5
commit 24089bfad0
5 changed files with 23 additions and 26 deletions

View File

@@ -89,13 +89,13 @@ func (c *ClientSession) EncodeRequestHeader(header *protocol.RequestHeader, writ
switch header.Address.Family() {
case net.AddressFamilyIPv4:
buffer = append(buffer, AddrTypeIPv4)
buffer = append(buffer, byte(protocol.AddressTypeIPv4))
buffer = append(buffer, header.Address.IP()...)
case net.AddressFamilyIPv6:
buffer = append(buffer, AddrTypeIPv6)
buffer = append(buffer, byte(protocol.AddressTypeIPv6))
buffer = append(buffer, header.Address.IP()...)
case net.AddressFamilyDomain:
buffer = append(buffer, AddrTypeDomain, byte(len(header.Address.Domain())))
buffer = append(buffer, byte(protocol.AddressTypeDomain), byte(len(header.Address.Domain())))
buffer = append(buffer, header.Address.Domain()...)
}
}