Skip to content

Update okhttp to v5.5.0 - #3682

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/okhttp
Open

Update okhttp to v5.5.0#3682
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/okhttp

Conversation

@renovate

@renovate renovate Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
com.squareup.okhttp3:mockwebserver (source) 5.4.05.5.0 age confidence
com.squareup.okhttp3:okhttp (source) 5.4.05.5.0 age confidence
com.squareup.okhttp3:okhttp-bom (source) 5.4.05.5.0 age confidence

Release Notes

lysine-dev/okhttp (com.squareup.okhttp3:mockwebserver)

v5.5.0

2026-08-16

This release introduces opt-in support for [Encrypted Client Hello (ECH)]. This new feature
improves user privacy by encrypting domain names in transit. With regular TLS, your coffee shop’s
Wi-Fi router can see that you’re visiting wikipedia.com, but it cannot see which page you’re
looking at. With ECH, the router observes only the IP address. This additional privacy is most
effective on sites hosted by big CDNs because the IP address doesn’t imply a particular website.

This requires ECH support in the platform’s TLS stack. Today this is only Android 17 (API 37,
released June 2026). When other TLS stacks add ECH support, we'll integrate them.

ECH took a lot of work to implement because the encryption keys are published over DNS in the
[HTTPS resource record], and we needed to write new code to fetch these records. This release
includes a major update to OkHttp’s DNS API: it now supports multiple resource record types (not
just IP addresses!), asynchronous streaming results, and in-memory caching.

To opt in, you can use DnsOverHttps:

// DnsOverHttps itself uses OkHttpClient. Build both clients upon the
// same bootstrap client so they share a connection pool and dispatcher.
val bootstrapClient = OkHttpClient()

// This sample uses Cloudflare's 1.1.1.1 DnsOverHttps service.
val client = bootstrapClient.newBuilder()
  .dns(DnsOverHttps.Builder()
    .client(bootstrapClient)
    .url("https://1.1.1.1/dns-query".toHttpUrl())
    .build())
  .build()

You could also opt in with our new AndroidDns API. Unfortunately, the privacy benefits of ECH are
deficient because its DNS queries are not encrypted by default.

// AndroidDns fetches the HTTPS DNS resource records necessary for ECH.
val client = OkHttpClient.Builder()
  .dns(AndroidDns())
  .build()
  • New: OkHttp artifacts is now signed with our [new signing key]. This project and three sibling
    projects ([Retrofit], [Okio], and [SQLDelight]) recently joined [the Commonhaus Foundation].
  • Fix: MockWebServer’s @StartStop annotation now supports @Nested JUnit 5 tests.
  • Fix: Our default TLS hostname verifier now reject hosts that fail IP canonicalization.
  • Fix: Closing a multipart part's sink no longer closes the entire request body.
  • Fix: Flush HTTP/1 request bodies before detaching the timeout. We had a bug where timeouts
    weren’t applied correctly.
  • Fix: Follow [RFC 1008]'s requirements for HTTP QUERY redirects.
  • Fix: Fall back to no proxy when the system proxy selector throws. Previously this would cause
    the HTTP call to crash.
  • Upgrade: [Okio 3.18.1][okio_3_18_1].

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@square-task-list-completed

Copy link
Copy Markdown

Task List Completed has been disabled for this PR, either by the disabled label or repo topic

Remaining tasks

Why am I seeing this comment?

This comment is a summary of the pending tasks on this PR. It is intended to make it easier to find pending tasks so you can ship your PR faster.

Got feedback? Let us know in #dx-help!

Want to disable me? Add task-list-completed-disable as a repo topic or PR label to disable on a whole PR, or write task-list-completed-disable in a comment to disable it for that comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants