mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 05:03:19 +08:00
Improve: gofmt -s for shadowsocks.go
This commit is contained in:
parent
018a6ba041
commit
bd0a1ae1a7
@ -93,13 +93,13 @@ func serializesSocksAddr(addr *C.Addr) []byte {
|
|||||||
case socks.AtypDomainName:
|
case socks.AtypDomainName:
|
||||||
len := uint8(len(addr.Host))
|
len := uint8(len(addr.Host))
|
||||||
host := []byte(addr.Host)
|
host := []byte(addr.Host)
|
||||||
buf = [][]byte{[]byte{aType, len}, host, port}
|
buf = [][]byte{{aType, len}, host, port}
|
||||||
case socks.AtypIPv4:
|
case socks.AtypIPv4:
|
||||||
host := addr.IP.To4()
|
host := addr.IP.To4()
|
||||||
buf = [][]byte{[]byte{aType}, host, port}
|
buf = [][]byte{{aType}, host, port}
|
||||||
case socks.AtypIPv6:
|
case socks.AtypIPv6:
|
||||||
host := addr.IP.To16()
|
host := addr.IP.To16()
|
||||||
buf = [][]byte{[]byte{aType}, host, port}
|
buf = [][]byte{{aType}, host, port}
|
||||||
}
|
}
|
||||||
return bytes.Join(buf, []byte(""))
|
return bytes.Join(buf, []byte(""))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user