首页IT科技websocket教程视频(WebSocket协议:5分钟从入门到精通)

websocket教程视频(WebSocket协议:5分钟从入门到精通)

时间2025-05-05 04:45:42分类IT科技浏览4839
导读:注意,上面请求省略了部分非重点请求首部。由于是标准的HTTP请求,类似Host、Origin、Cookie等请求首部会照常发送。在握手阶段,可以通过相关请求首部进行 安全限制、权限校验等。...

注意           ,上面请求省略了部分非重点请求首部            。由于是标准的HTTP请求                  ,类似Host            、Origin                 、Cookie等请求首部会照常发送                 。在握手阶段      ,可以通过相关请求首部进行 安全限制      、权限校验等      。

备注:每个header都以\r\n结尾           ,并且最后一行加上一个额外的空行\r\n      。此外                 ,服务端回应的HTTP状态码只能在握手阶段使用                 。过了握手阶段后      ,就只能采用特定的错误码           。

j = i MOD 4

transformed-octet-i = original-octet-i XOR masking-key-octet-j

强调:Sec-WebSocket-Key/Sec-WebSocket-Accept 的换算      ,只能带来基本的保障                 ,但连接是否安全      、数据是否安全                 、客户端/服务端是否合法的 ws客户端           、ws服务端            ,其实并没有实际性的保证      。

“We show, empirically, that the current version of the WebSocket consent mechanism is vulnerable to proxy cache poisoning attacks. Even though the WebSocket handshake is based on HTTP, which should be understood by most network intermediaries, the handshake uses the esoteric “Upgrade            ” mechanism of HTTP [5]. In our experiment, we find that many proxies do not implement the Upgrade mechanism properly, which causes the handshake to succeed even though subsequent traffic over the socket will be misinterpreted by the proxy.                 ”

[TALKING] Huang, L-S., Chen, E., Barth, A., Rescorla, E., and C.

Jackson, "Talking to Yourself for Fun and Profit", 2010,

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
uniapp 弹出层(封装一个uniapp的全局弹窗组件,vue中也可以使用,在任何页面都可以弹出)