support partially restricted modes

It was not previously possible to have an unrestricted port/password/ssl while restricting the host.