mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #1144 from projectdiscovery/issue-1129-headless-proxy
Fixing http proxy not working in headless browserdev
commit
6741cfb4f4
|
@ -3,6 +3,7 @@ package engine
|
|||
import (
|
||||
"crypto/tls"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/protocolstate"
|
||||
|
@ -22,5 +23,12 @@ func newhttpClient(options *types.Options) *http.Client {
|
|||
InsecureSkipVerify: true,
|
||||
},
|
||||
}
|
||||
|
||||
if options.ProxyURL != "" {
|
||||
if proxyURL, err := url.Parse(options.ProxyURL); err == nil {
|
||||
transport.Proxy = http.ProxyURL(proxyURL)
|
||||
}
|
||||
}
|
||||
|
||||
return &http.Client{Transport: transport, Timeout: time.Duration(options.Timeout*3) * time.Second}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/go-rod/rod/lib/proto"
|
||||
)
|
||||
|
||||
// Page is a single page in an isolated browser instanace
|
||||
// Page is a single page in an isolated browser instance
|
||||
type Page struct {
|
||||
page *rod.Page
|
||||
rules []requestRule
|
||||
|
|
Loading…
Reference in New Issue