move shared code to base class, add http proxy support #102