配置squid做二级代理,支持访问http和https

公司A电脑可以通过代理上网,B电脑无法连接代理服务器,但可以连接到A,因此考虑使用squid在A电脑上搭建二级代理,以达到B电脑可以访问internet的目的。

以下引自squid-cache wiki:http://wiki.squid-cache.org/Features/CacheHierarchy?highlight=%28%5CbCategoryFeature%5Cb%29%7C%28faqlisted.yes%29

How do I configure Squid forward all requests to another proxy?


First, you need to give Squid a parent cache with the ***cache_peer *** directive. Second, you need to tell Squid it can not connect directly to origin servers with never_direct. This is done with these configuration file lines:

cache_peer parentcache.foo.com parent 3128 0 no-query default
never_direct allow all

比如,原代理服务器地址是192.168.1.5,端口是8080,那么应该在squid的配置文件squid.conf中增加以下内容:

cache_peer 192.168.1.5 parent 8080 0 default
never_direct allow all

如果原代理服务器需要用户名密码,

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值