feat: add socks5 server test

This commit is contained in:
tobyxdd
2023-06-05 16:27:06 -07:00
parent ea29efc298
commit 901e0480f2
3 changed files with 167 additions and 0 deletions

View File

@@ -254,6 +254,7 @@ func (s *Server) udpServer(udpConn *net.UDPConn, hyUDP client.HyUDPConn) error {
if err != nil {
continue
}
addr = addr[1:] // Remove the leading length byte
d := socks5.NewDatagram(atyp, addr, port, bs)
_, _ = udpConn.WriteToUDP(d.Bytes(), clientAddr)
}