

Is this on the same machine, or multiple machines?
The typical/easy design for an outgoing proxy, would be to set the proxy on one machine, configure the client on another machine to connect to the proxy, and drop any packets from the client that aren’t targeted at the proxy.
For a transparent proxy, all connections coming from a client could be rewritten via NAT to go to the proxy, then the proxy can decide which ones it can handle or is willing to.
If you try to fold this up into a single machine, I’d suggest using containers to keep things organized.
You can run a stress test, and compare your desired response times with the resource usage on the server side.
https://en.wikipedia.org/wiki/ApacheBench
Take into account all the requests needed to load a website, and the fact that:
Loading some content in 100ms, then loading more in the background, is a reasonable compromise. You may want a very quick response time for the first few requests, then put the rest on a possibility slower server, or running at a lower priority.