Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Revert "Disable IPv6 temporarily"
Browse files Browse the repository at this point in the history
This reverts commit 8fc1376.
  • Loading branch information
bzEq committed Dec 16, 2023
1 parent 8fc1376 commit 677c58c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions frontend/socks5/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ func (self *Server) receiveRequest(r net.Conn) (req Request, err error) {
req.CMD = buf[1]
req.ATYP = buf[3]
switch req.ATYP {
// case ATYP_IPV6:
// r.SetReadDeadline(time.Now().Add(HANDSHAKE_TIMEOUT * time.Second))
// if _, err = io.ReadFull(r, buf[:net.IPv6len]); err != nil {
// return
// }
// req.DST_ADDR = make([]byte, net.IPv6len)
// copy(req.DST_ADDR, buf[:net.IPv6len])
case ATYP_IPV6:
r.SetReadDeadline(time.Now().Add(HANDSHAKE_TIMEOUT * time.Second))
if _, err = io.ReadFull(r, buf[:net.IPv6len]); err != nil {
return
}
req.DST_ADDR = make([]byte, net.IPv6len)
copy(req.DST_ADDR, buf[:net.IPv6len])
case ATYP_IPV4:
r.SetReadDeadline(time.Now().Add(HANDSHAKE_TIMEOUT * time.Second))
if _, err = io.ReadFull(r, buf[:net.IPv4len]); err != nil {
Expand Down

0 comments on commit 677c58c

Please sign in to comment.