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.