I experimented a little with a Squid proxy. This is not a complete walk-through, just a list of helpful links.