Commit Graph

19 Commits

Author SHA1 Message Date
Stan Grishin eff4ea9cf3 https-dns-proxy: update to 2026.03.18-3
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1

Description:
update to 2026.03.18, release 3

  - update PKG_RELEASE to 3

files/etc/init.d/https-dns-proxy:
  - refactor nftable rules to explicitly add and flush the table and
    chains instead of block replacement
  - make nftable `delete table` call silent in `notrack_nft remove`
  - update `notrack_nft remove` to check for absence of nftable table
    instead of just checking the file
  - ensure `notrack_nft remove` sets _error=1 on failure
  - ignore dnsmasq instances with port 0 in
    `dnsmasq_instance_append_force_dns_port`

tests/run_tests.sh:
  - add test case to ensure dnsmasq port 0 is ignored
  - update `notrack_nft remove` test to confirm success when both file
    and table are absent

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 4bac71e3cd)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-05-11 09:37:01 -07:00
Stan Grishin 8c1a56f2f5 https-dns-proxy: update to 2026.03.18-2
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1

Description:
Fix nftables rule directory creation

  - Bump PKG_RELEASE to 2.

files/etc/init.d/https-dns-proxy:
  - Add 'mkdir -p' before writing nftables rules to ensure the parent
    directory exists. This fixes an issue where the directory might not
    exist on initial installation, causing errors.

tests/run_tests.sh:
  - Add comprehensive regression tests for notrack_nft.
  - Mock 'nft' to track invocations and control return codes for testing.
  - Patch 'NOTRACK_NFT_FILE' to a test-specific path for isolated testing.
  - Verify 'notrack_nft' correctly creates the parent directory if missing.
  - Test content of generated nftables snippet, idempotence, and removal.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 3d9a73bd7e)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-05-07 09:59:34 -07:00
Stan Grishin da763f593d https-dns-proxy: update to 2026.03.18-1
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1

Description:
update to 2026.03.18, improve nftables rules

  - Update PKG_VERSION to 2026.03.18.
  - Set PKG_RELEASE to 1.
  - Update PKG_SOURCE_VERSION to 801881210ba8215dc9cd577222d8c10372423360.
  - Update PKG_MIRROR_HASH to 4c356c19b62fc7bdef3a67fd678e48f3659d709da10517c2eadef76e3409f5ce.

files/etc/init.d/https-dns-proxy:
  - Wrap the notrack chain in its own `inet https_dns_proxy_notrack`
    table. A top-level `chain` outside any table is invalid nftables
    syntax and is rejected on kernel 6.18+, breaking firewall load.
    Fixes mossdef-org/https-dns-proxy#7.
  - Syntax-check the generated snippet with `nft -c -f` after write
    and report OK/FAIL on the start path.
  - On remove, explicitly `nft delete table` in addition to removing
    the snippet file, so the live ruleset is cleaned up immediately
    rather than waiting for the next fw4 reload.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 0d5f7a16c1)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-05-03 17:41:50 -07:00
Stan Grishin c9b004abf2 https-dns-proxy: update to 2025.12.29-5
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.1

Description:Add nftables notrack for localhost traffic

  - Removed. License is now included in the main project.

net/https-dns-proxy/Makefile:
  - Bumped PKG_RELEASE to 5.

net/https-dns-proxy/files/etc/config/https-dns-proxy:
  - Added 'option notrack_dns '1'' to the default configuration.

net/https-dns-proxy/files/etc/init.d/https-dns-proxy:
  - Defined NOTRACK_NFT_FILE constant.
  - Added 'notrack_dns' and 'notrack_ports' variables.
  - Implemented 'notrack_nft' function to manage nftables rules for notracking local DNS traffic.
  - Enabled loading of 'notrack_dns' boolean from configuration.
  - Modified start_instance to collect listen_port into notrack_ports if notrack_dns is enabled.
  - Modified start_service to call notrack_nft update/remove based on notrack_dns and collected ports.
  - Modified stop_service to call notrack_nft remove.
  - Updated service_started and service_stopped to trigger firewall config changes when notrack_dns is enabled.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit fa4b35ad53)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-04-27 10:07:56 -07:00
Stan Grishin a57fbe29f0 https-dns-proxy: update to 2025.12.29-4
* add explicit LICENSE file to the repository
* pretty up Makefile
* minor shell script styling improvements
* better parsing if individual dnsmasq instances are used in config
* functional test

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit eea712197e)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-03-03 17:43:36 -08:00
Stan Grishin fe1e1d8bf1 https-dns-proxy: update to 2025-12-29-1
* bump binary to 2025.12.29 with support for -S
* update README and delete README in files/
* bugfix: properly load global option for `force_ipv6_resolvers`
* add global and per-instance `source_addr` option

Thanks to @karl82 for adding source_addr support upstream.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit c7eb47657e)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-01-08 20:29:30 -08:00
Stan Grishin 63203845bd https-dns-proxy: bugfix: remove IPKG_INSTROOT check
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 8301996f67)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2025-10-10 17:41:26 -07:00
Stan Grishin 436c73d459 https-dns-proxy: update to 2025.10.07-r1
Makefile:
* update to latest upstream: https://github.com/aarond10/https_dns_proxy/commit/7b27ecd5598d03bbe79651cc80efca886d433cd9
* update version, release
* drop CONFIGURE_ARGS as the build is curl-independent
* update the link to the documentation

