Track proxy state with an enum instead of flags

This will make new checks easier to implement, such as read-only
connection checks in issue #10.