WebSocket SSL Support #13

Merged
kokarare1212 merged 2 commits from main into main 2023-10-05 15:26:07 +03:00
kokarare1212 commented 2023-10-05 14:34:54 +03:00 (Migrated from github.com)

This is a very rare case, but if you are using a reverse proxy such as ngrok, accessing WebSocket from the https protocol will not function properly because it uses the wss protocol.
Therefore, we have made a change to use the wss protocol when accessing via https.

This is a very rare case, but if you are using a reverse proxy such as ngrok, accessing WebSocket from the https protocol will not function properly because it uses the wss protocol. Therefore, we have made a change to use the wss protocol when accessing via https.
4yn commented 2023-10-05 15:25:55 +03:00 (Migrated from github.com)

I cannot recommend anyone do this as there will be added latency from tunneling through ngrok. Though if you know how to use ngrok, I assume you are already aware of this.

Code wise there is nothing wrong with this change so I will gladly accept the pull request. Thanks for the suggestion.

As a side note, you could avoid this change altogether by making ngrok tunnel via http without SSL, though this means your play data is being transferred unencrypted over the internet.

$ ngrok tcp 1116
ngrok
[...]
Forwarding                    tcp://0.tcp.ap.ngrok.io:15523 -> localhost:1116 
# Access via http://0.tcp.ap.ngrok.io:15523

I've temporarily labelled this repository as participating in hacktoberfest. In case you are participating in it, this PR should count to your contribution quota

I **cannot** recommend anyone do this as there will be added latency from tunneling through ngrok. Though if you know how to use ngrok, I assume you are already aware of this. Code wise there is nothing wrong with this change so I will gladly accept the pull request. Thanks for the suggestion. As a side note, you could avoid this change altogether by making ngrok tunnel via http without SSL, though this means your play data is being transferred unencrypted over the internet. ```powershell $ ngrok tcp 1116 ngrok [...] Forwarding tcp://0.tcp.ap.ngrok.io:15523 -> localhost:1116 # Access via http://0.tcp.ap.ngrok.io:15523 ``` --- I've temporarily labelled this repository as participating in [hacktoberfest](https://hacktoberfest.com/). In case you are participating in it, this PR should count to your contribution quota
Sign in to join this conversation.