Skip to content

feat(dns): add DHCP automatic indicator and reset-to-DHCP#206

Open
awlx wants to merge 1 commit intoCachyOS:developfrom
awlx:feat/dhcp-automatic
Open

feat(dns): add DHCP automatic indicator and reset-to-DHCP#206
awlx wants to merge 1 commit intoCachyOS:developfrom
awlx:feat/dhcp-automatic

Conversation

@awlx
Copy link
Copy Markdown
Contributor

@awlx awlx commented Mar 29, 2026

Follow-up to #200 (DoH support) as discussed.

What changed

DHCP (automatic) indicator

  • Added a "DHCP (automatic)" entry at the bottom of the DNS server dropdown
  • When no DNS servers are manually configured, "DHCP (automatic)" is shown as selected9; making it clear to the user that DHCP-provided DNS is in use
  • Previously, the dropdown would misleadingly show "Cloudflare" as a fallback even when no custom DNS was set

Reset behavior

  • Selecting "DHCP (automatic)" and clicking Apply resets DNS to automatic (same behavior as the Reset button)
  • Pressing Reset now jumps the dropdown to "DHCP (automatic)" and unchecks DoT/DoH checkboxes for visual consistency
  • DoT/DoH checkboxes and latency test buttons are disabled when DHCP is selected (no server to configure)

i18n

  • Added dhcp-automatic string to en locale
image

Testing

  • Start with no DNS configured → dropdown shows "DHCP (automatic)" ✓
  • Set Cloudflare DoH → dropdown shows "Cloudflare" with DoH checked ✓
  • Click Reset → dropdown jumps to "DHCP (automatic)", checkboxes unchecked ✓
  • Select "DHCP (automatic)" + Apply → DNS reset to DHCP ✓
  • Switch connections → dropdown updates correctly ✓

Add a 'DHCP (automatic)' entry to the DNS server dropdown so users can
clearly see when no custom DNS is configured. Selecting it and clicking
Apply resets DNS to automatic (same as the Reset button).

Changes:
- Add 'DHCP (automatic)' as the last entry in the DNS server combo box
- Show it as selected when no DNS servers are manually configured
- Clicking Apply with DHCP selected calls reset_dns_server()
- Reset button now jumps the combo to 'DHCP (automatic)' and unchecks
  DoT/DoH
- Disable DoT/DoH checkboxes and latency buttons when DHCP is selected
- Add dhcp-automatic i18n string to en locale

Follow-up to CachyOS#200 (DoH support) as discussed.
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.

1 participant