Skip to content

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

Open
awlx wants to merge 1 commit intoCachyOS:developfrom
awlx:feature/custom-dns-server
Open

feat(dns): add custom DNS server support#196
awlx wants to merge 1 commit intoCachyOS:developfrom
awlx:feature/custom-dns-server

Conversation

@awlx
Copy link
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
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

1 participant