0
0
mirror of https://github.com/openwrt/packages.git synced 2025-03-14 21:37:33 +00:00

https-dns-proxy: bugfixes

* No more `/sbin/uci: Invalid argument output` when set to not update
  dnsmasq instances (thanks @tmcqueen-materials for investigation!)
* Do not wait for interface.up on boot, hopefully this resolves the
  boot-up start for everyone

Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
Stan Grishin
2025-02-18 00:13:29 +00:00
parent 0f91e1b9c9
commit 706cad572c
2 changed files with 4 additions and 3 deletions
net/https-dns-proxy
Makefile
files/etc/init.d

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=https-dns-proxy
PKG_VERSION:=2023.12.26
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/

@ -33,6 +33,7 @@ readonly canaryDomainsiCloud='mask.icloud.com mask-h2.icloud.com'
hdp_boot_flag=
dnsmasq_restart() { [ -x /etc/init.d/dnsmasq ] || return 1; /etc/init.d/dnsmasq restart >/dev/null 2>&1; }
is_alnum() { case "$1" in (*[![:alnum:]_@]*|"") return 1;; esac; }
is_fw4_restart_needed() { [ "$(uci_get "$packageName" 'config' 'force_dns' '1')" = '1' ]; }
is_mac_address() { expr "$1" : '[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]$' >/dev/null; }
is_ipv4() { expr "$1" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; }
@ -133,7 +134,7 @@ append_bootstrap() {
}
boot() {
ubus -t 30 wait_for network.interface 2>/dev/null
# ubus -t 30 wait_for network.interface 2>/dev/null
rc_procd start_service 'on_boot' && service_started 'on_boot'
if ! is_resolver_working; then
hdp_boot_flag=1
@ -168,7 +169,7 @@ start_instance() {
config_load 'dhcp'
config_foreach dnsmasq_doh_server 'dnsmasq' 'add' "${listen_addr}" "${listen_port}"
config_foreach dnsmasq_instance_append_force_dns_port 'dnsmasq'
elif [ -n "$dnsmasq_config_update" ]; then
elif is_alnum "$dnsmasq_config_update"; then
for i in $dnsmasq_config_update; do
dnsmasq_doh_server "@dnsmasq[$i]" 'add' "${listen_addr}" "${listen_port}" || \
dnsmasq_doh_server "${i}" 'add' "${listen_addr}" "${listen_port}"