IOS的微信小程序没有问题,Android端的微信小程序报以下错误。
服务端环境是 穿透到本机:
win
nginx (还有natapp的穿透,然后反向代理到go,证书在freessl.org生成)
go(github.com/gin-gonic/gin和github.com/gorilla/websocket)
nginx 的配置如下
ssl_certificate full_chain.pem;
ssl_certificate_key private.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
access_log nul; #关闭访问日志
location /ws/ {
proxy_pass http://127.0.0.1:6868;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}