cokebar / gfwlist2dnsmasq_python

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There's bug when dealing with rules which contains wildcard(*)

cokebar opened this issue · comments

eg:
gfwlist rule: |http://*2.bahamut.com.tw
gfwlist2dnsmasq_python: server=/2.bahamut.com.tw/127.0.0.1#5353
should be: server=/bahamut.com.tw/127.0.0.1#5353

I have no time to maintain this python version. Anyone can help? PR is welcomed.

domain_pattern = '(?:[\w\-]*\*[\w\-]*\.)?([\w\-]+\.[\w\.\-]+)[\/\*]*'