OpenWrt使用Privoxy插件修改UA

OpenWrt使用privoxy修改UA

1.安装privoxy插件

  • SSH连接到路由器
  • 更新插件列表
update opkg

image.png

  • 安装插件
opkg install privoxy luci-app-privoxy luci-i18n-privoxy-zh-cn
  • 重启路由器

2.配置privoxy

  • 打开配置页面

image.png

  • 文件和目录

image.png

  • 访问和控制

image.png

  • 转发

image.png

  • 杂项

image.png

  • 日志

image.png

  • 编辑配置

浏览器打开

http://config.privoxy.org/edit-actions-list?f=0

image.png

image.png

3.配置防火墙

  • 打开防火墙

image.png

  • 将规则添加到防火墙中
# 将局域网内的 HTTP 请求转发到 Privoxy 代理服务器上
iptables -t nat -N http_ua_drop
iptables -t nat -I PREROUTING -p tcp --dport 80 -j http_ua_drop
iptables -t nat -A http_ua_drop -m mark --mark 1/1 -j RETURN
iptables -t nat -A http_ua_drop -d 0.0.0.0/8 -j RETURN
iptables -t nat -A http_ua_drop -d 127.0.0.0/8 -j RETURN
iptables -t nat -A http_ua_drop -d 192.168.0.0/16 -j RETURN
iptables -t nat -A http_ua_drop -p tcp -j REDIRECT --to-port 8118

image.png

4…检测UA

www.all-tool.cn

如果UA是自定义的话则说明修改成功

image.png

参考文章

校园网共享上网检测机制的研究与解决方案(转载) - 真是古得

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值