News for hackers. Stuff that matters.
Re:Ask HN: How did they do this? by nostrademons on Tuesday August 12, 2008 @03:45PM (#274398)
View source is your friend.

It's creating a frameset. The top frame is the address bar. The bottom frame is the content. When you enter an address in the top frame, it sets the source of the bottom frame to http://free.megaproxy.com/go/<url>. This goes out to the Internet, retrieves <url>, and rewrites all links to point to the appropriate megaproxy pages, so that you continue surfing through megaproxy.

When I was at my first job - way back when it was still a "teen content dot-com run exclusively by teenagers" - I wrote a little script that did exactly this, except that I rewrote the links so that they would float around the page and bounce off the edges of the window. I called it the LinksJynx. Then my boss yelled at me for wasting company time on frivolous coding projects like that. Personally I thought that was a little harsh, since I spent like 3 hours on it and that was far less than the amount of time I spent reading Harry Potter fanfiction on the job (or, for that matter, less than the amount of time the other engineers spent looking at porn and fucking the CTO's niece). But whatever.

Re:Ask HN: How did they do this? by zacharye on Tuesday August 12, 2008 @05:09PM (#274486)
Thanks for the help! So to hopefully clarify my bandwidth question a bit, and this might be a dumb question, but is there any way for the content of http://free.megaproxy.com/go/<url>; to completely avoid megaproxy servers? In the specific example of megaproxy I assume they need to run that page through their servers but if someone just wanted to display a webpage in this manner, could they avoid running the third-party site through their servers and just feed the page directly from the source to the viewer?
Re:Ask HN: How did they do this? by nostrademons on Tuesday August 12, 2008 @05:43PM (#274509)
Yeah, you could set the frameset src to point directly to the webpage of interest. You lose the ability to alter or read the page content from your address bar, though. (I think; perhaps you could exploit some browser security bugs to do it, but you shouldn't be able to.)
Re:Ask HN: How did they do this? by zacharye on Tuesday August 12, 2008 @07:09PM (#274569)
Thanks, that's exactly what I needed to know. Much appreciated!