core: make it possible to configure a different hostname and port for setting up websocket connections.