Skip to content
Proyek

cokebar/gfwlist2dnsmasq_python

Lihat di GitHub

Tentang

Just another python script to auto-generate dnsmasq ipset rules using gfwlist. Shell script version: https://github.com/cokebar/gfwlist2dnsmasq

Alat pengembangan

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
Mengumpulkan riwayat
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Notification: This repo will not be maintained anymore unless critical bug is found. Please use shell script version instead:

https://github.com/cokebar/gfwlist2dnsmasq

gfwlist2dnsmasq

Intro

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

Notification: Need python2, do not use python3

GFWList is composed by regular expressions, but dnsmasq rules is formed by domain names. So the conversion from GFWList to dnsmasq rule list is not a equivalent conversion. You might need to add extra rules or modify some converted rules.

Using:

Modify gfwlist2dnsmasq.py:

Change this to your DNS server IP&port:

mydnsip = '127.0.0.1'
mydnsport = '5353'

Change this to your ipset name:

ipsetname = 'gfwlist'

Path to save you rule file:

rulefile = './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', \
'google.co.kr', \
'blogspot.com', \
'blogspot.sg', \
'blogspot.hk', \
'blogspot.jp', \
'blogspot.kr', \
'gvt1.com', \
'gvt2.com', \
'gvt3.com', \
'1e100.net', \
'blogspot.tw' \
]

Then run gfwlist2dnsmasq.py:

python gfwlist2dnsmasq.py

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

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

Jelajahi proyek terkait

Memuat…