mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
socks5: fixed a bug in target getting
This commit is contained in:
1 parent
88f09b30bc
commit
93728c6378
5 files changed
+22
-23
No files matched your search
@@ -159,8 +159,7 @@ func (s *Socks5) ListenAndServeUDP() {
|
||||
// Handshake fast-tracks SOCKS initialization to get target address to connect.
|
||||
func (s *Socks5) handshake(c net.Conn) (socks.Addr, error) {
|
||||
// Read RFC 1928 for request and reply structure and sizes
|
||||
buf := pool.GetBuffer(socks.MaxAddrLen)
|
||||
defer pool.PutBuffer(buf)
|
||||
buf := make([]byte, socks.MaxAddrLen)
|
||||
|
||||
// read VER, NMETHODS, METHODS
|
||||
if _, err := io.ReadFull(c, buf[:2]); err != nil {
|
||||
|
||||
Reference in new issue
Block a user