Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providers: load as a single DB file. #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions root/usr/libexec/rpcd/luci.https-dns-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

readonly packageName="https-dns-proxy"
readonly providersDir="/usr/share/${packageName}/providers"
readonly providersDB="providerdb.json"

. /lib/functions.sh
. /usr/share/libubox/jshn.sh
Expand Down Expand Up @@ -102,14 +103,7 @@ get_platform_support() {
}

get_providers() {
local f
echo '{"https-dns-proxy":['
for f in "$providersDir"/*; do
cat "$f"
echo ','
done
# echo '{ "title": "Custom", "template": "{option}", "params": { "option": { "type": "text", }, }, },'
echo ']}'
cat "$providersDir"/"$providersDB"
}

get_runtime() { ubus call service list "{ 'verbose': true, 'name': '$1' }"; }
Expand Down Expand Up @@ -141,7 +135,6 @@ case "$1" in
json_add_string 'name' 'name'
json_close_object
json_add_object "getProviders"
json_add_string 'name' "name"
json_close_object
json_add_object "getRuntime"
json_add_string 'name' "name"
Expand Down Expand Up @@ -181,7 +174,7 @@ case "$1" in
json_load "$input"
json_get_var name "name"
json_cleanup
get_providers "$name"
get_providers
;;
getRuntime)
read -r input
Expand Down
24 changes: 0 additions & 24 deletions root/usr/share/https-dns-proxy/providers/app.tiarap.doh.json

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions root/usr/share/https-dns-proxy/providers/ch.switch.dns.json

This file was deleted.

5 changes: 0 additions & 5 deletions root/usr/share/https-dns-proxy/providers/cn.360.doh.json

This file was deleted.

6 changes: 0 additions & 6 deletions root/usr/share/https-dns-proxy/providers/cn.rubyfish.dns.json

This file was deleted.

24 changes: 0 additions & 24 deletions root/usr/share/https-dns-proxy/providers/co.oszx.dns.json

This file was deleted.

28 changes: 0 additions & 28 deletions root/usr/share/https-dns-proxy/providers/com.adguard.dns.json

This file was deleted.

13 changes: 0 additions & 13 deletions root/usr/share/https-dns-proxy/providers/com.ahadns.blitz.json

This file was deleted.

5 changes: 0 additions & 5 deletions root/usr/share/https-dns-proxy/providers/com.alidns.dns.json

This file was deleted.

36 changes: 0 additions & 36 deletions root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json

This file was deleted.

28 changes: 0 additions & 28 deletions root/usr/share/https-dns-proxy/providers/com.cloudflare-dns.json

This file was deleted.

36 changes: 0 additions & 36 deletions root/usr/share/https-dns-proxy/providers/com.controld.freedns.json

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions root/usr/share/https-dns-proxy/providers/com.dnslify.doh.json

This file was deleted.

24 changes: 0 additions & 24 deletions root/usr/share/https-dns-proxy/providers/com.opendns.doh.json

This file was deleted.

13 changes: 0 additions & 13 deletions root/usr/share/https-dns-proxy/providers/com.rethinkdns.sky.json

This file was deleted.

5 changes: 0 additions & 5 deletions root/usr/share/https-dns-proxy/providers/cz.nic.odvr.json

This file was deleted.

6 changes: 0 additions & 6 deletions root/usr/share/https-dns-proxy/providers/de.dnsforge.json

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions root/usr/share/https-dns-proxy/providers/google.dns.json

This file was deleted.

Loading