Add support for https and wss when using domain names
Detect when using https and automatically connects using wss. Also added support for port 80/443 when using a domain name.
Hello,
I have probably done things wrong and the point of this fork was to have a repository to share these changes with my teammates, but I would appreciate your feedback if you have some time to read this.