Skip to content

Just another script to auto-generate dnsmasq ipset rules using gfwlist

License

Notifications You must be signed in to change notification settings

jxjhheric/gfwlist2dnsmasq

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gfwlist2dnsmasq

Intro

Just another script to auto-generate dnsmasq ipset rules using gfwlist

Notification: Need python2, do not use python3

Using:

First git clone

git clone https://github.com/cokebar/gfwlist2dnsmasq.git

Then Modify gfwlist2dnsmasq.sh:

Change this to your DNS server:

DNS='127.0.0.1#5353'

Change this to your ipset name:

IPSET=gfwlist

Path to save you rule file:

RULE_FILE=./dnsmasq_list.conf

Add your own extra domain here. One domain in a line. eg:

EX_DOMAIN='.google.com
.google.com.hk
.google.com.tw
.google.com.sg
.google.co.jp
.blogspot.com
.blogspot.sg
.blogspot.hk
.blogspot.jp
.gvt1.com
.gvt2.com
.gvt3.com
.1e100.net
.blogspot.tw'

And then just cd to the directory and run gfwlist2dnsmasq.sh:

cd gfwlist2dnsmasq
./gfwlist2dnsmasq.sh

If you don't want to generate the rules by yourself, you can download the rule file from:

https://github.com/cokebar/gfwlist2dnsmasq/releases

About

Just another script to auto-generate dnsmasq ipset rules using gfwlist

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 73.6%
  • Shell 26.4%