Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please remove "ws://" #3

Open
driver1748 opened this issue Dec 15, 2022 · 2 comments
Open

Please remove "ws://" #3

driver1748 opened this issue Dec 15, 2022 · 2 comments
Labels
Do It by Yourself Do It by Yourself

Comments

@driver1748
Copy link

driver1748 commented Dec 15, 2022

image

Also tried global IPv4, failed too.

image

Only succeeded by adding the prefix "ws://".This is weird, is there a way to remove it?

image

This warning will not show up when "ws://" is missing.
Also, what's the difference between "ws" and "wss"?Users won't know it's difference between http and https.
The offical server used "wss", but connection failed to establish when I tried to connect localhost.Only "ws" works.
Also, when connecting offical server with "ws", No warning will show up.

image

In one word,pls make it more user-friendly :)

@driver1748 driver1748 changed the title Unable to connect to localhost Please remove "ws://" Dec 15, 2022
@Yunmoan
Copy link
Member

Yunmoan commented Dec 22, 2022

其实可以用中文

@Yunmoan
Copy link
Member

Yunmoan commented Dec 22, 2022

当使用HTTPS协议时,受到浏览器安全限制,只能以WSS协议(可以理解为WebSocket的SSL版),也就是wss://连接到后端,同时也需要为后端配置ssl证书以链接,您可以在index.html的javascript代码中自行添加 "ws://"+ 字段来让前端不显示ws://,此操作也会导致无法连接至wss服务器,官方演示demo中为确保兼容性则默认需要在地址中自带ws://或者wss://,您可通过修改HTML代码的方式修改默认后端地址。

When using the HTTPS protocol, it is restricted by the browser security. You can only connect to the back end using the WSS protocol (which can be understood as the SSL version of WebSocket), that is, wss://. At the same time, you need to configure the ssl certificate for the back end to link. You can add a ws://"+ field in the javascript code of index.html to prevent the front end from displaying ws://. This operation will also result in failure to connect to the wss server, In order to ensure compatibility in the official demo, ws://or wss://should be included in the address by default. You can modify the default backend address by modifying the HTML code.

@Yunmoan Yunmoan added the Do It by Yourself Do It by Yourself label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do It by Yourself Do It by Yourself
Projects
None yet
Development

No branches or pull requests

2 participants