Fixes for Slanger

These changes make the client compatible with slanger, so it can be used for setups running behind a firewall.