diff options
author | Stan Grishin <stangri@melmac.ca> | 2023-09-03 18:03:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-03 18:03:43 -0700 |
commit | c6aa813d9d232fbb6eea3fccc4387c4eeac4353c (patch) | |
tree | c5b9e61f064ca222828a6bceec0fd6d10358bbc9 /applications/luci-app-https-dns-proxy/root | |
parent | 736ed39dca1ee18ddd6883c7ea3559a772c201d5 (diff) | |
parent | 6df7b92a50485d7a7c61c38c5abeaf96ad69a28c (diff) |
Merge pull request #6546 from stangri/master-luci-app-https-dns-proxy
luci-app-https-dns-proxy: rewrite in javascript
Diffstat (limited to 'applications/luci-app-https-dns-proxy/root')
44 files changed, 827 insertions, 13 deletions
diff --git a/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy b/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy new file mode 100755 index 0000000000..8400af5f1f --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy @@ -0,0 +1,206 @@ +#!/bin/sh +# Copyright 2023 MOSSDeF, Stan Grishin (stangri@melmac.ca) +# shellcheck disable=SC1091,SC2039,SC3043 + +# TechRef: https://openwrt.org/docs/techref/rpcd + +# ubus -v list luci.https-dns-proxy +# ubus -S call luci.https-dns-proxy getInitList '{"name": "https-dns-proxy" }' +# ubus -S call luci.https-dns-proxy getInitStatus '{"name": "https-dns-proxy" }' +# ubus -S call luci.https-dns-proxy getPlatformSupport '{"name": "https-dns-proxy" }' +# ubus -S call luci.https-dns-proxy getProviders '{"name": "https-dns-proxy" }' +# ubus -S call luci.https-dns-proxy getRuntime '{"name": "https-dns-proxy" }' + +readonly packageName="https-dns-proxy" +readonly providersDir="/usr/share/${packageName}/providers" + +. /lib/functions.sh +. /usr/share/libubox/jshn.sh + +is_enabled() { "/etc/init.d/${1}" enabled; } +is_running() { [ "$(ubus call service list "{ 'name': '$1' }" | jsonfilter -q -e "@['$1'].instances[*].running" | uniq)" = 'true' ]; } +get_version() { grep -m1 -A2 -w "^Package: $1$" /usr/lib/opkg/status | sed -n 's/Version: //p'; } +check_http2() { grep -q 'Provides: libnghttp2' /usr/lib/opkg/status; } +check_http3() { grep -q 'Provides: libnghttp3' /usr/lib/opkg/status; } +ubus_get_ports() { ubus call service list "{ 'name': '$packageName' }" | jsonfilter -e "@['${packageName}'].instances[*].data.firewall.*.dest_port"; } +logger() { /usr/bin/logger -t "$packageName" "$@"; } +print_json_bool() { json_init; json_add_boolean "$1" "$2"; json_dump; json_cleanup; } + +get_init_list() { + local name="$1" + json_init + json_add_object "$name" + if is_enabled "$name"; then + json_add_boolean 'enabled' '1' + else + json_add_boolean 'enabled' '0' + fi + if is_running "$name"; then + json_add_boolean 'running' '1' + else + json_add_boolean 'running' '0' + fi + json_close_object + json_dump + json_cleanup +} + +get_init_status() { + local name + local i ports + local version + name="$(basename "$1")" + name="${name:-$packageName}" + ports="$(ubus_get_ports)" + [ -z "$version" ] && version="$(get_version "$name")" + json_init + json_add_object "$name" + if is_enabled "$name"; then + json_add_boolean 'enabled' '1' + else + json_add_boolean 'enabled' '0' + fi + if is_running "$name"; then + json_add_boolean 'running' '1' + else + json_add_boolean 'running' '0' + fi + if [ -n "$ports" ]; then + json_add_boolean 'force_dns_active' '1' + json_add_array 'force_dns_ports' + for i in $ports; do json_add_int '' "$i"; done + json_close_array + else + json_add_boolean 'force_dns_active' '0' + fi + json_add_string 'version' "$version" + json_close_array + json_close_object + json_dump + json_cleanup +} + +get_platform_support() { + local name + name="$(basename "$1")" + name="${name:-$packageName}" + json_init + json_add_object "$name" + if check_http2; then + json_add_boolean 'http2_support' '1' + else + json_add_boolean 'http2_support' '0' + fi + if check_http3; then + json_add_boolean 'http3_support' '1' + else + json_add_boolean 'http3_support' '0' + fi + json_close_object + json_dump + json_cleanup +} + +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 ']}' +} + +get_runtime() { ubus call service list "{ 'verbose': true, 'name': '$1' }"; } + +set_init_action() { + local name="$1" action="$2" cmd + case $action in + enable) + cmd="/etc/init.d/${name} enable";; + disable) + cmd="/etc/init.d/${name} disable";; + start|stop|restart) + cmd="/etc/init.d/${name} ${action}";; + esac + if [ -n "$cmd" ] && eval "${cmd}" >/dev/null 2>&1; then + print_json_bool "result" '1' + else + print_json_bool "result" '0' + fi +} + +case "$1" in + list) + json_init + json_add_object "getInitList" + json_add_string 'name' "name" + json_close_object + json_add_object "getInitStatus" + json_add_string 'name' 'name' + json_close_object + json_add_object "getPlatformSupport" + 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" + json_close_object + json_add_object "setInitAction" + json_add_string 'name' "name" + json_add_string 'action' "action" + json_close_object + json_dump + json_cleanup + ;; + call) + case "$2" in + getInitList) + read -r input + json_load "$input" + json_get_var name "name" + json_cleanup + get_init_list "$name" + ;; + getInitStatus) + read -r input + json_load "$input" + json_get_var name 'name' + json_cleanup + get_init_status "$name" + ;; + getPlatformSupport) + read -r input + json_load "$input" + json_get_var name 'name' + json_cleanup + get_platform_support "$name" + ;; + getProviders) + read -r input + json_load "$input" + json_get_var name "name" + json_cleanup + get_providers "$name" + ;; + getRuntime) + read -r input + json_load "$input" + json_get_var name "name" + json_cleanup + get_runtime "$name" + ;; + setInitAction) + read -r input + json_load "$input" + json_get_var name "name" + json_get_var action "action" + json_cleanup + set_init_action "$name" "$action" + ;; + esac + ;; +esac diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/app.tiarap.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/app.tiarap.doh.json new file mode 100644 index 0000000000..6fe4ec72d5 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/app.tiarap.doh.json @@ -0,0 +1,24 @@ +{ + "title": "Tiarap Public DNS (JP)", + "template": "https://doh.{option}/dns-query", + "bootstrap_dns": "172.104.93.80,2400:8902::f03c:91ff:feda:c514", + "help_link": "https://tiarap.org/", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(tiar.app|tiarap.org)", + "options": [ + { + "value": "tiar.app", + "description": "Direct" + }, + { + "value": "tiarap.org", + "description": "Cloudlfare Cached" + } + ], + "default": "tiar.app" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ca.cira.canadianshield.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ca.cira.canadianshield.json new file mode 100644 index 0000000000..9fd0f9a8d9 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ca.cira.canadianshield.json @@ -0,0 +1,28 @@ +{ + "title": "CIRA Canadian Shield", + "template": "https://{option}.canadianshield.cira.ca/dns-query", + "bootstrap_dns": "149.112.121.30,149.112.122.30,2620:10A:80BB::30,2620:10A:80BC::30", + "help_link": "https://www.cira.ca/cybersecurity-services/canadian-shield/", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(family|private|protected)", + "options": [ + { + "value": "family", + "description": "Family Filter" + }, + { + "value": "private", + "description": "Private Filter" + }, + { + "value": "Protected", + "description": "Protected Filter" + } + ], + "default": "private" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.json new file mode 100644 index 0000000000..ec3b9466cc --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.json @@ -0,0 +1,7 @@ +{ + "title": "Digitale Gesellschaft (CH)", + "template": "https://dns.digitale-gesellschaft.ch/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "http2_only": true, + "help_link": "https://www.digitale-gesellschaft.ch/dns/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.switch.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.switch.dns.json new file mode 100644 index 0000000000..19e36079df --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.switch.dns.json @@ -0,0 +1,6 @@ +{ + "title": "Switch DNS (CH)", + "template": "https://dns.switch.ch/dns-query", + "bootstrap_dns": "130.59.31.248,2001:620:0:ff::2", + "help_link": "https://www.switch.ch/security/info/public-dns/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cn.360.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cn.360.doh.json new file mode 100644 index 0000000000..ef97fa27e5 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cn.360.doh.json @@ -0,0 +1,5 @@ +{ + "title": "DoH 360 DNS (CN)", + "template": "https://doh.360.cn/dns-query", + "bootstrap_dns": "101.226.4.6,218.30.118.6,123.125.81.6,140.207.198.6" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cn.rubyfish.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cn.rubyfish.dns.json new file mode 100644 index 0000000000..ee75e953a2 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cn.rubyfish.dns.json @@ -0,0 +1,6 @@ +{ + "title": "RubyFish (CN)", + "template": "https://dns.rubyfish.cn/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "http2_only": true +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/co.oszx.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/co.oszx.dns.json new file mode 100644 index 0000000000..943aca80bc --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/co.oszx.dns.json @@ -0,0 +1,24 @@ +{ + "title": "OSZX DNS (UK)", + "template": "https://doh.{option}/dns-query", + "bootstrap_dns": "51.38.82.198,2001:41d0:801:2000::1b28", + "help_link": "https://dns.oszx.co/#mdoh", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(oszx.co|pumplex.com)", + "options": [ + { + "value": "oszx.co", + "description": "AdBlocking Filter" + }, + { + "value": "pumplex.com", + "description": "Standard" + } + ], + "default": "oszx.co" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.adguard.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.adguard.dns.json new file mode 100644 index 0000000000..f685ba4d60 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.adguard.dns.json @@ -0,0 +1,24 @@ +{ + "title": "AdGuard", + "template": "https://dns{option}.adguard.com/dns-query", + "bootstrap_dns": "176.103.130.130,176.103.130.131", + "help_link": "https://adguard.com/en/adguard-dns/overview.html", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(-family|)", + "options": [ + { + "value": "-family", + "description": "Family Filter" + }, + { + "value": "", + "description": "Standard" + } + ], + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.ahadns.blitz.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.ahadns.blitz.json new file mode 100644 index 0000000000..b2c463fd1a --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.ahadns.blitz.json @@ -0,0 +1,13 @@ +{ + "title": "AhaDNS Blitz", + "template": "https://blitz.ahadns.com/{option}", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://blitz-setup.ahadns.com/", + "params": { + "option": { + "description": "Filters", + "type": "text", + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.alidns.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.alidns.dns.json new file mode 100644 index 0000000000..b32694b417 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.alidns.dns.json @@ -0,0 +1,5 @@ +{ + "title": "AliDNS", + "template": "https://dns.alidns.com/dns-query", + "bootstrap_dns": "223.5.5.5,223.6.6.6,2400:3200::1,2400:3200:baba::1" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json new file mode 100644 index 0000000000..a101c9030d --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json @@ -0,0 +1,36 @@ +{ + "title": "BlahDNS", + "template": "https://doh-{option}.blahdns.com/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://blahdns.com/", + "params": { + "option": { + "description": "Location", + "type": "select", + "regex": "(ch|de|fi|jp|sg)", + "options": [ + { + "value": "ch", + "description": "Switzerland" + }, + { + "value": "de", + "description": "Germany" + }, + { + "value": "fi", + "description": "Finland" + }, + { + "value": "jp", + "description": "Japan" + }, + { + "value": "sg", + "description": "Singapore" + } + ], + "default": "ch" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.cloudflare-dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.cloudflare-dns.json new file mode 100644 index 0000000000..16f668911d --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.cloudflare-dns.json @@ -0,0 +1,28 @@ +{ + "title": "Cloudflare", + "template": "https://{option}cloudflare-dns.com/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001", + "help_link": "https://one.one.one.one/", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(family.||security.)", + "options": [ + { + "value": "family.", + "description": "Family Filter" + }, + { + "value": "", + "description": "Standard" + }, + { + "value": "security.", + "description": "Security Filter" + } + ], + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.controld.freedns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.controld.freedns.json new file mode 100644 index 0000000000..8ee2dc3804 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.controld.freedns.json @@ -0,0 +1,36 @@ +{ + "title": "ControlD", + "template": "https://freedns.controld.com/{option}", + "bootstrap_dns": "76.76.2.0,2606:1a40::0", + "help_link": "https://kb.controld.com/tutorials", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(family|p0|p1|p2|p3)", + "options": [ + { + "value": "family", + "description": "Family Filter" + }, + { + "value": "p0", + "description": "Standard" + }, + { + "value": "p1", + "description": "Malware Filter" + }, + { + "value": "p2", + "description": "Ads + Malware Filter" + }, + { + "value": "p3", + "description": "Ads + Malware + Social Filter" + } + ], + "default": "p0" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.decloudus.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.decloudus.dns.json new file mode 100644 index 0000000000..9d7053c5eb --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.decloudus.dns.json @@ -0,0 +1,6 @@ +{ + "title": "DeCloudUs DNS", + "template": "https://dns.decloudus.com/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://decloudus.com/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.dnsforfamily.dns-doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.dnsforfamily.dns-doh.json new file mode 100644 index 0000000000..c39427dade --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.dnsforfamily.dns-doh.json @@ -0,0 +1,6 @@ +{ + "title": "DNS For Family", + "template": "https://dns-doh.dnsforfamily.com/dns-query", + "bootstrap_dns": "94.130.180.225,78.47.64.161", + "help_link": "https://dnsforfamily.com/#DNS_Servers_DNS_Over_HTTPS" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.dnslify.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.dnslify.doh.json new file mode 100644 index 0000000000..73421f5c66 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.dnslify.doh.json @@ -0,0 +1,6 @@ +{ + "title": "DNSlify DNS", + "template": "https://doh.dnslify.com/dns-query", + "bootstrap_dns": "185.235.81.1,185.235.81.2,2a0d:4d00:81::1,2a0d:4d00:81::2", + "help_link": "https://www.dnslify.com/services/doh/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.opendns.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.opendns.doh.json new file mode 100644 index 0000000000..b9989d5383 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.opendns.doh.json @@ -0,0 +1,24 @@ +{ + "title": "OpenDNS", + "template": "https://doh.{option}opendns.com/dns-query", + "bootstrap_dns": "208.67.222.222,208.67.220.220", + "help_link": "https://support.opendns.com/hc/en-us/articles/360038086532-Using-DNS-over-HTTPS-DoH-with-OpenDNS", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(family.|)", + "options": [ + { + "value": "family.", + "description": "Family Filter" + }, + { + "value": "", + "description": "Standard" + } + ], + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.rethinkdns.sky.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.rethinkdns.sky.json new file mode 100644 index 0000000000..890438966f --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.rethinkdns.sky.json @@ -0,0 +1,13 @@ +{ + "title": "Rethink DNS", + "template": "https://sky.rethinkdns.com/{option}", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://www.rethinkdns.com/configure", + "params": { + "option": { + "description": "Filters", + "type": "text", + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cz.nic.odvr.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cz.nic.odvr.json new file mode 100644 index 0000000000..296f38ae0d --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/cz.nic.odvr.json @@ -0,0 +1,5 @@ +{ + "title": "ODVR (CZ)", + "template": "https://odvr.nic.cz/doh", + "bootstrap_dns": "193.17.47.1,185.43.135.1" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/de.dnsforge.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/de.dnsforge.json new file mode 100644 index 0000000000..a334e6a677 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/de.dnsforge.json @@ -0,0 +1,6 @@ +{ + "title": "DNS Forge (DE)", + "template": "https://dnsforge.de/dns-query", + "bootstrap_dns": "176.9.93.198,176.9.1.117,2a01:4f8:151:34aa::198,2a01:4f8:141:316d::117", + "help_link": "https://dnsforge.de/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/fi.lelux.resolver-eu.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/fi.lelux.resolver-eu.json new file mode 100644 index 0000000000..6372c9e5ac --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/fi.lelux.resolver-eu.json @@ -0,0 +1,6 @@ +{ + "title": "Lelux DNS (FI)", + "template": "https://resolver-eu.lelux.fi/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://lelux.fi/resolver/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/google.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/google.dns.json new file mode 100644 index 0000000000..64d8e86f24 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/google.dns.json @@ -0,0 +1,6 @@ +{ + "title": "Google", + "template": "https://dns.google/dns-query", + "bootstrap_dns": "8.8.8.8,8.8.4.4", + "default": true +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/gr.libredns.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/gr.libredns.doh.json new file mode 100644 index 0000000000..037289f515 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/gr.libredns.doh.json @@ -0,0 +1,24 @@ +{ + "title": "LibreDNS (GR)", + "template": "https://doh.libredns.gr/{option}", + "bootstrap_dns": "116.202.176.26", + "help_link": "https://libredns.gr/", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(ads|dns-query)", + "options": [ + { + "value": "ads", + "description": "AdBlocking Filter" + }, + { + "value": "dns-query", + "description": "Standard" + } + ], + "default": "dns-query" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/io.nextdns.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/io.nextdns.dns.json new file mode 100644 index 0000000000..753b78523c --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/io.nextdns.dns.json @@ -0,0 +1,13 @@ +{ + "title": "NextDNS.io", + "template": "https://dns.nextdns.io/{option}", + "bootstrap_dns": "45.90.28.49,45.90.30.49", + "help_link": "https://my.nextdns.io", + "params": { + "option": { + "description": "Username", + "type": "text", + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/io.seby.doh-2.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/io.seby.doh-2.json new file mode 100644 index 0000000000..90b6be7927 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/io.seby.doh-2.json @@ -0,0 +1,6 @@ +{ + "title": "Seby DNS (AU)", + "template": "https://doh-2.seby.io/dns-query", + "bootstrap_dns": "45.76.113.31,139.99.222.72", + "help_link": "https://dns.seby.io/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/jp.iij.dns.public.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/jp.iij.dns.public.json new file mode 100644 index 0000000000..ffd8be7515 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/jp.iij.dns.public.json @@ -0,0 +1,6 @@ +{ + "title": "IIJ Public DNS (JP)", + "template": "https://public.dns.iij.jp/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://www.iij.ad.jp/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/lu.restena.kaitain.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/lu.restena.kaitain.json new file mode 100644 index 0000000000..1dcc11f903 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/lu.restena.kaitain.json @@ -0,0 +1,7 @@ +{ + "title": "Restena DNS (LU)", + "template": "https://kaitain.restena.lu/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://www.restena.lu/en/service/public-dns-resolver", + "http2_only": true +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json new file mode 100644 index 0000000000..2acdcee955 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json @@ -0,0 +1,56 @@ +{ + "title": "AhaDNS Regional", + "template": "https://doh.{option}.ahadns.net/dns-query", + "bootstrap_dns": "185.213.26.187,45.67.219.208,5.2.75.75,45.79.120.233,2a0d:5600:33:3::3,2a04:bdc7:100:70::70,2a04:52c0:101:75::75,2400:8904:e001:43::43", + "help_link": "https://ahadns.com/dns-over-https/", + "params": { + "option": { + "description": "Location", + "type": "select", + "regex": "(au|chi|es|in|it|la|nl|no|ny|pl)", + "options": [ + { + "value": "au", + "description": "Australia" + }, + { + "value": "chi", + "description": "US/Chicago" + }, + { + "value": "es", + "description": "Spain" + }, + { + "value": "in", + "description": "India" + }, + { + "value": "it", + "description": "Italy" + }, + { + "value": "la", + "description": "US/Los Angeles" + }, + { + "value": "nl", + "description": "Netherlands" + }, + { + "value": "no", + "description": "Norway" + }, + { + "value": "ny", + "description": "US/New York" + }, + { + "value": "pl", + "description": "Poland" + } + ], + "default": "chi" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.applied-privacy.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.applied-privacy.doh.json new file mode 100644 index 0000000000..d24e7f1016 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.applied-privacy.doh.json @@ -0,0 +1,6 @@ +{ + "title": "Applied Privacy DNS (AT)", + "template": "https://doh.applied-privacy.net/query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://applied-privacy.net/services/dns/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.cfiec.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.cfiec.dns.json new file mode 100644 index 0000000000..fcca173586 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.cfiec.dns.json @@ -0,0 +1,5 @@ +{ + "title": "CFIEC Public IPv6 Only DNS (CN)", + "template": "https://dns.cfiec.net/dns-query", + "bootstrap_dns": "240C::6666,240C::6644" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ffmuc.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ffmuc.doh.json new file mode 100644 index 0000000000..5c0d6a0416 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ffmuc.doh.json @@ -0,0 +1,6 @@ +{ + "title": "FFMUC DNS (DE)", + "template": "https://doh.ffmuc.net/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://ffmuc.net/wiki/doku.php?id=knb:dohdot" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.he.ordns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.he.ordns.json new file mode 100644 index 0000000000..6a2be8c6c6 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.he.ordns.json @@ -0,0 +1,6 @@ +{ + "title": "Hurricane Electric", + "template": "https://ordns.he.net/dns-query", + "bootstrap_dns": "74.82.42.42,2001:470:20::2", + "help_link": "https://forums.he.net/index.php?topic=3996.0" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.idnet.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.idnet.doh.json new file mode 100644 index 0000000000..9e6fdf779f --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.idnet.doh.json @@ -0,0 +1,5 @@ +{ + "title": "IDNet (UK)", + "template": "https://doh.idnet.net/dns-query", + "bootstrap_dns": "212.69.36.23,212.69.40.23" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.mullvad.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.mullvad.doh.json new file mode 100644 index 0000000000..18dad9c214 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.mullvad.doh.json @@ -0,0 +1,25 @@ +{ + "title": "Mullvad", + "template": "https://{option}doh.mullvad.net/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://mullvad.net/en/help/dns-over-https-and-dns-over-tls/", + "http2_only": true, + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(adblock.|)", + "options": [ + { + "value": "adblock.", + "description": "AdBlocking Filter" + }, + { + "value": "", + "description": "Standard" + } + ], + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.quad9.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.quad9.json new file mode 100644 index 0000000000..b3b5d6f92f --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.quad9.json @@ -0,0 +1,32 @@ +{ + "title": "Quad 9", + "template": "https://{option}.quad9.net/dns-query", + "bootstrap_dns": "9.9.9.9,149.112.112.112,2620:fe::fe,2620:fe::9", + "help_link": "https://www.quad9.net/doh-quad9-dns-servers/", + "params": { + "option": { + "description": "Variant", + "type": "select", + "regex": "(dns|dns9|dns10|dns11)", + "options": [ + { + "value": "dns", + "description": "Standard" + }, + { + "value": "dns9", + "description": "Secured" + }, + { + "value": "dns10", + "description": "Unsecured" + }, + { + "value": "dns11", + "description": "Secured with ECS Support" + } + ], + "default": "dns" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/one.comss.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/one.comss.dns.json new file mode 100644 index 0000000000..85dd5cc663 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/one.comss.dns.json @@ -0,0 +1,23 @@ +{ + "title": "Comss DNS (RU)", + "template": "https://dns.{option}comss.one/dns-query", + "bootstrap_dns": "92.38.152.163,93.115.24.204,2a03:90c0:56::1a5,2a02:7b40:5eb0:e95d::1", + "params": { + "option": { + "description": "Location", + "type": "select", + "regex": "(east.|)", + "options": [ + { + "value": "east.", + "description": "Siberia" + }, + { + "value": "", + "description": "Moscow, St Petersburg" + } + ], + "default": "" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.cleanbrowsing.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.cleanbrowsing.doh.json new file mode 100644 index 0000000000..fa21e53b24 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.cleanbrowsing.doh.json @@ -0,0 +1,28 @@ +{ + "title": "CleanBrowsing", + "template": "https://doh.cleanbrowsing.org/doh/{option}-filter/", + "bootstrap_dns": "185.228.168.168", + "help_link": "https://cleanbrowsing.org/guides/dnsoverhttps", + "params": { + "option": { + "description": "Filter", + "type": "select", + "regex": "(adult|family|security)", + "options": [ + { + "value": "adult", + "description": "Adult Content Filter" + }, + { + "value": "family", + "description": "Family Filter" + }, + { + "value": "security", + "description": "Security Filter" + } + ], + "default": "security" + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.snopyta.dns.doh.fi.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.snopyta.dns.doh.fi.json new file mode 100644 index 0000000000..521933c52d --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.snopyta.dns.doh.fi.json @@ -0,0 +1,6 @@ +{ + "title": "Snopyta DNS (FI)", + "template": "https://fi.doh.dns.snopyta.org/dns-query", + "bootstrap_dns": "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + "help_link": "https://snopyta.org/service/dns/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/pub.doh.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/pub.doh.json new file mode 100644 index 0000000000..0a381b1fdd --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/pub.doh.json @@ -0,0 +1,5 @@ +{ + "title": "DNSPod Public DNS (CN)", + "template": "https://doh.pub/dns-query", + "bootstrap_dns": "119.29.29.29,119.28.28.28" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/sb.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/sb.dns.json new file mode 100644 index 0000000000..f061b17a6b --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/sb.dns.json @@ -0,0 +1,7 @@ +{ + "title": "DoH DNS (SB)", + "template": "https://doh.dns.sb/dns-query", + "bootstrap_dns": "185.222.222.222,185.184.222.222", + "help_link": "https://dns.sb/doh/", + "http2_only": true +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/tw.twnic.dns.json b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/tw.twnic.dns.json new file mode 100644 index 0000000000..ddcd9a3a49 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/tw.twnic.dns.json @@ -0,0 +1,6 @@ +{ + "title": "Quad 101 (TW)", + "template": "https://dns.twnic.tw/dns-query", + "bootstrap_dns": "101.101.101.101,101.102.103.104,2001:de4::101,2001:de4::102", + "help_link": "https://blog.twnic.tw/2018/12/28/1803/" +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/luci/menu.d/luci-app-https-dns-proxy.json b/applications/luci-app-https-dns-proxy/root/usr/share/luci/menu.d/luci-app-https-dns-proxy.json new file mode 100644 index 0000000000..4b221459bb --- /dev/null +++ b/applications/luci-app-https-dns-proxy/root/usr/share/luci/menu.d/luci-app-https-dns-proxy.json @@ -0,0 +1,15 @@ +{ + "admin/services/https-dns-proxy": { + "title": "HTTPS DNS Proxy", + "order": 90, + "action": { + "type": "view", + "path": "https-dns-proxy/overview" + }, + "depends": { + "acl": [ + "luci-app-https-dns-proxy" + ] + } + } +} diff --git a/applications/luci-app-https-dns-proxy/root/usr/share/rpcd/acl.d/luci-app-https-dns-proxy.json b/applications/luci-app-https-dns-proxy/root/usr/share/rpcd/acl.d/luci-app-https-dns-proxy.json index 97f8c6df41..6603d3596a 100644 --- a/applications/luci-app-https-dns-proxy/root/usr/share/rpcd/acl.d/luci-app-https-dns-proxy.json +++ b/applications/luci-app-https-dns-proxy/root/usr/share/rpcd/acl.d/luci-app-https-dns-proxy.json @@ -2,28 +2,29 @@ "luci-app-https-dns-proxy": { "description": "Grant UCI and file access for luci-app-https-dns-proxy", "read": { - "cgi-io": [ - "exec" - ], - "file": { - "/usr/lib/opkg/status": [ - "read" - ], - "/usr/lib/lua/luci/https-dns-proxy/providers/*": [ - "read" - ], - "/etc/init.d/https-dns-proxy *": [ - "exec" + "ubus": { + "luci.https-dns-proxy": [ + "getInitList", + "getInitStatus", + "getPlatformSupport", + "getProviders", + "getRuntime" ] }, "uci": [ + "dhcp", "https-dns-proxy" ] }, "write": { "uci": [ "https-dns-proxy" - ] + ], + "ubus": { + "luci.https-dns-proxy": [ + "setInitAction" + ] + } } } } |