nuclei icon indicating copy to clipboard operation
nuclei copied to clipboard

Connection reuse for RFC compliant HTTP requests

Open ehsandeep opened this issue 2 years ago • 2 comments

Please describe your feature request:

For HTTP protocol excluding unsafe requests, connection reuse could be used for performance improvements.

ehsandeep avatar Jun 27 '22 12:06 ehsandeep

Enabling connection reuse (Enabling keep-alive, disabling request.Close, removing Connection: close header, reading all the body) for RFC compliant HTTP requests doesn't speed up elaboration towards a single target Normal Execution:

$ time echo https://192.168.1.1 | go run . -silent -t /Users/user/go/src/github.com/projectdiscovery/nuclei-templates/technologies/
real    1m28.692s
user    0m4.909s
sys     0m2.004s

Connection Reuse:

$ time echo https://192.168.1.1 | go run . -silent -t /Users/user/go/src/github.com/projectdiscovery/nuclei-templates/technologies/
real    1m25.623s
user    0m5.803s
sys     0m1.980s

Mzack9999 avatar Jul 08 '22 13:07 Mzack9999

Were speed tests done only on local networks? I think this kind of improvement shouldn't have as much impact on local networks as on external ones. Another suggestion would be to investigate the possibility of implementing using http pipelining. image

https://youtu.be/vCpIAsxESFY?t=264

brenocss avatar Aug 03 '22 23:08 brenocss

This will be reworked as part of https://github.com/projectdiscovery/nuclei/issues/3077

Mzack9999 avatar Dec 28 '22 08:12 Mzack9999