首页 > 网络技术 > Linux > OpenWRT > openwrt利用privoxy配合shadowsocks开启http代理
2015
07-05

openwrt利用privoxy配合shadowsocks开启http代理

为方便ie或移动设备使用代理,openwrt上需开启http代理服务.

1.安装privoxy

opkg install privoxy

2.配置privoxy

vi /etc/privoxy/config

confdir /etc/privoxy
logdir /var/log
#filterfile default.filter
logfile privoxy
#actionsfile match-all.action # Actions that are applied to all sites and maybe
#actionsfile default.action   # Main actions file
#actionsfile user.action      # User customizations
listen-address  192.168.10.1:8118


toggle  0
enable-remote-toggle  0
enable-remote-http-toggle  0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
forwarded-connect-retries  0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 300
socket-timeout 300
permit-access  192.168.10.0/24 #局域网ip端
dir /etc/privoxy
logdir /var/log
#filterfile default.filter
logfile privoxy
#actionsfile match-all.action # Actions that are applied to all sites and maybe
#actionsfile default.action   # Main actions file
#actionsfile user.action      # User customizations
listen-address  192.168.10.1:8118  #监听端口,http代理端口

toggle  0
enable-remote-toggle  0
enable-remote-http-toggle  0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
forwarded-connect-retries  0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 300
socket-timeout 300
permit-access  192.168.10.0/24
#debug   1    # show each GET/POST/CONNECT request
#debug   4096 # Startup banner and warnings
#debug   8192 # Errors - *we highly recommended enabling this*
#admin-address privoxy-admin@example.com
#proxy-info-url http://www.example.com/proxy-service.html
forward-socks5 / 127.0.0.1:1080 .   #shadowsocks socks5代理
forward         192.168.10.*/     .
forward         192.168.*.*/     .
forward         10.*.*.*/        .
forward         127.*.*.*/       .
forward         .cn/            .
forward         .com.cn/   .

3.启动privoxy

/etc/init.d/privoxy start

4.将ie代理设置为192.168.10.1:8118 即可使用http代理

 

最后编辑:
作者:NINE
这个作者貌似有点懒,什么都没有留下。