Move self.proxy decision logic out of init and into a helper

This logic represented a sizeable chunk of logic in the main init()
method. This commit moves it out into a more meaningful helper
function.

I changed the flow up a bit to add documentation, return early and
not be so nested, but the logic itself hasn't changed.