add community.list. Switched to dnscrypt-proxy2

This commit is contained in:
itdoginfo
2022-06-16 23:19:26 +07:00
parent f5ff3e3abc
commit 2982343fb7
4 changed files with 49 additions and 13 deletions

View File

@@ -67,6 +67,14 @@ ansible-playbook playbooks/hirkn.yml
После выполнения playbook роутер сразу начнёт выполнять обход блокировок через Wireguard сервер. После выполнения playbook роутер сразу начнёт выполнять обход блокировок через Wireguard сервер.
# DNSCrypt-proxy2
Если у вас уже стоит dnscrypt-proxy первой версии, его необходимо удалить
```
opkg remove dnscrypt-proxy
```
Во второй версии есть отказоустойчивость из коробки.
# "DST Root CA X3" issue # "DST Root CA X3" issue
С версии 19* по 20.02.0 есть проблема со скачиванием файлов c https://antifilter.download/. Там используется LE сертификат. С версии 19* по 20.02.0 есть проблема со скачиванием файлов c https://antifilter.download/. Там используется LE сертификат.

View File

@@ -44,7 +44,7 @@
- name: install dnscrypt - name: install dnscrypt
opkg: opkg:
name: dnscrypt-proxy name: dnscrypt-proxy2
state: present state: present
# Hirkn script configure # Hirkn script configure
@@ -232,6 +232,20 @@
hashsize: 9900000 hashsize: 9900000
maxelem: 9900000 maxelem: 9900000
- name: add ipset for community
uci:
command: section
config: firewall
type: ipset
find_by:
name: vpn_community
value:
match: dst_net
storage: hash
loadfile: /tmp/lst/community.lst
hashsize: 9900000
maxelem: 9900000
- name: add mark rule vpn_subnet - name: add mark rule vpn_subnet
uci: uci:
command: section command: section
@@ -264,18 +278,34 @@
target: MARK target: MARK
family: ipv4 family: ipv4
- name: add mark rule vpn_community
uci:
command: section
config: firewall
type: rule
find_by:
name: mark_community
value:
src: lan
dest: "*"
proto: all
ipset: vpn_community
set_mark: "0x1"
target: MARK
family: ipv4
- name: uci commit firewall - name: uci commit firewall
uci: uci:
command: commit command: commit
config: firewall config: firewall
# Configure dnscrypt # Configure dnscrypt2
- name: dnscrypt config - name: dnscrypt2 enable exact servers
template: lineinfile:
src: "{{ ansible_template_dir }}openwrt-dnscrypt-proxy.j2" path: /etc/dnscrypt-proxy2/dnscrypt-proxy.toml
dest: "/etc/config/dnscrypt-proxy" regexp: "# server_names ="
mode: 0644 line: "server_names = ['google', 'cloudflare', 'scaleway-fr', 'yandex']"
- name: edit dhcp config. resolvfile commented - name: edit dhcp config. resolvfile commented
lineinfile: lineinfile:
@@ -289,7 +319,7 @@
insertafter: "#option resolvfile" insertafter: "#option resolvfile"
line: "{{ item }}" line: "{{ item }}"
with_items: with_items:
- " list server '127.0.0.1#5353'" - " list server '127.0.0.53#53'"
- " list server '/pool.ntp.org/208.67.222.222'" - " list server '/pool.ntp.org/208.67.222.222'"
- name: enable and start dnscrypt-proxy - name: enable and start dnscrypt-proxy

View File

@@ -1,4 +0,0 @@
config dnscrypt-proxy ns1
option address '127.0.0.1'
option port '5353'
option resolver 'scaleway-fr'

View File

@@ -10,10 +10,12 @@ echo "Run download lists"
{% if download_utility == "curl" %} {% if download_utility == "curl" %}
curl -z $dir/subnet.lst https://antifilter.download/list/subnet.lst --output $dir/subnet.lst curl -z $dir/subnet.lst https://antifilter.download/list/subnet.lst --output $dir/subnet.lst
curl -z $dir/ip.lst https://antifilter.download/list/ip.lst --output $dir/ip.lst curl -z $dir/ip.lst https://antifilter.download/list/ip.lst --output $dir/ip.lst
curl -z $dir/community.lst https://community.antifilter.download/list/community.lst --output $dir/community.lst
{% elif download_utility == "wget" %} {% elif download_utility == "wget" %}
rm -f /$dir/subnet.lst && wget -P $dir https://antifilter.download/list/subnet.lst rm -f /$dir/subnet.lst && wget -P $dir https://antifilter.download/list/subnet.lst
rm -f /$dir/ip.lst && wget -P $dir https://antifilter.download/list/ip.lst rm -f /$dir/ip.lst && wget -P $dir https://antifilter.download/list/ip.lst
rm -f /$dir/community.lst && wget -P $dir https://community.antifilter.download/list/community.lst
{% endif %} {% endif %}