友情提示:欢迎光临!本地已启用二维码api网关,地址是https://api.slogra.com

python将gfwlist转换成dnsmasq规则

post by rocdk890 / 2016-3-14 14:41 Monday linux技术

  当使用openwrt时,大家选择fq工具一定是ss,如果你是使用的石像鬼的固件的话,那可以不用看这篇文章了,如果是使用官方默认openwrt或者 明月的openwrt的话,那么下面这个东西会为你带来惊喜,其实也就是用python转换gfwlist为dnsmasq规则.
  需要的软件:python 2.6

脚本内容:
cat dnsmasq-gfwlist.py

#!/usr/bin/env python 
#coding=utf-8
# 
# Generate a list of dnsmasq rules with ipset for gfwlist
# 
# Copyright (C) 2014 http://www.shuyz.com  
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules   
 
import urllib2
import re
import os...

阅读全文>>

标签: dnsmasq 规则 转换 python openwrt gfw gfwlist

评论(0) 引用(0) 浏览(7423)