News for hackers. Stuff that matters.
Re:Collect HN: Aprils Fools by gcr on Thursday March 31, 2011 @08:31PM (#2394400)
I'm planning on installing a transparent proxy that rotates web pages 1-2 degrees with CSS3 transforms.

https://github.com/gcr/proxies/blob/master/rotating-proxy.js

Re:Collect HN: Aprils Fools by nedwin on Friday April 01, 2011 @12:04AM (#2394879)
This is AWESOME.

Got a link to an example?

Re:Collect HN: Aprils Fools by gcr on Friday April 01, 2011 @10:04AM (#2396255)
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
Re:Collect HN: Aprils Fools by nedwin on Friday April 01, 2011 @01:25AM (#2395070)
Why was this downvoted? I'm not a developer, is there some kind of humour I've missed here?
Re:Collect HN: Aprils Fools by ajaimk on Friday April 01, 2011 @02:08AM (#2395174)
It wasn't me but occasionally the mouse slips and hits the wrong button. It could also just be trolls.
Re:Collect HN: Aprils Fools by mbreese on Friday April 01, 2011 @05:37AM (#2395622)
Or it could be the "AWESOME" part... Still, I'd love to see a link too.
Re:Collect HN: Aprils Fools by nilbus on Friday April 01, 2011 @10:55AM (#2396451)
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?
Re:Collect HN: Aprils Fools by nilbus on Friday April 01, 2011 @11:14AM (#2396536)
Just kidding! Follow the instructions in the script, and it works on localhost just fine. :-)