Don't crash on error, instead log and fast-fail client
Add command-line option to switch between proxy and target host mode
Add option for port to listen on