diff --git a/socks5.go b/socks5.go index 9b8d314..8a32b59 100644 --- a/socks5.go +++ b/socks5.go @@ -176,6 +176,11 @@ func (req *UserPassRequest) Write(w io.Writer) error { return err } +func (req *UserPassRequest) String() string { + return fmt.Sprintf("%d %s:%s", + req.Version, req.Username, req.Password) +} + /* Username/Password authentication response +----+--------+ @@ -219,6 +224,11 @@ func (res *UserPassResponse) Write(w io.Writer) error { return err } +func (res *UserPassResponse) String() string { + return fmt.Sprintf("%d %d", + res.Version, res.Status) +} + type Addr struct { Type uint8 Host string