Merge pull request #1541 from projectdiscovery/orig-1469

Fork of https://github.com/projectdiscovery/httpx/pull/1469 - strict resolvers
This commit is contained in:
Mzack9999 2024-01-15 22:12:22 +01:00 committed by GitHub
commit 011a9698cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,13 @@ type HTTPX struct {
func New(options *Options) (*HTTPX, error) {
httpx := &HTTPX{}
fastdialerOpts := fastdialer.DefaultOptions
fastdialerOpts.EnableFallback = true
// if the user specified any custom resolver disables system resolvers and syscall lookup fallback
if len(options.Resolvers) > 0 {
fastdialerOpts.ResolversFile = false
fastdialerOpts.EnableFallback = false
}
fastdialerOpts.Deny = options.Deny
fastdialerOpts.Allow = options.Allow
fastdialerOpts.WithDialerHistory = true