-
Notifications
You must be signed in to change notification settings - Fork 264
Server Side internal DoT/DoH opt out #5577
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8df37b0
allow nym-api and nym-node to use http-api-client without hickory
jmwample a612135
fmt, clippy, and wasm
jmwample 1caeba2
add exception for ECashApiClient which uses http_api_client underneath
jmwample 0a2a061
add exceptions to Clients in nym-node-status-api
jmwample 710e6e3
add exceptions to Clients in nym-node-status-api
jmwample 8aa879d
url builder handling
jmwample f15f78b
missed one client in node status api
jmwample 16c403e
revert change to http client shared more broadly that initially expected
jmwample 58a789d
add comments about hickory h2 EoF error
jmwample 8bce384
doc test passing -_-
jmwample File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| // Copyright 2023 - Nym Technologies SA <[email protected]> | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| //! DNS resolver configuration for internal lookups. | ||
| //! | ||
| //! The resolver itself is the set combination of the google, cloudflare, and quad9 endpoints | ||
|
|
@@ -9,6 +12,19 @@ | |
| //! | ||
| //! Requires the `dns-over-https-rustls`, `webpki-roots` feature for the | ||
| //! `hickory-resolver` crate | ||
| //! | ||
| //! | ||
| //! Note: The hickory DoH resolver can cause warning logs about H2 connection failure. This | ||
| //! indicates that the long lived https connection was closed by the remote peer and the resolver | ||
| //! will have to reconnect. It should not impact actual functionality. | ||
| //! | ||
| //! code ref: https://github.com/hickory-dns/hickory-dns/blob/06a8b1ce9bd9322d8e6accf857d30257e1274427/crates/proto/src/h2/h2_client_stream.rs#L534 | ||
| //! | ||
| //! example log: | ||
| //! | ||
| //! ```txt | ||
| //! WARN /home/ubuntu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hickory-proto-0.24.3/src/h2/h2_client_stream.rs:493: h2 connection failed: unexpected end of file | ||
| //! ``` | ||
| #![deny(missing_docs)] | ||
|
|
||
| use crate::ClientBuilder; | ||
|
|
@@ -33,6 +49,13 @@ impl ClientBuilder { | |
| /// Override the DNS resolver implementation used by the underlying http client. | ||
| pub fn dns_resolver<R: Resolve + 'static>(mut self, resolver: Arc<R>) -> Self { | ||
| self.reqwest_client_builder = self.reqwest_client_builder.dns_resolver(resolver); | ||
| self.use_secure_dns = false; | ||
| self | ||
| } | ||
|
|
||
| /// Override the DNS resolver implementation used by the underlying http client. | ||
| pub fn no_hickory_dns(mut self) -> Self { | ||
| self.use_secure_dns = false; | ||
| self | ||
| } | ||
| } | ||
|
|
||
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| // Copyright 2024 - Nym Technologies SA <[email protected]> | ||
| // SPDX-License-Identifier: GPL-3.0-only | ||
|
|
||
| use nym_http_api_client::HttpClientError; | ||
| use std::io; | ||
| use std::net::SocketAddr; | ||
| use thiserror::Error; | ||
|
|
@@ -24,4 +25,10 @@ pub enum NymNodeHttpError { | |
| #[from] | ||
| source: nym_crypto::asymmetric::encryption::KeyRecoveryError, | ||
| }, | ||
|
|
||
| #[error("error building or using HTTP client: {source}")] | ||
| ClientError { | ||
| #[from] | ||
| source: HttpClientError, | ||
| }, | ||
| } | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.