Squid的配置中,cache_peer使用ssl通信究竟如何配置? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
tairan2006
V2EX    Squid

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

  •  
  •   tairan2006 2014-01-06 16:31:35 +08:00 2591 次点击
    这是一个创建于 4295 天前的主题,其中的信息可能已经有所发展或是发生改变。
    现有两台squid组成二级缓存,child 在墙内,使用https_port作为https代理,配置parent cache_peer在墙外,根据gfw黑名单向墙外转发请求。客户端使用google-chrome --proxy-server=https://xxx.com:443进行测试。

    使用版本3.3.8,应该已经修复不能重新打包https请求的bug。--enable-ssl的编译选项已打开,而且客户端直连paret 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 条回复    2016-01-12 23:31:59 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       2014-01-06 16:43:18 +08:00 via iPad   1
    两台机器的话,可能 host to host 的 IPSEC 会更简单一些吧。
    hcw1588
        2
    hcw1588  
       2014-01-06 16:50:04 +08:00   1
    做过,,和楼主情况一样。。
    tairan2006
        3
    tairan2006  
    OP
       2014-01-06 16:54:05 +08:00
    @hcw1588 你后来是在child proxy后端重新使用stunnel或者shrpx加密了一次才解决这问题的?
    tairan2006
        4
    tairan2006  
    OP
       2014-01-06 16:55:09 +08:00
    @Livid 只是打个比方,将来可能做集群的。
    hcw1588
        5
    hcw1588  
       2014-01-06 16:56:24 +08:00
    @tairan2006 嗯。。
    tairan2006
        6
    tairan2006  
    OP
       2014-01-06 17:49:17 +08:00
    难道这个ssl选项只是在sslbump打开后,在此重新加密,而一般的http请求无法在此加密么?
    snnn
        7
    snnn  
       2016-01-12 23:29:28 +08:00
    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
       2016-01-12 23:31:59 +08:00
    @snnn 这都过两年了,终于有了么…不过我现在不搞这个了。嗯,这个功能还是挺有用的。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2303 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 25ms UTC 15:52 PVG 23:52 LAX 08:52 JFK 11:52
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86