配置squid做二级代理,支持访问http和https
来源:互联网 发布:sql培训课程 编辑:程序博客网 时间:2024/05/29 07:01
公司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
如果原代理服务器需要用户名密码,那么配置的内容应为:
cache_peer 192.168.1.5 parent 8080 0 login=account:passwd default
never_direct allow all
其中account和passwd需要修改成访问原代理服务器的用户名和密码。
如果没有添加配置”never_direct allow all“,那么访问 https网页时,squid服务器就会不经过原代理服务器,直接去访问https网页,由于squid服务器是需要代理服务器才能上网的,因此就会出现无法建立连接的错误。
- 配置squid做二级代理,支持访问http和https
- squid二级代理配置
- Squid 反向代理cdn搭建配置(支持https)
- Nginx配置域名同时支持 https 和 http 访问
- 配置squid代理http和rsync
- 配置squid代理http和rsyn
- ubuntu squid 做http代理
- squid 配置二级代理< redhat9>---轻松配置
- apache做http和https反向代理
- tomcat同时支持http和https访问
- Node.js配置支持https和http
- 公司http代理访问https代理
- Squid配置代理访问(rhel7.2)
- 在Tomcat中同时支持http和https访问
- 配置squid使支持匿名访问
- 配置服务器支持https访问
- centos7安装和使用http代理(squid)
- 配置tomcat同时支持http和https协议
- ean with name 'indexController': Injection of autowired dependencies failed; nested exception is
- Webpack 入门教程
- Python之dictAndset
- NKOJ3958(CQOI2015)(BZOJ2693) JZPTAB(莫比乌斯反演)
- Gym
- 配置squid做二级代理,支持访问http和https
- mic line in区别
- Scala学习笔记 --- 求两个时间的差
- VLC架构及流程分析
- VPS、WMWarre和Docker的概念和区别
- aspx,ashx,ascx小结
- 讲讲Js中的函数
- Linux下信号通信实现A进程死循环输出A后被C进程处理输出C
- hdu 1800 Flying to the Mars (字典树)