accelerated-domains: remove seoyuepin.com
[dnsmasq-china-list.git] / Makefile
blobfbf658e0371b50ceca658a2a51b58f45db12473d
1 SERVER=114.114.114.114
2 SMARTDNS_SPEEDTEST_MODE=ping,tcp:80
3 NEWLINE=UNIX
4 SHELL=bash
6 raw:
7 sed -e 's|^server=/\(.*\)/114.114.114.114$$|\1|' accelerated-domains.china.conf | grep -Ev -e '^#' -e '^$$' > accelerated-domains.china.raw.txt
8 sed -e 's|^server=/\(.*\)/114.114.114.114$$|\1|' google.china.conf | grep -Ev -e '^#' -e '^$$' > google.china.raw.txt
9 sed -e 's|^server=/\(.*\)/114.114.114.114$$|\1|' apple.china.conf | grep -Ev -e '^#' -e '^$$' > apple.china.raw.txt
11 dnsmasq: raw
12 sed -e 's|\(.*\)|server=/\1/$(SERVER)|' accelerated-domains.china.raw.txt > accelerated-domains.china.dnsmasq.conf
13 sed -e 's|\(.*\)|server=/\1/$(SERVER)|' google.china.raw.txt > google.china.dnsmasq.conf
14 sed -e 's|\(.*\)|server=/\1/$(SERVER)|' apple.china.raw.txt > apple.china.dnsmasq.conf
16 coredns: raw
17 sed -e "s|\(.*\)|\1 {\n forward . $(SERVER)\n}|" accelerated-domains.china.raw.txt > accelerated-domains.china.coredns.conf
18 sed -e "s|\(.*\)|\1 {\n forward . $(SERVER)\n}|" google.china.raw.txt > google.china.coredns.conf
19 sed -e "s|\(.*\)|\1 {\n forward . $(SERVER)\n}|" apple.china.raw.txt > apple.china.coredns.conf
21 smartdns: raw
22 sed -e "s|\(.*\)|nameserver /\1/$(SERVER)|" accelerated-domains.china.raw.txt > accelerated-domains.china.smartdns.conf
23 sed -e "s|\(.*\)|nameserver /\1/$(SERVER)|" google.china.raw.txt > google.china.smartdns.conf
24 sed -e "s|\(.*\)|nameserver /\1/$(SERVER)|" apple.china.raw.txt > apple.china.smartdns.conf
25 sed -e "s|=| |" bogus-nxdomain.china.conf > bogus-nxdomain.china.smartdns.conf
27 smartdns-domain-rules: raw
28 sed -e "s|\(.*\)|domain-rules /\1/ -speed-check-mode $(SMARTDNS_SPEEDTEST_MODE) -nameserver $(SERVER)|" accelerated-domains.china.raw.txt > accelerated-domains.china.domain.smartdns.conf
29 sed -e "s|\(.*\)|domain-rules /\1/ -speed-check-mode $(SMARTDNS_SPEEDTEST_MODE) -nameserver $(SERVER)|" google.china.raw.txt > google.china.domain.smartdns.conf
30 sed -e "s|\(.*\)|domain-rules /\1/ -speed-check-mode $(SMARTDNS_SPEEDTEST_MODE) -nameserver $(SERVER)|" apple.china.raw.txt > apple.china.domain.smartdns.conf
32 unbound: raw
33 sed -e 's|\(.*\)|forward-zone:\n name: "\1."\n forward-addr: $(SERVER)\n|' accelerated-domains.china.raw.txt > accelerated-domains.china.unbound.conf
34 sed -e 's|\(.*\)|forward-zone:\n name: "\1."\n forward-addr: $(SERVER)\n|' google.china.raw.txt > google.china.unbound.conf
35 sed -e 's|\(.*\)|forward-zone:\n name: "\1."\n forward-addr: $(SERVER)\n|' apple.china.raw.txt > apple.china.unbound.conf
36 ifeq ($(NEWLINE),DOS)
37 sed -i 's/\r*$$/\r/' accelerated-domains.china.unbound.conf google.china.unbound.conf apple.china.unbound.conf
38 endif
40 bind: raw
41 sed -e 's|\(.*\)|zone "\1." {type forward; forwarders { $(SERVER); }; };|' accelerated-domains.china.raw.txt > accelerated-domains.china.bind.conf
42 sed -e 's|\(.*\)|zone "\1." {type forward; forwarders { $(SERVER); }; };|' google.china.raw.txt > google.china.bind.conf
43 sed -e 's|\(.*\)|zone "\1." {type forward; forwarders { $(SERVER); }; };|' apple.china.raw.txt > apple.china.bind.conf
44 ifeq ($(NEWLINE),DOS)
45 sed -i 's/\r*$$/\r/' accelerated-domains.china.bind.conf google.china.bind.conf apple.china.bind.conf
46 endif
48 dnscrypt-proxy: raw
49 sed -e 's|\(.*\)|\1 $(SERVER)|' accelerated-domains.china.raw.txt google.china.raw.txt apple.china.raw.txt > dnscrypt-proxy-forwarding-rules.txt
50 ifeq ($(NEWLINE),DOS)
51 sed -i 's/\r*$$/\r/' dnscrypt-proxy-forwarding-rules.txt
52 endif
54 dnsforwarder6: raw
55 { printf "protocol udp\nserver $(SERVER)\nparallel on \n"; cat accelerated-domains.china.raw.txt; } > accelerated-domains.china.dnsforwarder.conf
56 { printf "protocol udp\nserver $(SERVER)\nparallel on \n"; cat google.china.raw.txt; } > google.china.dnsforwarder.conf
57 { printf "protocol udp\nserver $(SERVER)\nparallel on \n"; cat apple.china.raw.txt; } > apple.china.dnsforwarder.conf
58 ifeq ($(NEWLINE),DOS)
59 sed -i 's/\r*$$/\r/' accelerated-domains.china.dnsforwarder.conf google.china.dnsforwarder.conf apple.china.dnsforwarder.conf
60 endif
62 adguardhome: raw
63 cat google.china.raw.txt | tr "\n" "/" | sed -e 's|^|/|' -e 's|\(.*\)|[\1]$(SERVER)|' > google.china.adguardhome.conf
64 cat accelerated-domains.china.raw.txt | tr "\n" "/" | sed -e 's|^|/|' -e 's|\(.*\)|[\1]$(SERVER)|' > accelerated-domains.china.adguardhome.conf
65 cat apple.china.raw.txt | tr "\n" "/" | sed -e 's|^|/|' -e 's|\(.*\)|[\1]$(SERVER)|' > apple.china.adguardhome.conf
66 ifeq ($(NEWLINE),DOS)
67 sed -i 's/\r*$$/\r/' accelerated-domains.china.adguardhome.conf google.china.adguardhome.conf apple.china.adguardhome.conf
68 endif
70 clean:
71 rm -f {accelerated-domains,google,apple}.china.*.conf *.smartdns.conf {accelerated-domains,google,apple}.china.raw.txt dnscrypt-proxy-forwarding-rules.txt