Skip to content

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

Merged
vnepogodin merged 1 commit intoCachyOS:developfrom
awlx:feat/dhcp-automatic
Apr 12, 2026
Merged

feat(dns): add DHCP automatic indicator and reset-to-DHCP#206
vnepogodin merged 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.
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

@vnepogodin vnepogodin merged commit 5e5d044 into CachyOS:develop Apr 12, 2026
1 check failed
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.

2 participants