【问题标题】:what is https and http tunnel methods in proxy?代理中的 https 和 http 隧道方法是什么?
【发布时间】:2018-04-03 02:23:10
【问题描述】:

这张图片是ProxyDroid应用程序,我看到了一些类似这样的代理软件。

我找到了一些用于 http 方法的免费服务器(著名的 http 代理)并找到了用于 socks 4 和 5 的服务器,但我找不到任何支持 https 和 http 隧道的服务器,换句话说,我无法理解这些协议到底是什么.

【问题讨论】:

    标签: proxy http-proxy http-tunneling https-proxy-agent


    【解决方案1】:

    代理 HTTPS 是通过使用 CONNECT 请求的 HTTP 代理完成的。使用此请求,HTTP 代理被指示创建到目标服务器的隧道。在此隧道内,客户端可以进行 HTTPS 所需的 TLS 握手:

    > CONNECT example.org:443 HTTP/1.0
    >
    
    ... proxy established TCP connection to example.org:443 ...
    
    < HTTP/1.0 200 Connection established
    <
    
    ... tunnel to target established
    ... proxy forwards data between client and target unchanged
    <-> TLS handshake
    <-> application data protected by TLS
    

    HTTP 隧道类似。通常通过发送 HTTP 代理请求来代理 HTTP 请求:

    > GET http://example.org/index.html HTTP/1.0
    > Host: example.org
    >
    
    ... proxy connects to target example.org and forwards request
    ... then sends response from target server back
    
    < HTTP/1.0 200 ok
    < Content-length: ...
    < ...
    

    使用 HTTP 隧道,客户端改为使用上述 CONNECT 方法创建到目标服务器的隧道并发送请求:

    > CONNECT example.org:80 HTTP/1.0
    >
    < HTTP/1.0 200 Connection established
    <
    
    ... tunnel established, send HTTP request over tunnel and get reply back
    
    > GET /index.html HTTP/1.0
    > Host: example.org
    > ...
    < HTTP/1.0 200 ok
    < ...
    

    【讨论】:

    • 您是否只回答了有关代理服务器的应用程序?在所有代理中都是一样的吗?我在 Wikipedia 和其他一些参考资料中读到,有很多方法可以创建 HTTP 隧道,其中一种方法是使用 HTTP connect 。还有其他方法可以创建 HTTP 隧道吗?我看到一个名为 tunnel guru 的应用程序使用 http 隧道和 http post 而不使用 http 连接。
    • @mark.taylor:CONNECT 是建立隧道的正常方式。例如,这也被 Skype 使用。但是,还有其他通过普通 HTTP、websockets 进行隧道传输的方法......尽管如此,没有进一步解释的简单“HTTP 隧道”几乎总是使用 CONNECT 创建的隧道。
    猜你喜欢
    • 1970-01-01
    • 2014-08-04
    • 1970-01-01
    • 2012-10-28
    • 1970-01-01
    • 1970-01-01
    • 2012-05-09
    • 2013-05-08
    • 2013-02-11
    相关资源
    最近更新 更多