micro_proxy

Our router master kept nagging me about these IPv6 tunnels* that we’ve setup and we haven’t really (test)driven. Which is quite expectable since we have not yet standardized on our IPv6 addressing scheme. However, he was right: We should create some traffic. So, instead of handing out space that we might reclaim later, we decided (as a one hour exercise) to IPv6 enable our web proxy server.

Which we did fairly easy: Just modprobe ipv6 and configure the network interface. We pinged and tracerouted some IPv6 addresses, verified connectivity and edited /etc/network/interfaces (it is a Debian machine) accordingly (amazingly easy BTW, just man interfaces).

Since we did not really want to mess with the current proxy software, we decided to run another proxy software on the same machine. Our preferred choice was micro_proxy:

“micro_proxy is a very small Unix-based HTTP/HTTPS proxy. It runs from inetd, which means its performance is poor. But for low-traffic sites, it’s quite adequate. It implements all the basic features of an HTTP/HTTPS proxy, including IPv6 forwarding, in only 320 lines of code.”

The best thing about Jef Poskanzer’s code is that it is elegant and totally readable. That means that when it does not do exactly what you want, you are only minutes away from the solution. In this case, micro_proxy, when given a URL by default tries to use an IPv4 address first and if it does not exist falls back to IPv6. We needed the exact opposite (first try IPv6; if it fails try IPv4) and with only 320 loc, locating the 17 lines that needed to be rearranged proved an easy task.

So if you are one of our users, set your web proxy option to proxy.tee.gr (port number 8086+) and try the Cool IPv6 stuff from sixxs.net.


[*] – You can set up an IPv6 tunnel by using Hurricane Electrict‘s excellent tunnelbroker. A very helpful tutorial can be found at the OpenBSD Journal: IPv6 Test Lab (Part 1 and Part 2).

[+] – Our router master insisted on port number 8088 whereas I find port number 8086 more appropriate. I won.

4 thoughts on “micro_proxy

  1. Για δες καιρό που διάλεξα να μην έχω δίκτυο!

    Εύγε στο ΤΕΕ. Μακάρι να διαβάζουν οι άλλοι ISP admins να παίρνουν ιδέες που θ’ αρέσουν στους power users τους.

  2. @Vaggelis:
    All we needed was an IPv4 to IPv6 HTTP and HTTPS relay. Caching is not needed at the moment.

    @stsimb:
    Indeed the sex industry is the best promoter for new technologies (just like the DVD or more recent the MMS messages)

Leave a reply to Vaggelis Cancel reply