Simplify proxy check.
Extract logging setup to separate function.

Move plumbing aside…