1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-30 22:15:27 -05:00

simplify import

This commit is contained in:
Darien Raymond
2017-01-13 23:42:39 +01:00
parent 88b607d31b
commit b40a139310
12 changed files with 66 additions and 69 deletions

View File

@@ -15,7 +15,7 @@ import (
"v2ray.com/core/common/dice"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/proxy/vmess"
@@ -85,13 +85,13 @@ func (v *ClientSession) EncodeRequestHeader(header *protocol.RequestHeader, writ
buffer = header.Port.Bytes(buffer)
switch header.Address.Family() {
case v2net.AddressFamilyIPv4:
case net.AddressFamilyIPv4:
buffer = append(buffer, AddrTypeIPv4)
buffer = append(buffer, header.Address.IP()...)
case v2net.AddressFamilyIPv6:
case net.AddressFamilyIPv6:
buffer = append(buffer, AddrTypeIPv6)
buffer = append(buffer, header.Address.IP()...)
case v2net.AddressFamilyDomain:
case net.AddressFamilyDomain:
buffer = append(buffer, AddrTypeDomain, byte(len(header.Address.Domain())))
buffer = append(buffer, header.Address.Domain()...)
}