python将gfwlist转换成dnsmasq规则
当使用openwrt时,大家选择fq工具一定是ss,如果你是使用的石像鬼的固件的话,那可以不用看这篇文章了,如果是使用官方默认openwrt或者
明月的openwrt的话,那么下面这个东西会为你带来惊喜,其实也就是用python转换gfwlist为dnsmasq规则.
需要的软件:python 2.6
脚本内容:
cat dnsmasq-gfwlist.py
01 | #!/usr/bin/env python |
02 | #coding=utf-8 |
03 | # |
04 | # Generate a list of dnsmasq rules with ipset for gfwlist |
05 | # |
06 | # Copyright (C) 2014 http://www.shuyz.com |
08 | |
09 | import urllib2 |
10 | import re |
11 | import os... |