I have a website ran on apache2 and a SOCKS proxy server that are both hosted on the same computer. The website can be accessed publicly and my SOCKS5 server is on localhost. How do I make the incoming and outgoing traffic from the apache server go through my SOCKS server?
This is easily done via client side as they can host the SOCKS server (themselves) and change the configuration (e.g. through Firefox network). The reason I need this is because there are functions I have in the modified SOCKS that manipulates the traffic for company purposes.
Model: Client <--> SOCKS server<-->... Internet ... <--> SOCKS server <--> Web Server