A specialized deployment of DNSCrypt-proxy optimized for the Alta Labs Route10 router environment.
- Storage Optimized (UPX): Uses high-ratio compression to reduce the binary footprint from ~15MB to ~5MB, preserving space on the limited 25MB
/cfgpartition. - Persistent /cfg Integration: Fully self-contained in
/cfg/dnscrypt-proxyto ensure the installation survives system reboots and firmware updates. - Dynamic Configuration Overrides: Core configuration files
setup.tomlanddnscrypt-proxy.tomlsupportsetup-custom.tomlanddnscrypt-proxy-custom.tomlto override values. - Automated Boot Integration: Automatically injects a startup hook into
/cfg/post-cfg.shto manage the service lifecycle across reboots. - Robust DNS Cutover:
start.shhandles the complex handoff betweendnsmasqand DNSCrypt, ensuring a switch only after an upstream connection is verified. - Flexible DNS Filtering: Supports dynamic DNS filtering. Multiple URL sources (Hagezi, etc.) can be configured. These are merged into a single blocklist file.
- Automated Filter Updates: A dedicated
update-filters.shscript installs acrontabentry to refresh and reload filters daily (defaults to 4:00 AM). - Configurable Auto-Updater: Supports manual update checks and optional cron-driven release checks via
proxy.sh updater. Auto-update scheduling is controlled bysettings.enable_auto_update(0by default) andsettings.updater_check_croninconf/setup.toml.
Configuration files now live under conf/.
- Deploy: Copy all files to
/cfg/dnscrypt-proxy/. - Permissions:
chmod 700 /cfg/dnscrypt-proxy/*.sh /cfg/dnscrypt-proxy/scripts/*.sh - Install: Run
/cfg/dnscrypt-proxy/setup.sh.- This installs the binary and adds a commented boot hook to
/cfg/post-cfg.sh.
- This installs the binary and adds a commented boot hook to
- Start: Run
/cfg/dnscrypt-proxy/proxy.sh start.
https-dns-proxyhandoff:start.shassumes DNSCrypt becomes the active upstream resolver. After DNSCrypt is verified, the script stops thehttps-dns-proxyservice.dnsmasqupstream cutover:start.shrewrites thednsmasqupstream configuration so the router uses only127.0.0.1#5059.- WAN DNS disabled via
noresolv=1: the script setsdhcp.@dnsmasq[0].noresolv='1', preventing parallel resolution through ISP/WAN-provided servers. - Rollback behavior: if DNSCrypt cannot be validated, the script automatically restores the previous
dnsmasqconfiguration to prevent internet loss.
| Base File | Override File | Purpose |
|---|---|---|
conf/setup.toml |
conf/setup-custom.toml |
Versions, update schedule, blocklist sources, and storage paths. |
conf/dnscrypt-proxy.toml |
conf/dnscrypt-proxy-custom.toml |
Standard dnscrypt-proxy settings. |
Both main scripts support a -f (force) flag for specific maintenance tasks:
- Action: Force Restart.
- Behavior: Kills any existing
dnscrypt-proxyprocesses, rebuilds the temporary runtime configuration from scratch (merging all active overrides), and performs a full service validation anddnsmasqcutover check. - Use Case: Use this after making changes to any
.tomlfile to ensure they are applied immediately.
- Action: Force Filter Refresh.
- Behavior: Bypasses the default 12-hour staleness check and immediately downloads fresh blocklists from the configured sources. It then signals
dnscrypt-proxy(viaSIGHUP) to reload the new filters. - Use Case: Use this if you want to update your blocklists immediately without waiting for the next scheduled cron job.
- Action: Check for a newer GitHub release.
- Behavior: Compares the installed version with the latest published release tag. If a newer version exists, the updater downloads the release archive, preserves local custom configuration files, reruns
setup.sh --non-interactive --keep-binary, and restarts the service. - Use Case: Use this for a normal manual update check or to verify that auto-update would succeed.
- Action: Force an update cycle.
- Behavior: Runs the same archive download and install path even if the current version already matches the latest release.
- Use Case: Use this to repair an install, reapply the latest packaged scripts, or validate the updater path.
- Manual update command:
/cfg/dnscrypt-proxy/proxy.sh updater check
- Auto-update cron command:
/bin/ash /cfg/dnscrypt-proxy/proxy.sh updater check >/dev/null 2>&1
- Auto-update only runs when
settings.enable_auto_update=1inconf/setup.tomlorconf/setup-custom.toml. - Updater logs are written to:
/var/log/dnscrypt-proxy-updater.log
- After updates, shell entrypoints are rechecked and execute permissions are repaired automatically if needed.
- Service Status:
ps w | grep [d]nscrypt-proxy - Logs:
/var/log/dnscrypt-proxy.log - Updater Logs:
/var/log/dnscrypt-proxy-updater.log