Dynamic ports for websocket client and beautify