This is AWESOME.
Got a link to an example?
Got a link to an example?
Run the proxy with
sudo -u nobody node rotating-proxy.js
It will start listening on your local machine. If you want to filter all output on your computer through this proxy, try an iptables redirect: iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080 -m owner '!' --uid-owner nobody
If you want to do it on the router for a network of machines, the trick is to redirect all HTTP traffic through a dedicated box running the proxy. Pretend this machine is 10.0.2.15.First, ensure that that machine's traffic gets through normally and isn't redirected to itself:
iptables -t nat -A PREROUTING -s 10.0.2.15 -j ACCEPT
Then, redirect all HTTP traffic on your network (say, 10.0.2.0/24) through that machine: iptables -t nat -A PREROUTING -s 10.0.2.0/24 -p tcp --dport 80 -j DNAT --to-destination=10.0.2.15:8080
Finally, ensure that your packets get back to the source with a masquerade: iptables -t nat -A POSTROUTING -p tcp -d 10.0.2.15 --dport 8080 -j MASQUERADE
Here's what it looks like.
http://img855.imageshack.us/img855/4035/april1.png