mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 14:35:13 +08:00
update 2026-09-26 11:07:27
This commit is contained in:
1 parent
7b88b273d0
commit
97ae9f68da
4898 files changed
-1712274
No files matched your search
@@ -1,58 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
add_cloudflare_profile() {
|
||||
uci set dnsproxy.preset_cloudflare='profile'
|
||||
uci set dnsproxy.preset_cloudflare.label='Preset: Cloudflare DoH'
|
||||
uci add_list dnsproxy.preset_cloudflare.bootstrap='1.1.1.1:53'
|
||||
uci add_list dnsproxy.preset_cloudflare.bootstrap='1.0.0.1:53'
|
||||
uci add_list dnsproxy.preset_cloudflare.upstream='https://cloudflare-dns.com/dns-query'
|
||||
uci add_list dnsproxy.preset_cloudflare.fallback='https://dns.quad9.net/dns-query'
|
||||
uci set dnsproxy.preset_cloudflare.upstream_mode='load_balance'
|
||||
}
|
||||
|
||||
add_quad9_profile() {
|
||||
uci set dnsproxy.preset_quad9='profile'
|
||||
uci set dnsproxy.preset_quad9.label='Preset: Quad9 DoH'
|
||||
uci add_list dnsproxy.preset_quad9.bootstrap='9.9.9.9:53'
|
||||
uci add_list dnsproxy.preset_quad9.bootstrap='149.112.112.112:53'
|
||||
uci add_list dnsproxy.preset_quad9.upstream='https://dns.quad9.net/dns-query'
|
||||
uci add_list dnsproxy.preset_quad9.fallback='https://cloudflare-dns.com/dns-query'
|
||||
uci set dnsproxy.preset_quad9.upstream_mode='load_balance'
|
||||
}
|
||||
|
||||
add_google_profile() {
|
||||
uci set dnsproxy.preset_google='profile'
|
||||
uci set dnsproxy.preset_google.label='Preset: Google DoH'
|
||||
uci add_list dnsproxy.preset_google.bootstrap='8.8.8.8:53'
|
||||
uci add_list dnsproxy.preset_google.bootstrap='8.8.4.4:53'
|
||||
uci add_list dnsproxy.preset_google.upstream='https://dns.google/dns-query'
|
||||
uci add_list dnsproxy.preset_google.fallback='https://cloudflare-dns.com/dns-query'
|
||||
uci set dnsproxy.preset_google.upstream_mode='load_balance'
|
||||
}
|
||||
|
||||
add_fast_mixed_profile() {
|
||||
uci set dnsproxy.preset_fast_mixed='profile'
|
||||
uci set dnsproxy.preset_fast_mixed.label='Preset: Fast mixed DoH'
|
||||
uci add_list dnsproxy.preset_fast_mixed.bootstrap='1.1.1.1:53'
|
||||
uci add_list dnsproxy.preset_fast_mixed.bootstrap='9.9.9.9:53'
|
||||
uci add_list dnsproxy.preset_fast_mixed.bootstrap='8.8.8.8:53'
|
||||
uci add_list dnsproxy.preset_fast_mixed.upstream='https://cloudflare-dns.com/dns-query'
|
||||
uci add_list dnsproxy.preset_fast_mixed.upstream='https://dns.quad9.net/dns-query'
|
||||
uci add_list dnsproxy.preset_fast_mixed.fallback='https://dns.google/dns-query'
|
||||
uci set dnsproxy.preset_fast_mixed.upstream_mode='parallel'
|
||||
}
|
||||
|
||||
# preset
|
||||
if [ -z "$(uci -q get dnsproxy.default)" ]; then
|
||||
uci -q get dnsproxy.preset_cloudflare >/dev/null || add_cloudflare_profile
|
||||
uci -q get dnsproxy.preset_quad9 >/dev/null || add_quad9_profile
|
||||
uci -q get dnsproxy.preset_google >/dev/null || add_google_profile
|
||||
uci -q get dnsproxy.preset_fast_mixed >/dev/null || add_fast_mixed_profile
|
||||
uci commit dnsproxy
|
||||
# default
|
||||
echo "config profile 'default'" >> /etc/config/dnsproxy
|
||||
echo " option label 'Default'" >> /etc/config/dnsproxy
|
||||
sed -n "/config dnsproxy 'servers'/,/^[^\t]/{/^\t/p}" /etc/config/dnsproxy >> /etc/config/dnsproxy
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"admin/services/dnsproxy": {
|
||||
"title": "DNS Proxy",
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "dnsproxy"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-dnsproxy" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"luci-app-dnsproxy": {
|
||||
"description": "Grant access to LuCI app dnsproxy",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"luci-rpc": [ "getHostHints" ],
|
||||
"service": [ "list" ]
|
||||
},
|
||||
"uci": ["dnsproxy"]
|
||||
},
|
||||
"write": {
|
||||
"uci": ["dnsproxy"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user