feat(dns): implement DNS forwarding and resolution with fragmentation…#234
Merged
Conversation
… support - Added `ResolveUpstream` function to handle DNS queries with optional fragmentation. - Introduced `ForwardOptions` struct to configure DNS forwarding behavior. - Implemented fragmented query sending for both IPv4 and IPv6. - Created unit tests for DNS resolution and timeout scenarios. refactor(utils): replace random number generation with cryptographic methods - Replaced custom random number generation with secure random functions in the `utils` package. - Added `RandUint16` and `RandUint32` functions for generating random values. fix(nfq): remove DNS NAT handling - Deleted DNS NAT management code from `nat.go` as it is no longer needed. - Updated DNS packet processing logic to eliminate reliance on NAT entries. test: enhance unit tests for UDP packet building and checksum validation - Added tests for `BuildUDPPacketV4` and `BuildUDPPacketV6` to ensure correct packet structure and checksum calculations. - Implemented tests for random number generation functions to verify randomness and distribution. chore: update changelog for version 1.64.0
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 73 complexity
Metric Results Complexity 73
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



… support
ResolveUpstreamfunction to handle DNS queries with optional fragmentation.ForwardOptionsstruct to configure DNS forwarding behavior.refactor(utils): replace random number generation with cryptographic methods
utilspackage.RandUint16andRandUint32functions for generating random values.fix(nfq): remove DNS NAT handling
nat.goas it is no longer needed.test: enhance unit tests for UDP packet building and checksum validation
BuildUDPPacketV4andBuildUDPPacketV6to ensure correct packet structure and checksum calculations.chore: update changelog for version 1.64.0