mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
sync
This commit is contained in:
8
dial.go
8
dial.go
@@ -388,13 +388,7 @@ func (obj *Dialer) verifyUDPSocks5(ctx *Response, conn net.Conn, proxyAddr Addre
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var cnl context.CancelFunc
|
||||
udpCtx, cnl := context.WithCancel(context.TODO())
|
||||
wrapConn = NewUDPConn(udpCtx, wrapConn, &net.UDPAddr{IP: proxyAddress.IP, Port: proxyAddress.Port}, remoteAddr)
|
||||
go func() {
|
||||
tools.Copy(io.Discard, conn)
|
||||
cnl()
|
||||
}()
|
||||
wrapConn = NewUDPConn(conn, wrapConn, &net.UDPAddr{IP: proxyAddress.IP, Port: proxyAddress.Port}, remoteAddr)
|
||||
return
|
||||
}
|
||||
func (obj *Dialer) writeCmd(conn net.Conn, network string) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user