README:
* add small README with the link to documentation

Config:
* rename procd_fw_src_interfaces to force_dns_src_interface to better reflect meaning
* add heartbeat_domain, heartbeat_sleep_timeout, heartbeat_wait_timeout options
* add default user, group and listen_addr options to the main config
* drop the user, group and listen_addr options from the instance configs

Init-script:
* start much earlier so that on boot, the procd_add_raw_trigger works on all systems
* create a ubus() helper function so that service delete does not produce "Command not found"
* new options handling where the global config options can be used for instance options
* some renaming of global/instance variables due to abovementioned redesign
* new open port detection, no longer relying on netstat
* new uci_changes() logic where it returns 0 or 1 instead of text
* new append_parm logic for not adding default value options to CLI
* new boolean options handling logic
* move config loading to load_package_config() function
* new logic for calling procd_set_config_changed firewall based solely on "$force_dns"
* source network.sh based on "${IPKG_INSTROOT}" path
* rename procd_fw_src_interfaces to force_dns_src_interface to better reflect meaning
* rename use_http1 to force_http1
* rename use_ipv6_resolvers_only to force_ipv6_resolvers

Uci-defaults:
* migrate to new option names

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit e1cf4ac52e)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2025-10-09 11:26:40 -07:00
Stan Grishin 8ffcb98c0c https-dns-proxy: bugfix: start on boot
* bugfix: working start on boot when interfaces are up
  (thanks @tmcqueen-materials and @b1ackbeat)
* improvement: better output when setting triggers on start

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2025-02-12 16:21:38 -08:00
Stan Grishin f624dfa5a3 https-dns-proxy: bugfixes and improvements
* improvement: Makefile: prepend `r` to PKG_RELEASE in binary and init script versions to match package version
* bugfix: init script: more reliable/robust start on boot
* improvement: init script: more compact output()
* improvement: init script: better DNS Hijack login
* improvement: init script: fold some dnsmasq-related functions into dhcp_backup()

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2025-01-29 11:07:47 -08:00
Stan Grishin 9e600ac071 https-dns-proxy: update to 2023.12.26-1
Makefile:
* update to latest upstream version
* remove PKG_SOURCE_DATE/PKG_SOURCE_RELEASE as they are no longer needed
* set TARGET_CFLAGS/TARGET_LDFLAGS
* update CMAKE_OPTIONS
* add CONFIGURE_ARGS to prepare for building with HTTP/3
* update package URL to upstream repo instead of documentation
* update package/description
* add README.md with link to documentation

init-script:
* do not run within image builder
* add a line which can be uncommented to remove outdated doh_server entries

020-src-options.c-add-version.patch:
* remove it, as it's no longer needed with version set in CMAKE_OPTIONS

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2024-08-02 01:10:00 +00:00
Stan Grishin b8a8c480fc https-dns-proxy: prepare migration to APK
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2024-03-24 13:05:05 +00:00
Stan Grishin bd501dd89c https-dns-proxy: update to upstream 2023-11-19
* update to upstream 2023-11-19
  (changes: https://github.com/aarond10/https_dns_proxy/commit/489c57efd46983e688579974a2ab7aeaa7df8d83)
* bugfix: include resolveip dependency in Makefile
  (fixes https://github.com/openwrt/packages/issues/23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2024-03-02 00:19:58 +00:00
Stan Grishin 8b6635bae9 https-dns-proxy: only restart firewall when needed
* only restart firewall when needed

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-12-11 13:18:36 +00:00
Stan Grishin 2e9f6c4446 https-dns-proxy: fix unintentional call of service_stopped in boot()
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-11-24 16:11:57 +00:00
Stan Grishin f519b68401 https-dns-proxy: bugfix: prevent erros from boot()
* fixes https://github.com/openwrt/packages/issues/22674
* rename resolver_health_check to is_resolver_running for readability
* reorder functions in the init file by name

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-11-23 22:39:40 +00:00
Stan Grishin 5dd08fe23f https-dns-proxy: bugfix: prevent crashes on IPv6 systems
* update service triggers so that procd_add_raw_trigger is only
  executed on boot and not on other service actions
* remove outdated iface hotplug script

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-10-24 02:14:54 +00:00
Stan Grishin 38c026250f https-dns-proxy: bugfix: logging crashing instances on ath79
* finally fixes https://github.com/openwrt/packages/issues/19366
* simplify service_triggers
* improve output for dnsmasq restart
* improve grep/sed dependencies
* remove interface hotplug

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-10-17 09:46:19 +00:00
Stan Grishin 9a2c5ae18c https-dns-proxy: fix dns resolution not working on boot
* fix dns resolution not working on boot
* add hotplug-online script
* reorganizes files/ and Makefile to reflect files destinations

Signed-off-by: Stan Grishin <stangri@melmac.ca>
2023-09-03 20:35:22 +00:00