为什么当前的 websocket 客户端实现不支持代理? [英] Why don't current websocket client implementations support proxies?

查看:48
本文介绍了为什么当前的 websocket 客户端实现不支持代理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Web Socket 检测代理服务器的存在并自动设置隧道以通过代理.隧道是通过向代理服务器发出 HTTP CONNECT 语句来建立的,该语句请求代理服务器打开到特定主机和端口的 TCP/IP 连接.一旦建立了隧道,通信就可以畅通无阻地通过代理.由于 HTTP/S 以类似的方式工作,通过 SSL 的安全 Web 套接字可以利用相同的 HTTP CONNECT 技术.[1]

A Web Socket detects the presence of a proxy server and automatically sets up a tunnel to pass through the proxy. The tunnel is established by issuing an HTTP CONNECT statement to the proxy server, which requests for the proxy server to open a TCP/IP connection to a specific host and port. Once the tunnel is set up, communication can flow unimpeded through the proxy. Since HTTP/S works in a similar fashion, secure Web Sockets over SSL can leverage the same HTTP CONNECT technique. [1]

好的,听起来很有用!但是,在我目前看到的客户端实现(Go [2]、Java [3])中,我没有看到任何与代理检测相关的东西.

OK, sounds useful! But, in the client implementations I've seen thus far (Go [2], Java [3]) I do not see anything related to proxy detection.

我是不是遗漏了什么,还是这些实现还很年轻?我知道 WebSockets 非常新,客户端实现可能同样年轻和不成熟.我只是想知道我是否遗漏了有关代理检测和处理的内容.

Am I missing something or are these implementations just young? I know WebSockets is extremely new and client implementations may be equally young and immature. I just want to know if I'm missing something about proxy detection and handling.

[1] http://www.kaazing.org/confluence/display/KAAZING/What+is+an+HTML+5+WebSocket

[2] http://golang.org/src/pkg/websocket/client去

[3] http://github.com/adamac/Java-WebSocket-client/raw/master/src/com/sixfire/websocket/WebSocket.java

推荐答案

答案是这些客户端根本不支持代理.-奥卡姆

The answer is that these clients simply do not support proxies. -Occam

这篇关于为什么当前的 websocket 客户端实现不支持代理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