都是建立一个TCP连接,服务器从TCP socket里解析出http request头,然后发送http response头。
处理的区别在于,传统的请求在发送response头之后,只是单向的服务器向tcp socket写数据,而websocket需要持续地从tcp socket里读数据,也可以往里边写数据。
因为ws header是http get,你们的代理收完header后就不再转发你的上行数据了,所以就。。。。
代理如果支持CONNECT,使用ws就毫无压力。
【 在 dhcn (小石) 的大作中提到: 】
: 由于使用HTTP的端口,因此TCP连接建立后的握手消息是基于HTTP的,由服务器判断这是一个HTTP协议,还是WebSocket协议。 WebSocket连接除了建立和关闭时的握手,数据传输和HTTP没丁点关系了。
: Be aware though websockets are not an http transport thus putting them behind http based proxies (e.g haproxy in http mode) breaks the connection. Better serve them on an alternate ip or port so you can proxy in tcp mode (e.g haproxy in tcp mode).
--
修改:ttl FROM 106.37.188.*
FROM 106.37.188.*