售前咨询
技术支持
渠道合作

privoxy将socks代理转为http代理

有些软件不支持socks代理,只支持http代理。不像火狐那样都支持,于是有的时候要建http代理。如Jenkins代理,只支持http代理模式。

如果有socks代理,想做一个http代理的话,这篇文章可能会有帮助。

安装privoxy

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks.

很强大的工具。有兴趣的自己去啃啃哈。官网http://www.privoxy.org/

直接yum安装了,编译的麻烦。要先添加repo源。

建立socks代理

我这里是以ssh来建立的。

www.ttlsa.com位于墙外。

在本地建立起127.0.0.1:1080的socks代理。

配置privoxy

其它的不用改了。

forward-socks5代表转发到socks5代理,/代表所有的URL都转发(也可以在这里写url patten),127.0.0.1:1080是socks代理地址,.将请求不转发到另一个http代理,而是直接发送到web服务器。

启动

/etc/init.d/privoxy restart

服务监听在本地127.0.0.1:8118上。如果需要其它设备使用该代理,更改配置文件listen-address参数。

测试

 

文章转载来自:ttlsa.com

上一篇:

下一篇:

相关文章