4

我使用angular-wamp作为客户端,使用Crossbar作为路由器。当我在没有 ssl (https) 的情况下使用 WAMP 时,它可以完美运行。但是当我尝试实现 Secure WebSocket 时,它在控制台中给出了这样的错误:

WAMP connection closed unreachable { 
 reason: null,
 message: null,
 retry_delay: 2.052066390813223,
 retry_count: 2,
 will_retry: true 
}

但在浏览器中显示恭喜!您已连接到 WAMP 服务器!

我使用wss://localhost:8080/ws作为连接的 url。将此链接用作参考https://github.com/crossbario/crossbarexamples

Node.js 服务器在 3000 端口上运行。

陷入困境,任何帮助将不胜感激。

我已经接受了 localhost 和 127.0.0.1 的临时不安全认证(通常是我们的自我认证),但仍然低于标准。

在浏览器日志中:恭喜!您已连接到 WAMP 服务器!

我已接受自签名认证(localhost 和 127.0.0.1):

127.0.0.1

本地主机

4

1 回答 1

3

请通过您的网络浏览器访问https://localhost:8080/ws,并接受临时的不安全认证(通常是我们的自我认证),然后您就可以进入您的测试网络应用程序而不会出现此错误。

PS 提醒一下,localhost 和 127.0.0.1 都应该被独立接受。

于 2016-07-24T08:46:03.610 回答