Skip to content

Commit e749045

Browse files
committed
some fixs
add zip.bat add 10086.txt
1 parent 8fa956f commit e749045

File tree

8 files changed

+648
-33
lines changed

8 files changed

+648
-33
lines changed

README.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,7 @@ Anywhere停止链接
2424
anywhere://share/J2VP8X5qVhbI2sRvhZ2hdp4467QzpcHDlkAQil7Mg6oDOLdzYgAJO+9fKKenP2M28XWZ71jveGDq1E/sCmMAhBqd5N04LZkJp0EYtrFp7Vw9xPsYBhlmwlaKWljr9iIAMGWOulpW7Zzhm/tpfaDIKjweOGfIsONgcoWq89Idmb215WTrhfju+OeoNqDicBqrOLI5iyI8fTCQifRm7m7hq53WMgN/BoYbWnyE34AeVO2hq5btVggCTBGunrftXnlweSY4ngaN8CmhTlDWQeyjMJRZMooTPHwcQm3fisvBY6McMaVV5lSLHBe+MNaK1EwnzQ0RjNJh/3eoVGQJgUUyN8swAmtakrwaNA==
2525
```
2626

27-
# 原理
28-
本插件实现方法非常简单,利用了iptables进行流量转发,将53端口的流量转发到5591也就是本插件设置的AdGuardHome端口
29-
30-
- apply_iptables.sh 片段
31-
```sh
32-
# 返回所有 AdGuardHome 的请求
33-
iptables -t nat -A ADGUARD -m owner --uid-owner root --gid-owner net_admin -j RETURN
34-
# 将 53 端口所有 udp tcp 流量转发到 adguard home
35-
iptables -t nat -A ADGUARD -p udp --dport 53 -j REDIRECT --to-ports 5591
36-
iptables -t nat -A ADGUARD -p tcp --dport 53 -j REDIRECT --to-ports 5591
37-
```
38-
- service.sh 片段
39-
```sh
40-
setuidgid root:net_admin "$ADG_DIR/AdGuardHome" &
41-
```
42-
43-
其将AdGuardHome程序的用户设置为net_admin,然后在规则排除掉net_admin的请求(否则会导致网络回环)
4427
# 鸣谢
4528
- [AdguardHome_magisk](https://github.com/410154425/AdGuardHome_magisk)
46-
- [akashaProxy](https://github.com/ModuleList/akashaProxy)
29+
- [akashaProxy](https://github.com/ModuleList/akashaProxy)
30+
- [box_for_magisk](https://github.com/taamarin/box_for_magisk)

apply_iptables.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ iptables -t nat -N ADGUARD
22
# 返回所有 AdGuardHome 的请求
33
iptables -t nat -A ADGUARD -m owner --uid-owner root --gid-owner net_admin -j RETURN
44
# 将 53 端口所有 udp tcp 流量转发到 adguard home
5+
# iptables -t nat -A ADGUARD -p udp --dport 53 -j DNAT --to-destination 127.0.0.1:5591
6+
# iptables -t nat -A ADGUARD -p tcp --dport 53 -j DNAT --to-destination 127.0.0.1:5591
57
iptables -t nat -A ADGUARD -p udp --dport 53 -j REDIRECT --to-ports 5591
68
iptables -t nat -A ADGUARD -p tcp --dport 53 -j REDIRECT --to-ports 5591
79
# 将 ADGUARD 规则添加到 OUTPUT

bin/AdGuardHome

-832 KB
Binary file not shown.

bin/AdGuardHome.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ dns:
2323
ratelimit_whitelist: []
2424
refuse_any: true
2525
upstream_dns:
26-
- '#https://1.12.12.12/dns-query'
27-
- '#https://120.53.53.53/dns-query'
28-
- '#https://223.5.5.5/dns-query'
29-
- '#https://223.6.6.6/dns-query'
30-
- 223.5.5.5
26+
- https://1.12.12.12/dns-query
27+
- https://120.53.53.53/dns-query
28+
- https://223.5.5.5/dns-query
29+
- https://223.6.6.6/dns-query
3130
upstream_dns_file: ""
3231
bootstrap_dns:
33-
- 0.0.0.0
32+
- 1.1.1.1
33+
- 8.8.8.8
3434
fallback_dns:
35-
- '#https://1.1.1.1/dns-query'
35+
- https://1.1.1.1/dns-query
3636
upstream_mode: load_balance
3737
fastest_timeout: 1s
3838
allowed_clients: []
@@ -69,7 +69,6 @@ dns:
6969
serve_http3: false
7070
use_http3_upstreams: false
7171
serve_plain_dns: true
72-
hostsfile_enabled: true
7372
tls:
7473
enabled: false
7574
server_name: ""
@@ -86,14 +85,12 @@ tls:
8685
private_key_path: ""
8786
strict_sni_check: false
8887
querylog:
89-
dir_path: ""
9088
ignored: []
9189
interval: 6h
9290
size_memory: 1000
9391
enabled: true
9492
file_enabled: true
9593
statistics:
96-
dir_path: ""
9794
ignored: []
9895
interval: 24h
9996
enabled: true
@@ -137,15 +134,15 @@ filtering:
137134
pixabay: true
138135
yandex: true
139136
youtube: true
140-
blocking_mode: default
137+
blocking_mode: null_ip
141138
parental_block_host: family-block.dns.adguard.com
142139
safebrowsing_block_host: standard-block.dns.adguard.com
143140
rewrites: []
144141
safebrowsing_cache_size: 1048576
145142
safesearch_cache_size: 1048576
146143
parental_cache_size: 1048576
147144
cache_time: 30
148-
filters_update_interval: 72
145+
filters_update_interval: 168
149146
blocked_response_ttl: 30
150147
filtering_enabled: true
151148
parental_enabled: false
@@ -171,4 +168,4 @@ os:
171168
group: ""
172169
user: ""
173170
rlimit_nofile: 0
174-
schema_version: 28
171+
schema_version: 27

0 commit comments

Comments
 (0)