Fix secure connection via proxies; the client was hard-coded to only treat wss:, not https:, as a secure protocol.