All Projects → cokebar → Gfwlist2dnsmasq_python

cokebar / Gfwlist2dnsmasq_python

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Gfwlist2dnsmasq python

V2ray Rules Dat
🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,兼容 Shadowsocks-windows、Xray-core、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, compatible with Xray-core, Shadowsocks-windows, Trojan-Go and leaf.
Stars: ✭ 6,550 (+2158.62%)
Mutual labels:  dnsmasq, gfwlist
G2w.online
域名已被DNS污染,水表已拆
Stars: ✭ 49 (-83.1%)
Mutual labels:  dnsmasq, gfwlist
Clash Rules
🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 客户端。
Stars: ✭ 706 (+143.45%)
Mutual labels:  dnsmasq, gfwlist
Surge Rules
🦄 🎃 👻 Surge 规则集(DOMAIN-SET 和 RULE-SET),兼容 Surge for iOS 和 Surge for Mac 客户端。
Stars: ✭ 151 (-47.93%)
Mutual labels:  dnsmasq, gfwlist
Gfwlist2dnsmasq
A shell script which convert gfwlist into dnsmasq rules. Python version: https://github.com/cokebar/gfwlist2dnsmasq_python
Stars: ✭ 765 (+163.79%)
Mutual labels:  dnsmasq, gfwlist
Genpac
PAC/Dnsmasq/Wingy file Generator, working with gfwlist, support custom rules.
Stars: ✭ 2,088 (+620%)
Mutual labels:  dnsmasq, gfwlist
SS-Rule-Snippet
搜集、整理、维护 Surge / Quantumult (X) / Shadowrocket / Surfboard / clash (Premium) 实用规则。
Stars: ✭ 8,975 (+2994.83%)
Mutual labels:  gfwlist
neohosts
自由·负责·克制 去广告 Hosts 项目(Build with a tool written in Ruby)
Stars: ✭ 20 (-93.1%)
Mutual labels:  dnsmasq
alpine-tor-docker
A minimal Docker image with the Tor daemon running in the background.
Stars: ✭ 23 (-92.07%)
Mutual labels:  dnsmasq
ceil
Helmut Hoffer von Ankershoffen experimenting with auto-provisioned RPi cluster running K8S on bare-metal
Stars: ✭ 42 (-85.52%)
Mutual labels:  dnsmasq
Raspap Webgui
Simple wireless AP setup & management for Debian-based devices
Stars: ✭ 3,383 (+1066.55%)
Mutual labels:  dnsmasq
pi-ap
Raspberry Pi Access Point: This repo automates the configuration of hostapd, dnsmasq, dhcpcd & wpa_supplicant to transform a Pi into a wireless AP. Requirements: a Pi, an Ethernet cable and a DHCP-enabled port on a router with a 'net connection or a switch connected to this router.
Stars: ✭ 69 (-76.21%)
Mutual labels:  dnsmasq
RaspberryPi-Packet-Sniffer
An HTTP and HTTPS sniffing tool created using a Raspberry Pi
Stars: ✭ 79 (-72.76%)
Mutual labels:  dnsmasq
docker-dns-ad-blocker
A lightweight dnsmasq DNS server to block traffic to known ad servers with optional DNSCrypt support. Supports x86_64 and Raspberry Pi (armhf).
Stars: ✭ 78 (-73.1%)
Mutual labels:  dnsmasq
ansible-dnsmasq
Ansible role to set up Dnsmasq in Debian-like systems
Stars: ✭ 18 (-93.79%)
Mutual labels:  dnsmasq
gfwlist.acl
🌐gfwlist in acl format, compatible with SSR, update daily by travis CI
Stars: ✭ 48 (-83.45%)
Mutual labels:  gfwlist
Roguesploit
Powerfull Wi-Fi trap!
Stars: ✭ 262 (-9.66%)
Mutual labels:  dnsmasq
SmartGW
Domain based VPN Gateway/Proxy for all devices
Stars: ✭ 49 (-83.1%)
Mutual labels:  dnsmasq
ipset-netgear-r7000-dd-wrt
Packages and kernel modules for ipset support for the Netgear R7000 running DD-WRT firmware
Stars: ✭ 45 (-84.48%)
Mutual labels:  dnsmasq
openwrt-dnsmasq-extra
Anti Pollution/ADs DNS for OpenWrt/LEDE
Stars: ✭ 34 (-88.28%)
Mutual labels:  gfwlist

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].