Skip to content

Conversation

@encodeous
Copy link
Owner

No description provided.

Copy link

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 adds support for manually configuring a custom DNS resolver in Nylon. When configured, the application will use the specified DNS server (in ip:port format) for its own DNS queries instead of relying on the system's default resolver.

Key changes:

  • Added DnsResolver configuration field to LocalCfg struct
  • Implemented validation to ensure DNS resolver is specified in valid ip:port format
  • Custom DNS resolver is set via net.DefaultResolver during Nylon initialization

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
state/config.go Added DnsResolver string field to LocalCfg struct
state/validation.go Added validation logic to ensure DnsResolver is a valid ip:port address using netip.ParseAddrPort
state/validation_test.go Added test cases verifying the validation of DNS resolver values (valid IPv4:port, invalid hostname, hostname:port, and IP without port)
example/sample-node.yaml Added documentation comment explaining the dnsresolver configuration option with example value
core/nylon.go Implemented custom DNS resolver by configuring net.DefaultResolver with a custom dialer when DnsResolver is set

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Repository owner deleted a comment from Copilot AI Nov 15, 2025
@encodeous encodeous merged commit b30c2f7 into main Nov 15, 2025
1 check passed
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