cxh116
0.45D
V2EX  ›  问与答

怎样实现任意域名的 https 反向代理?

  •  
  •   cxh116 · Jun 24, 2017 · 5535 views
    This topic created in 3295 days ago, the information mentioned may be changed or developed.

    就像运营商的缓存服务器一样, 通过 dns 污染,把域名指向自己的缓存服务器, http 和 https 请求都可以通过缓存代理服务器转发.

    场景在国内和国外各有一台服务器,两边已经是同一个内网,国内的机器想通过改 hosts 的方式访问 google aws 等 API .

    在网上找的资料, squid https 代理要伪造证书,其它的像 nginx stream proxy, haproxy 之类的,https 只能转发单个域名.

    请问这个有解决办法吗? 或有更加好的方案? 先谢谢了.

    7 replies    2017-06-24 10:01:01 +08:00
    Tink
        1
    Tink  
       Jun 24, 2017 via iPhone
    之前看到过有人贴过这样的链接
    aru
        2
    aru  
       Jun 24, 2017   ❤️ 2
    SNI PROXY
    neilp
        3
    neilp  
       Jun 24, 2017
    http 可以,

    在不安装自定义 根证书的情况下, https 不可能缓存.

    https 只能原样转发, sniproxy 可以实现, 但是想缓存就不可能了.
    just1
        4
    just1  
       Jun 24, 2017 via Android
    nginx 新版 5 行实现
    cxh116
        5
    cxh116  
    OP
       Jun 24, 2017
    @just1 可以给个新版 nginx 指令的链接吗?
    just1
        6
    just1  
       Jun 24, 2017 via Android
    johnlui
        7
    johnlui  
       Jun 24, 2017
    任意域名的话,直接 TCP 反向代理?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3621 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 10:37 · PVG 18:37 · LAX 03:37 · JFK 06:37
    ♥ Do have faith in what you're doing.