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

服务器端如何使用开启wss #16

Closed
jamesolasx opened this issue Jun 5, 2024 · 2 comments
Closed

服务器端如何使用开启wss #16

jamesolasx opened this issue Jun 5, 2024 · 2 comments

Comments

@jamesolasx
Copy link

jamesolasx commented Jun 5, 2024

服务端如何使用开启wss

@jamesolasx
Copy link
Author

jamesolasx commented Jun 5, 2024

以及服务器端能否支持https

@sazima
Copy link
Owner

sazima commented Jun 5, 2024

自己加个nginx反向代理, 客户端配连接url的时候写wss就行

server{
    listen       443  ssl;
    server_name    jaaaaaa.com;
    ssl_certificate /helloxxxxxxxx.crt;
    ssl_certificate_key /helloxxxxx.key;

   location /websocket_path {
            proxy_pass http://127.0.0.1:18888;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }

}
  

@sazima sazima closed this as completed Jun 5, 2024
@sazima sazima pinned this issue Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants