Skip to content

dnsmasq with regex match module(libpcre3, the old one)

Notifications You must be signed in to change notification settings

regae/dnsmasq-regex

 
 

Repository files navigation

Dnsmasq with regex support

Lastest version: 2.82

patches:

Inspired by these repos:

Original regex patch for dnsmasq 2.63

Offical dnsmasq:

Compile

For Debian/Ubuntu:

# Install libpcre3 and pkg-config
sudo apt install libpcre3-dev pkg-config

# Clone the repo
git clone https://github.com/lixingcong/dnsmasq-regex
cd dnsmasq-regex

# update the sub-module 'dnsmasq' to latest version
# only update when a newer version is released
bash ./update_submodule.sh

# build it
make

# Run the binary, check if the compile option contains "regex(+ipset)"
./dnsmasq/src/dnsmasq --version

Tips: If you do not need the patch of regex_ipset, just edit the file "Makefile" and build from source again.

Change this line

DNSMASQ_COPTS="-DHAVE_REGEX -DHAVE_REGEX_IPSET"

to

DNSMASQ_COPTS="-DHAVE_REGEX"

Config file example

dnsmasq_regex_example.conf

Tips: A simple script to generate domains configurations: my-gfwlist

OpenWrt/LEDE package

Please check this page: dnsmasq-regex-openwrt

About

dnsmasq with regex match module(libpcre3, the old one)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 94.2%
  • Shell 5.8%