Commit 86648fd5 authored by nanahira's avatar nanahira

add gfwlist ipset and mycard dnsmasq

parent 4cd15479
/data
/dnsmasq-china-list
/chnroutes2
/mycard-dnsmasq
......@@ -169,6 +169,28 @@
src: ./data/china-list.conf
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/china-list.conf'
notify: restart_dnsmasq
- name: update dnsmasq.d
synchronize:
src: ./mycard-dnsmasq/dnsmasq.d/
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/dnsmasq.d'
recursive: yes
verify_host: no
checksum: yes
archive: no
notify: restart_dnsmasq
when: dnsmasq.mycardDomains is defined and dnsmasq.mycardDomains
- name: gfwlist ipset
copy:
src: './data/gfwlist-ipset.conf'
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/dnsmasq.d/gfwlist-ipset.conf'
when: dnsmasq.gfwlistIPSet is defined and dnsmasq.gfwlistIPSet
notify: restart_dnsmasq
- name: gfwlist ipset clean
file:
path: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/dnsmasq.d/gfwlist-ipset.conf'
state: absent
when: dnsmasq.gfwlistIPSet is defined and not dnsmasq.gfwlistIPSet
notify: restart_dnsmasq
- name: start dnsmasq
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
......
......@@ -7,12 +7,13 @@ download_repo() {
if [ -d "$REPO_DIR" ]; then
(cd "$REPO_DIR" && git pull)
else
git clone "$REPO_URL" "$REPO_URL"
git clone "$REPO_URL" "$REPO_DIR"
fi
}
download_repo chnroutes2 https://github.com/misakaio/chnroutes2.git
download_repo dnsmasq-china-list https://github.com/felixonmars/dnsmasq-china-list.git
download_repo mycard-dnsmasq https://code.mycard.moe/mycard/dnsmasq
cd dnsmasq-china-list
make smartdns
......@@ -25,3 +26,5 @@ grep -P '^bogus-nxdomain=.+$' dnsmasq-china-list/bogus-nxdomain.china.conf | sed
cd lists
python3 route_helper.py
cd ..
curl -sL https://cokebar.github.io/gfwlist2dnsmasq/dnsmasq_gfwlist_ipset.conf | grep -P '^ipset=' > ./data/gfwlist-ipset.conf
......@@ -75,6 +75,9 @@ vars:
china_dns:
- 114.114.114.114
- 223.5.5.5
dnsmasq:
gfwlistIPSet: false # 导入 gfwlist ipset
mycardDomains: false # 导入 MCNetwork 内网域名
services:
ddns:
- name: test-ddns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment