Re-add DoH support to gRPC transport#1776
Conversation
- Implement `HickoryResolverServiceHyper1` in `dns_resolver.rs` to support `tower::Service` as required by `hyper-util` 0.1. - Integrate the new DoH resolver into `grpc.rs`. - Add unit tests for the new Hyper 1.x DoH components. - Ensure compatibility with existing `hyper_legacy` (hyper 0.14) based transports. Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Implement `HickoryResolverServiceHyper1` in `dns_resolver.rs` to support `tower::Service` as required by `hyper-util` 0.1. - Integrate the new DoH resolver into `grpc.rs`. - Fix HTTPS support in gRPC transport by wrapping the connector in `hyper-rustls` `HttpsConnector`, which is necessary when using custom connectors with `tonic` 0.14 and HTTPS URIs. - Explicitly configure `rustls` with the `ring` crypto provider to avoid ambiguity and ensure compatibility with other crates in the workspace. - Update `Cargo.toml` with `hyper-rustls` and `rustls` dependencies. Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Implement `HickoryResolverServiceHyper1` in `dns_resolver.rs` to support `tower::Service` as required by `hyper-util` 0.1 (Hyper 1.x). - Integrate the new DoH resolver into `grpc.rs`. - Implement `ForceHttpsConnector` workaround in `grpc.rs` to bypass `tonic` 0.14's strict scheme check for `https://` URIs when using custom connectors. - Explicitly configure `rustls` with the `ring` crypto provider to ensure a default provider is available. - Update `Cargo.toml` with `hyper-rustls`, `rustls`, and necessary features. - Restore unit tests for DoH and add verification for Hyper 1.x components. Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
* Update tonic to v0.14.3 and migrate to tonic-prost-build This commit updates the tonic gRPC framework to the latest version (0.14.3) and migrates the build system to use tonic-prost-build, which is required for the new API. ## Key Changes ### Dependency Updates - Migrated from `tonic-build` to `tonic-prost-build` v0.14.3 - Updated hyper proxy support: - gRPC transport: hyper-http-proxy 1.1.0 (hyper 1.x compatible) - HTTP/1.1 transport: hyper-proxy 0.9.1 as hyper-proxy-legacy (hyper 0.14) - Added supporting dependencies: http, tower, hyper-util, http-body-util ### API Migrations - **build.rs**: Replaced `tonic_build::configure()` with `tonic_prost_build::configure()` and `.compile()` with `.compile_protos()` - **grpc.rs**: Updated to use hyper-http-proxy for hyper 1.x compatibility - **http.rs**: Migrated to hyper_legacy namespace to maintain hyper 0.14 for HTTP/1.1 - **dns_resolver.rs**: Updated DNS-over-HTTPS resolver to use hyper_legacy types ### Code Quality - Fixed unused import warnings - Fixed unnecessary mut warning in dns.rs - Regenerated all proto files with new tonic-prost-build ## Testing - 78/79 tests passing - 1 pre-existing test failure in pb::config unrelated to tonic upgrade - Workspace compiles cleanly with cargo check ## Notes - HTTP/1.1 transport continues using hyper 0.14 for stability - gRPC transport now uses hyper 1.x via tonic 0.14.3 - DOH support temporarily disabled for gRPC pending hyper 1.x DNS resolver Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> * del dead code * Re-add DoH support to gRPC transport (#1776) * Re-add DoH support to the grpc.rs transport - Implement `HickoryResolverServiceHyper1` in `dns_resolver.rs` to support `tower::Service` as required by `hyper-util` 0.1. - Integrate the new DoH resolver into `grpc.rs`. - Add unit tests for the new Hyper 1.x DoH components. - Ensure compatibility with existing `hyper_legacy` (hyper 0.14) based transports. Co-authored-by: hulto <7121375+hulto@users.noreply.github.com> * Re-add DoH support to the grpc.rs transport and fix HTTPS support - Implement `HickoryResolverServiceHyper1` in `dns_resolver.rs` to support `tower::Service` as required by `hyper-util` 0.1. - Integrate the new DoH resolver into `grpc.rs`. - Fix HTTPS support in gRPC transport by wrapping the connector in `hyper-rustls` `HttpsConnector`, which is necessary when using custom connectors with `tonic` 0.14 and HTTPS URIs. - Explicitly configure `rustls` with the `ring` crypto provider to avoid ambiguity and ensure compatibility with other crates in the workspace. - Update `Cargo.toml` with `hyper-rustls` and `rustls` dependencies. Co-authored-by: hulto <7121375+hulto@users.noreply.github.com> * Re-add DoH support to the grpc.rs transport and fix HTTPS support - Implement `HickoryResolverServiceHyper1` in `dns_resolver.rs` to support `tower::Service` as required by `hyper-util` 0.1 (Hyper 1.x). - Integrate the new DoH resolver into `grpc.rs`. - Implement `ForceHttpsConnector` workaround in `grpc.rs` to bypass `tonic` 0.14's strict scheme check for `https://` URIs when using custom connectors. - Explicitly configure `rustls` with the `ring` crypto provider to ensure a default provider is available. - Update `Cargo.toml` with `hyper-rustls`, `rustls`, and necessary features. - Restore unit tests for DoH and add verification for Hyper 1.x components. Co-authored-by: hulto <7121375+hulto@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * fmt * safely default to cloudflare * Update crate * Disable cert checking (#1779) * Disable cert checking * fix http1 callback URI * Refactor ignore certs --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Happy <yesreply@happy.engineering> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: KCarretto <Kcarretto@gmail.com>
Re-added DNS-over-HTTPS (DoH) support to the gRPC transport. This was previously disabled due to the migration to Hyper 1.x. The implementation includes a new
HickoryResolverServiceHyper1struct that bridgeshickory-resolverwith thetower::Servicetrait used byhyper-util's legacy connector. The gRPC transport now extracts thedohprovider from the configuration metadata and initializes the appropriate connector. Unit tests have been added to verify the new components.PR created automatically by Jules for task 10726710501313335308 started by @hulto