copy support for wss:// from https://github.com/turnpedallabs/ws