Base on https://code.google.com/p/gappproxy/