Skip to content

Commit

Permalink
https-dns-proxy: bugfixes
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
stangri committed Feb 18, 2025
1 parent 162b1e6 commit c6cf92d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/https-dns-proxy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
5 changes: 3 additions & 2 deletions net/https-dns-proxy/files/etc/init.d/https-dns-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit c6cf92d

Please sign in to comment.