V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
tairan2006
V2EX  ›  Squid

Squid的配置中,cache_peer使用ssl通信究竟如何配置?

  •  
  •   tairan2006 · Jan 6, 2014 · 2971 views
    This topic created in 4500 days ago, the information mentioned may be changed or developed.
    现有两台squid组成二级缓存,child 在墙内,使用https_port作为https代理,配置parent cache_peer在墙外,根据gfw黑名单向墙外转发请求。客户端使用google-chrome --proxy-server=https://xxx.com:443进行测试。

    使用版本3.3.8,应该已经修复不能重新打包https请求的bug。--enable-ssl的编译选项已打开,而且客户端直连parent squid是可以翻墙的,这点已经测试。

    本以为child squid在向parent squid的https_port转发请求时会重新使用ssl加密http请求,但是实际测试结果中,parent的cache_log中出现大量的

    “SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request”

    换句话说,收到的仍然是http请求。这样翻墙计划就破产了…

    现在child squid的cache_peer选项配置如下:

    cache_peer proxy.xxx.org parent 443 0 no-query \
    ssl sslflags=DONT_VERIFY_PEER

    请教有经验的兄弟:是不是squid没有重新加密普通http请求的能力?
    8 replies    2016-01-12 23:31:59 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Jan 6, 2014 via iPad   ❤️ 1
    两台机器的话,可能 host to host 的 IPSEC 会更简单一些吧。
    hcw1588
        2
    hcw1588  
       Jan 6, 2014   ❤️ 1
    做过,,和楼主情况一样。。
    tairan2006
        3
    tairan2006  
    OP
       Jan 6, 2014
    @hcw1588 你后来是在child proxy后端重新使用stunnel或者shrpx加密了一次才解决这问题的?
    tairan2006
        4
    tairan2006  
    OP
       Jan 6, 2014
    @Livid 只是打个比方,将来可能做集群的。
    hcw1588
        5
    hcw1588  
       Jan 6, 2014
    @tairan2006 嗯。。
    tairan2006
        6
    tairan2006  
    OP
       Jan 6, 2014
    难道这个ssl选项只是在sslbump打开后,在此重新加密,而一般的http请求无法在此加密么?
    snnn
        7
    snnn  
       Jan 12, 2016
    cache_peer xxx.xx.x.xxx parent 443 0 no-query ssl sslcert=/etc/squid/client.crt sslcafile=/etc/squid/ca.crt

    这是 squid 4.x 的配置
    tairan2006
        8
    tairan2006  
    OP
       Jan 12, 2016
    @snnn 这都过两年了,终于有了么…不过我现在不搞这个了。嗯,这个功能还是挺有用的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2424 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 04:40 · PVG 12:40 · LAX 21:40 · JFK 00:40
    ♥ Do have faith in what you're doing.