test: refactor tests

 - use `proxy` module
 - add locally spawned proxy server tests
 - add locally spawned SSL proxy server tests