split proxy code into static lib for testing against