Remove 4in6 cast

This commit is contained in:
世界 2022-09-25 17:59:18 +08:00
parent 86d7d51023
commit b12b8b7fd2
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
7 changed files with 36 additions and 24 deletions

View file

@ -62,7 +62,7 @@ func (s *Serializer) WriteAddress(buffer *buf.Buffer, addr Socksaddr) error {
return err
}
if addr.Addr.IsValid() {
_, err = buffer.Write(addr.Unwrap().Addr.AsSlice())
_, err = buffer.Write(addr.Addr.AsSlice())
} else {
err = WriteSocksString(buffer, addr.Fqdn)
}