back
3 comments
Sure, sure.

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
Why was this downvoted? I'm not a developer, is there some kind of humour I've missed here?
It wasn't me but occasionally the mouse slips and hits the wrong button. It could also just be trolls.
Or it could be the "AWESOME" part... Still, I'd love to see a link too.
Apparently you can't just run the script with node and point your browser's http proxy to 8080. I suppose transparent proxy and http proxies act differently?
Just kidding! Follow the instructions in the script, and it works on localhost just fine. :-)