projectdiscovery / fastdialer

Dialer with DNS Cache + Dial History

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate parallel dial

Mzack9999 opened this issue · comments

Investigate introducing parallel dialing in fastdialer/fastdialer/dialer.go.dial(...) and returning the first successful connection (with optional reuse/load balancing of other connections) similarly to https://go.dev/src/net/dial.go.dialParallel(...) to reduce failure time and cumulative timeout

If a domain, such as hackerone.com, resolves to multiple IPs, Fastdialer previously used sequential iteration. This was inefficient because if a port on the address was closed, Fastdialer would iterate over all IPs and each failed iteration would add to the total time. This issue was exacerbated when Nuclei called this function on 1000 goroutines, creating a bottleneck and delay in execution.