use wss in https, use http in other protocols