-
Notifications
You must be signed in to change notification settings - Fork 659
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
examples: ech-client should process all HTTPS records #2278
Conversation
I haven't added this host/config to the daily-test CI job. Perhaps I should? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2278 +/- ##
=======================================
Coverage 94.82% 94.82%
=======================================
Files 104 104
Lines 24102 24102
=======================================
Hits 22855 22855
Misses 1247 1247 ☔ View full report in Codecov by Sentry. |
0816561
to
cb01d9f
Compare
cb01d9f
to
c85c70e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that was a lot easier to review!
Benchmark resultsInstruction countsSignificant differencesThere are no significant instruction count differences Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
df2f66e
to
5e0fc07
Compare
This allows us to remove a bunch of `unwrap()`'s from `main()`, simplifying the code.
Move the `resolver_config` into the match arm that uses it. Inline the `Resolver` since it isn't used anywhere except as an arg to `lookup_ech_configs()`.
Previously we only looked at the first HTTPS record's ech-config SCVB param. We should instead collect up the `EchConfigListBytes` from all available HTTPS records. With the list of config lists in hand we should only error if none of the ECH configs across the whole set are compatible.
This updates the documentation to match the more realistic invocation being used in the CI daily-tests.yml job. It also adds a bit more prose to clarify the overall process and where the outer/inner hostnames are used.
5e0fc07
to
84b882f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
(Do we need to sync tests/ech_fetch.rs
in rustls-ffi? I guess probably not with any urgency given it is just test infra...)
Yeah, the |
Previously in the
ech-client.rs
example we only pulledEchConfigListBytes
from the first HTTPS recordech-config
SVC param we found when performing a DNS-over-HTTPS lookup using HickoryDNS.Instead we should process all of the HTTPS records, collect up all of the
EchConfigListBytes
from each we can, and then use the first compatible ECH config from all of the available lists.As reported in #2276 you could observe this causing issues when running:
Before this change, the client would panic approximately 50% of the time after finding no supported ECH configs from the list in the first HTTPS record. The ECH configs in the other records were not examined.
With this change the client acts as expected and successfully negotiates ECH with the server after finding a good config from the whole set.
Along the way I tried to reduce some of the combinator-soup in favour of simpler logic.
Resolves #2276