proxy-chain icon indicating copy to clipboard operation
proxy-chain copied to clipboard

Feature Request: Built-in Bandwidth Limiting Support for ProxyChain

Open abdulahpro opened this issue 7 months ago • 1 comments

Hello, thank you for the amazing work on proxy-chain!

I'm requesting a feature to support built-in bandwidth throttling for incoming/outgoing traffic. Currently, proxy-chain does not provide any option to limit bandwidth per connection or globally. To achieve this, users have to manually use stream-throttle or similar libraries and hook into raw TCP connections using server.server.on('connection').

However, this approach is low-level, error-prone, and may break internal handling (e.g., TLS tunnels, HTTP parsing, etc.). Having official support for throttling would make it easier to:

  • Limit bandwidth per connection (e.g., 10 Mbps per client)
  • Set global bandwidth limits for the proxy server
  • Prevent abuse or overload of upstream proxies
  • Simulate network conditions for testing

Suggested API Design:

const server = new ProxyChain.Server({
  port: 8000,
  bandwidthLimit: {
    rate: 10 * 1024 * 1024, // bytes per second
    perConnection: true // or false for global throttle
  }
});

abdulahpro avatar May 04 '25 13:05 abdulahpro

Up!.

This is a great feature to have in the proxy-chain, great idea!!.

DaniHRE avatar May 05 '25 02:05 DaniHRE