Skip to content

feat(dns): add custom DNS server support#196

Merged
vnepogodin merged 3 commits intoCachyOS:developfrom
awlx:feature/custom-dns-server
Mar 28, 2026
Merged

feat(dns): add custom DNS server support#196
vnepogodin merged 3 commits intoCachyOS:developfrom
awlx:feature/custom-dns-server

Conversation

@awlx
Copy link
Copy Markdown
Contributor

@awlx awlx commented Mar 23, 2026

Adds a "Custom" option to the DNS server selection, allowing users to enter their own DNS server addresses and DoT hostname. This addresses use cases like NextDNS, Pi-hole, or any other custom resolver that isn't in the preset list.

What changed

Custom DNS server entry

  • Added a "Custom" option at the bottom of the DNS server dropdown
  • When selected, shows input fields for IPv4 addresses, IPv6 addresses, and DoT hostname
  • Input validation ensures at least one address is provided and the DoT hostname is RFC-compliant
  • Custom entries are fully persisted by NetworkManager using the native address#hostname notation (e.g. 45.90.28.220#xxxx.dns.nextdns.io)
  • On restart, custom DNS settings are read back and all fields are correctly pre-filled

CLI support

  • Added dns set-custom subcommand: cachyos-hello dns set-custom -c "Starlink" --ipv4 "45.90.28.220" --dot --dot-hostname "xxxx.dns.nextdns.io"
  • Existing dns set also passes DoT hostname for preset servers now

i18n

  • Added custom DNS strings to all 31 locales
Screenshot From 2026-03-23 08-06-17

Testing

Tested on CachyOS with NetworkManager 1.52 and systemd-resolved:

  • cachyos-hello dns set -c "Starlink" -s cloudflare --dot — verified resolvectl shows 1.1.1.1#cloudflare-dns.com
  • cachyos-hello dns set-custom -c "Starlink" --ipv4 "45.90.28.220" --dot --dot-hostname "xxxx.dns.nextdns.io" — custom DNS works from CLI
  • GUI: select Custom, enter NextDNS addresses + hostname, apply — persists across restart
  • Invalid DoT hostname shows error dialog
  • Reset clears everything back to DHCP

Closes #144

Add a 'Custom' option to the DNS server dropdown allowing users to
specify their own DNS server addresses and DoT hostname, addressing
use cases like NextDNS or other custom resolvers.

Changes:
- Add 'Custom' entry to DNS server combo box with IPv4, IPv6, and
  DoT hostname input fields
- Use NetworkManager's native 'address#hostname' notation to persist
  DoT hostnames across restarts
- Read back DoT state and hostname from NM on startup
- Add SNI hostname validation (RFC-compliant DNS labels)
- Add 'set-custom' CLI subcommand for custom DNS from command line
- Fix preset servers to include DoT hostname in addr#hostname format
- Add i18n strings for custom DNS to all 31 locales

Closes: CachyOS#144
@awlx awlx force-pushed the feature/custom-dns-server branch from 6b0bd68 to 008e256 Compare March 23, 2026 07:46
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 25, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
Copy link
Copy Markdown
Member

@vnepogodin vnepogodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

Comment thread i18n/zh-CN/cachyos_hello.ftl Outdated
The fallback mechanism automatically serves English when a translation
string is missing, so copying English strings to other locales is
unnecessary.
@awlx
Copy link
Copy Markdown
Contributor Author

awlx commented Mar 28, 2026

Removed the translation strings as discussed in #200

awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 28, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
@awlx awlx requested a review from vnepogodin March 28, 2026 05:50
awlx added a commit to awlx/CachyOS-Welcome that referenced this pull request Mar 28, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of CachyOS#196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: CachyOS#156, CachyOS#144
Copy link
Copy Markdown
Member

@vnepogodin vnepogodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks

@vnepogodin vnepogodin merged commit 5d7c48d into CachyOS:develop Mar 28, 2026
1 check failed
vnepogodin pushed a commit that referenced this pull request Mar 28, 2026
Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of #196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: #156, #144
vnepogodin pushed a commit that referenced this pull request Mar 28, 2026
* feat(dns): add custom DNS server support

Add a 'Custom' option to the DNS server dropdown allowing users to
specify their own DNS server addresses and DoT hostname, addressing
use cases like NextDNS or other custom resolvers.

Changes:
- Add 'Custom' entry to DNS server combo box with IPv4, IPv6, and
  DoT hostname input fields
- Use NetworkManager's native 'address#hostname' notation to persist
  DoT hostnames across restarts
- Read back DoT state and hostname from NM on startup
- Add SNI hostname validation (RFC-compliant DNS labels)
- Add 'set-custom' CLI subcommand for custom DNS from command line
- Fix preset servers to include DoT hostname in addr#hostname format
- Add i18n strings for custom DNS to all 31 locales

Closes: #144

* fix(i18n): remove untranslated English strings from non-English locales

The fallback mechanism automatically serves English when a translation
string is missing, so copying English strings to other locales is
unnecessary.

* fix(i18n): remove empty Custom DNS stubs from non-English locales

* feat(dns): add DNS over HTTPS (DoH) support via blocky

Add DoH support to the DNS settings page using blocky as a local DNS proxy.
When DoH is enabled, blocky is installed (blocky-bin from AUR), configured
with the selected server's DoH URL, and started as a systemd service.
NetworkManager is pointed to 127.0.0.1 for resolution.

Changes:
- Add DoH URL map for 14 DNS servers that support DNS over HTTPS
- Add blocky config generation with DoT-encrypted bootstrap DNS when the
  server supports it, falling back to plaintext IPs otherwise
- Add DoH checkbox to DNS settings GUI (mutually exclusive with DoT)
- Add --doh flag to 'dns set' CLI subcommand (conflicts_with dot)
- Add --doh and --doh-url flags to 'dns set-custom' for custom DoH
  servers, using the custom IPv4/IPv6 addresses and DoT hostname for
  bootstrap resolution
- Add DoH URL input field to the custom DNS server form
- Auto-install blocky-bin via paru with pkexec for GUI password prompt
- Stop and disable blocky on DNS reset or when switching to DoT/plain
- Show DoH support in 'dns list-servers' output
- Add i18n strings for DoH to all 31 locales

Built on top of #196 (custom DNS server support).

Note: DNS over QUIC (DoQ) can be added once blocky ships with
0xERR0R/blocky#2013 (DoQ upstream support)

Addresses: #156, #144

* fix: address PR review comments

- Remove untranslated English strings from all non-English i18n files;
  the fallback mechanism serves English automatically
- Use install_needed_packages for blocky installation in change_dns_server_doh
- Use utils::get_tweak_toggle_cmd in stop_blocky (consistent with install_winboat)
- Fix read_active_doh_url to strip YAML quotes so preset server detection works

* feat(dns): set CachyOS userAgent in blocky config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DNS selection improvements

2 participants