|
|
@ -8,13 +8,18 @@ START=80 |
|
|
|
# shellcheck disable=SC2034 |
|
|
|
USE_PROCD=1 |
|
|
|
|
|
|
|
if type extra_command 1>/dev/null 2>&1; then |
|
|
|
extra_command 'version' 'Show version information' |
|
|
|
else |
|
|
|
# shellcheck disable=SC2034 |
|
|
|
EXTRA_COMMANDS='version' |
|
|
|
version() { echo "$PKG_VERSION"; } |
|
|
|
EXTRA_COMMANDS='version' |
|
|
|
fi |
|
|
|
|
|
|
|
readonly PROG=/usr/sbin/https-dns-proxy |
|
|
|
dnsmasqConfig='' |
|
|
|
|
|
|
|
PROG=/usr/sbin/https-dns-proxy |
|
|
|
version() { echo "$PKG_VERSION"; } |
|
|
|
|
|
|
|
|
|
|
|
xappend() { param="$param $1"; } |
|
|
|
|
|
|
@ -43,10 +48,11 @@ append_parm() { |
|
|
|
start_instance() { |
|
|
|
local cfg="$1" param listen_addr listen_port i |
|
|
|
|
|
|
|
append_parm "$cfg" 'resolver_url' '-r' |
|
|
|
append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1' |
|
|
|
append_parm "$cfg" 'listen_port' '-p' "$p" |
|
|
|
append_parm "$cfg" 'dscp_codepoint' '-c' |
|
|
|
append_parm "$cfg" 'bootstrap_dns' '-b' |
|
|
|
append_parm "$cfg" 'resolver_url' '-r' |
|
|
|
append_parm "$cfg" 'user' '-u' 'nobody' |
|
|
|
append_parm "$cfg" 'group' '-g' 'nogroup' |
|
|
|
append_parm "$cfg" 'proxy_server' '-t' |
|
|
@ -86,10 +92,6 @@ start_instance() { |
|
|
|
p="$((p+1))" |
|
|
|
} |
|
|
|
|
|
|
|
service_triggers() { |
|
|
|
procd_add_reload_trigger 'https-dns-proxy' |
|
|
|
} |
|
|
|
|
|
|
|
start_service() { |
|
|
|
local p=5053 |
|
|
|
config_load 'https-dns-proxy' |
|
|
@ -105,7 +107,7 @@ start_service() { |
|
|
|
|
|
|
|
stop_service() { |
|
|
|
config_load 'https-dns-proxy' |
|
|
|
config_get dnsmasqConfig 'config' 'update_dnsmasq_config' '*' |
|
|
|
config_get dnsmasqConfig 'config' 'update_dnsmasq_config' '*' |
|
|
|
dhcp_backup 'restore' |
|
|
|
if [ -n "$(uci -q changes dhcp)" ]; then |
|
|
|
uci -q commit dhcp |
|
|
@ -114,7 +116,7 @@ stop_service() { |
|
|
|
} |
|
|
|
|
|
|
|
service_triggers() { |
|
|
|
procd_add_reload_trigger 'https-dns-proxy' |
|
|
|
procd_add_config_trigger "config.change" "https-dns-proxy" /etc/init.d/https-dns-proxy reload |
|
|
|
} |
|
|
|
|
|
|
|
dnsmasq_add_doh_server() { |
|
|
|