简体   繁体   中英

HTML5 websockets and proxy configs

I am using Debian 7 and browser Google Chrome (35). When I am trying to pass echo test on websockets.org there is an error in console:

WebSocket connection to 'ws://echo.websocket.org/?encoding=text' failed: Failed to send WebSocket frame. 

My PC is behind the proxy with Squid 3, but another users behind the same proxy can passing echo tests on websockets.org (squid configs are the same for each user).

How can I debug this issue?

I have turned off all my reverse proxy servers (nginx, apache)

If i write the following code in my Google chrome console :

socket = new WebSocket("ws://echo.websocket.org/");

Then I can not see any frames (there is no handshacking phase) in the network page (Google chrome dev tools).

UPDATE:

The interesting thing, that websockets connection working for me with the latest version of the Iceweasel browser (Firefox), but it does not work with Google Chrome or Chromium.

I am starting Google Chrome with the following command:

/usr/bin/google-chrome-stable %U --proxy-server="http://172.16.20.12:4554"

What else can be done? Many thanks in advance.

The handshaking are not frames, is just plain HTTP. If you initiated a Websocket connection, and the server returns a HTTP 101 Switching Protocols response, that is the handshake.

Have you tried with WSS:// rather than WS://?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM