Skip to content

Start including ECH data in RouteSelector results#9557

Merged
swankjesse merged 5 commits into
masterfrom
jwilson.0717.ech_selected
Jul 17, 2026
Merged

Start including ECH data in RouteSelector results#9557
swankjesse merged 5 commits into
masterfrom
jwilson.0717.ech_selected

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

This changes RouteSelector to use our new async API, when it is implemented.

Comment thread okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/dns/-ExecuteDns.kt Outdated
records
.filterIsInstance<Dns.Record.IpAddress>()
.map { record ->
val serviceMetadata = hostnameToServiceMetadata[record.hostname]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? if the DNS record is pointing to multiple backend DNS Servers?

;; Multiple HTTPS records for the same domain
example.com.  3600  IN  HTTPS  1 server1.anking.com. alpn="h2,h3"
example.com.  3600  IN  HTTPS  2 server2.anking.com. alpn="h2,h3"

Is that possible?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got it. And now that I’m staring at it, I also need to handle "" there. Fixed!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I’m hoping to follow up with code in DnsOverHttps that honors ServiceMode and AliasMode, by making recursive calls. It’s a bit like CNAME handling.)

@yschimke yschimke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 question about hostname filtering

Base automatically changed from jwilson.0717.ech_on_route to master July 17, 2026 20:19
@swankjesse
swankjesse force-pushed the jwilson.0717.ech_selected branch from 3349935 to 77babd6 Compare July 17, 2026 20:30
CompletableFuture isn't available until Android API 24
@swankjesse
swankjesse merged commit 20fcded into master Jul 17, 2026
26 checks passed
@swankjesse
swankjesse deleted the jwilson.0717.ech_selected branch July 17, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants