mirror of https://github.com/daffainfo/nuclei.git
fix: socks5 proxy not working on https target (#2228)
* fix: socks5 proxy not working on https target * small name refactor Co-authored-by: mzack <marco.rivoli.nvh@gmail.com>dev
parent
476773ff8c
commit
73a0043f2d
|
@ -221,6 +221,14 @@ func wrappedGet(options *types.Options, configuration *Configuration) (*retryabl
|
||||||
})
|
})
|
||||||
if proxyErr == nil {
|
if proxyErr == nil {
|
||||||
transport.DialContext = dc.DialContext
|
transport.DialContext = dc.DialContext
|
||||||
|
transport.DialTLSContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||||
|
// upgrade proxy connection to tls
|
||||||
|
conn, err := dc.DialContext(ctx, network, addr)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return tls.Client(conn, tlsConfig), nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue