How to make HAProxy redirect traffic via a certain sub-proxy depending on URL?
I have a server (S-1) with HAProxy and a number of residential proxies (PR-s) as login-passwords-port. There're multiple users who will connect to the internet via S-1.
I want to have HAProxy to forward incomming traffic of the users via a random proxy amoung PR-s with 2 conditions:
only when there's certain, pre-defined keyword in the URL, traffic must be routed via a proxy.
In all other cases, it must go to a requested resource directly as is, without a proxy
Remember, SSL/HTTPS does encrypt the URL path, so if the final website requires HTTPS, your proxy will need to have its certificate trusted by your clients