Skip to content

[management, client] Add support for punycode domains in nameservers #3868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

bcmmbaga
Copy link
Contributor

@bcmmbaga bcmmbaga commented May 23, 2025

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

bcmmbaga and others added 8 commits May 22, 2025 16:35
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
# Conflicts:
#	management/server/nameserver.go
#	management/server/nameserver_test.go
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
@bcmmbaga bcmmbaga changed the title [management] Add support for punycode domains in nameservers [management, client] Add support for punycode domains in nameservers May 29, 2025
@bcmmbaga bcmmbaga marked this pull request as ready for review May 29, 2025 15:10
@Copilot Copilot AI review requested due to automatic review settings May 29, 2025 15:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the DNS nameserver handling by replacing plain string representations of domain names with strong‐typed domain.Domain values and adds explicit Punycode conversions to standardize domain formats.

  • Replaces string parameters with domain.Domain or domain.List in upstream resolvers, server, and tests
  • Updates functions to use Punycode conversions for consistent domain normalization
  • Refactors related test cases and handler chain implementations to align with new domain types

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated no comments.

Show a summary per file
File Description
client/internal/dns/upstream*.go Updates upstream resolver parameters from string to domain.Domain
client/internal/dns/server*.go Adapts DNS server functions to use domain.Domain and domain.List with appropriate Punycode conversions
client/internal/dns/handler_chain*.go Refactors handler chain pattern matching to use domain.Domain and applies Punycode conversion in comparisons
client/internal/dns/host*.go Converts domain handling within host config functions to domain.Domain with PunycodeString normalization
client/iface/* Changes interface functions to use domain.List for search domains on mobile and non-mobile platforms

Copy link

sonarqubecloud bot commented Jun 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
6.9% Duplication on New Code (required ≤ 5%)

See analysis details on SonarQube Cloud

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