zt2 / sqli-hunter

SQLi-Hunter is a simple HTTP / HTTPS proxy server and a SQLMAP API wrapper that makes digging SQLi easy.
420 stars 129 forks source link

Integrate Fixed Thread Pool for Request Processing #23

Closed 0dantee closed 2 months ago

0dantee commented 5 months ago

This commit introduces an enhancement to the proxy server's request processing mechanism by integrating a fixed-size thread pool, leveraging the concurrent-ruby gem. This change aims to improve the efficiency and stability of handling concurrent HTTP requests.

Key Changes:

Usage: The thread pool size can be customized by passing an additional option :thread_pool_size when initializing the proxy server. If not specified, the default size of 10 is used. This approach allows for easy adjustments to the concurrency level, accommodating both lightweight testing environments and more demanding production scenarios.

Example:

proxy_server = Hunter::Proxy.new(bind_host: '0.0.0.0', bind_port: 8080, ca_crt_path: 'path/to/ca.crt', ca_key_path: 'path/to/ca.key', thread_pool_size: 20)

I hope you will find this helpful, I wish you a wonderful day!