Skip to content

Commit a94bdf1

Browse files
committed
Prepare for release 5.5.0.
1 parent ecc3b05 commit a94bdf1

14 files changed

Lines changed: 84 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,63 @@
11
Change Log
22
==========
33

4+
## Version 5.5.0
5+
6+
_2026-08-16_
7+
8+
This release introduces **opt-in** support for [Encrypted Client Hello (ECH)]. This new feature
9+
improves user privacy by encrypting domain names in transit. With regular TLS, your coffee shop’s
10+
Wi-Fi router can see that you’re visiting _wikipedia.com_, but it cannot see which page you’re
11+
looking at. With ECH, the router observes only the IP address. This additional privacy is most
12+
effective on sites hosted by big CDNs because the IP address doesn’t imply a particular website.
13+
14+
This requires ECH support in the platform’s TLS stack. Today this is only Android 17 (API 37,
15+
released June 2026). When other TLS stacks add ECH support, we'll integrate them.
16+
17+
ECH took a lot of work to implement because the encryption keys are published over DNS in the
18+
[HTTPS resource record], and we needed to write new code to fetch these records. This release
19+
includes a major update to OkHttp’s DNS API: it now supports multiple resource record types (not
20+
just IP addresses!), asynchronous streaming results, and in-memory caching.
21+
22+
To opt in, you can use `DnsOverHttps`:
23+
24+
```kotlin
25+
// DnsOverHttps itself uses OkHttpClient. Build both clients upon the
26+
// same bootstrap client so they share a connection pool and dispatcher.
27+
val bootstrapClient = OkHttpClient()
28+
29+
// This sample uses Cloudflare's 1.1.1.1 DnsOverHttps service.
30+
val client = bootstrapClient.newBuilder()
31+
.dns(DnsOverHttps.Builder()
32+
.client(bootstrapClient)
33+
.url("https://1.1.1.1/dns-query".toHttpUrl())
34+
.build())
35+
.build()
36+
```
37+
38+
You could also opt in with our new `AndroidDns` API. Unfortunately, the privacy benefits of ECH are
39+
deficient because its DNS queries are not encrypted by default.
40+
41+
```kotlin
42+
// AndroidDns fetches the HTTPS DNS resource records necessary for ECH.
43+
val client = OkHttpClient.Builder()
44+
.dns(AndroidDns())
45+
.build()
46+
```
47+
48+
* New: OkHttp artifacts is now signed with our [new signing key]. This project and three sibling
49+
projects ([Retrofit], [Okio], and [SQLDelight]) recently joined [the Commonhaus Foundation].
50+
* Fix: MockWebServer’s `@StartStop` annotation now supports `@Nested` JUnit 5 tests.
51+
* Fix: Our default TLS hostname verifier now reject hosts that fail IP canonicalization.
52+
* Fix: Closing a multipart part's sink no longer closes the entire request body.
53+
* Fix: Flush HTTP/1 request bodies before detaching the timeout. We had a bug where timeouts
54+
weren’t applied correctly.
55+
* Fix: Follow [RFC 1008]'s requirements for HTTP QUERY redirects.
56+
* Fix: Fall back to no proxy when the system proxy selector throws. Previously this would cause
57+
the HTTP call to crash.
58+
* Upgrade: [Okio 3.18.1][okio_3_18_1].
59+
60+
461
## Version 5.4.0
562

663
_2026-06-08_
@@ -769,12 +826,16 @@ release is the version name.
769826

770827
See [4.x Change log](https://lysine.dev/okhttp/changelogs/changelog_4x/) for the legacy version changelogs.
771828

829+
[Encrypted Client Hello (ECH)]: https://www.rfc-editor.org/info/rfc9849/
772830
[GraalVM]: https://www.graalvm.org/
773831
[Gradle module metadata]: https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
774-
[HTTP 101]: https://httpwg.org/specs/rfc9110.html#status.101
832+
[HTTP 101]: https://www.rfc-editor.org/info/rfc9110/#section-15.2.2
833+
[HTTPS resource record]: https://www.rfc-editor.org/info/rfc9460/
775834
[JPMS]: https://openjdk.org/projects/jigsaw/spec/
776835
[Ktor]: https://ktor.io/
836+
[Okio]: https://lysine.dev/okio/
777837
[Retrofit]: https://lysine.dev/retrofit/
838+
[SQLDelight]: https://sqldelight.github.io/sqldelight/
778839
[ZSTD-KMP]: https://github.com/square/zstd-kmp
779840
[androidx_startup]: https://developer.android.com/jetpack/androidx/releases/startup
780841
[annotation_1_9_1]: https://developer.android.com/jetpack/androidx/releases/annotation#annotation-1.9.1
@@ -800,6 +861,7 @@ See [4.x Change log](https://lysine.dev/okhttp/changelogs/changelog_4x/) for the
800861
[kotlin_2_2_20]: https://github.com/JetBrains/kotlin/releases/tag/v2.2.20
801862
[kotlin_2_2_21]: https://github.com/JetBrains/kotlin/releases/tag/v2.2.21
802863
[loom]: https://docs.oracle.com/en/java/javase/21/core/virtual-threads.html
864+
[new signing key]: https://keyserver.ubuntu.com/pks/lookup?search=5dd80b0ddccbe005f0a47fd66751e1a6e2001b8d&fingerprint=on&op=index
803865
[okio_2_9_0]: https://lysine.dev/okio/changelog/#version-290
804866
[okio_3_0_0]: https://lysine.dev/okio/changelog/#version-300
805867
[okio_3_12_0]: https://lysine.dev/okio/changelog/#version-3120
@@ -811,12 +873,15 @@ See [4.x Change log](https://lysine.dev/okhttp/changelogs/changelog_4x/) for the
811873
[okio_3_16_3]: https://lysine.dev/okio/changelog/#version-3163
812874
[okio_3_16_4]: https://lysine.dev/okio/changelog/#version-3164
813875
[okio_3_17_0]: https://lysine.dev/okio/changelog/#version-3170
876+
[okio_3_18_1]: https://lysine.dev/okio/changelog/#version-3181
814877
[okio_3_1_0]: https://lysine.dev/okio/changelog/#version-310
815878
[okio_3_2_0]: https://lysine.dev/okio/changelog/#version-320
816879
[okio_3_7_0]: https://lysine.dev/okio/changelog/#version-370
817880
[okio_3_9_0]: https://lysine.dev/okio/changelog/#version-390
818-
[rfc_8305]: https://tools.ietf.org/html/rfc8305
881+
[rfc_8305]: https://www.rfc-editor.org/info/rfc8305/
882+
[rfc_10008]: https://www.rfc-editor.org/info/rfc10008/
819883
[startup_1_2_0]: https://developer.android.com/jetpack/androidx/releases/startup#1.2.0
884+
[the Commonhaus Foundation]: https://www.commonhaus.org/activity/315.html
820885
[uts46]: https://www.unicode.org/reports/tr46
821886
[zstd]: https://github.com/facebook/zstd
822887
[zstd_kmp_0_4_0]: https://github.com/square/zstd-kmp/blob/main/CHANGELOG.md#version-040

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ Releases
123123

124124
Our [change log][changelog] has release history.
125125

126-
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/5.4.0/jar).
126+
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/5.5.0/jar).
127127

128128
```kotlin
129-
implementation("com.squareup.okhttp3:okhttp:5.4.0")
129+
implementation("com.squareup.okhttp3:okhttp:5.5.0")
130130
```
131131

132132
Snapshot builds are [available][snap]. [R8 and ProGuard][r8_proguard] rules are available.
@@ -136,7 +136,7 @@ Also, we have a [bill of materials (BOM)][bom] available to help you keep OkHttp
136136
```kotlin
137137
dependencies {
138138
// define a BOM and its version
139-
implementation(platform("com.squareup.okhttp3:okhttp-bom:5.4.0"))
139+
implementation(platform("com.squareup.okhttp3:okhttp-bom:5.5.0"))
140140

141141
// define any required OkHttp artifacts without version
142142
implementation("com.squareup.okhttp3:okhttp")
@@ -191,10 +191,10 @@ MockWebServer
191191

192192
OkHttp includes a library for testing HTTP, HTTPS, and HTTP/2 clients.
193193

194-
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/mockwebserver/5.4.0/jar).
194+
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/mockwebserver/5.5.0/jar).
195195

196196
```kotlin
197-
testImplementation("com.squareup.okhttp3:mockwebserver3:5.4.0")
197+
testImplementation("com.squareup.okhttp3:mockwebserver3:5.5.0")
198198
```
199199

200200
MockWebServer is used for firstly for internal testing, and for basic testing of apps using OkHttp client.

build-logic/src/main/kotlin/okhttp.base-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
77
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
88

99
group = "com.squareup.okhttp3"
10-
version = "5.5.0-SNAPSHOT"
10+
version = "5.5.0"
1111

1212
val platform = project.platform
1313
val testJavaVersion = project.testJavaVersion

mockwebserver-junit4/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module integrates mockwebserver3.MockWebServer with JUnit 4.
66
To use, first add this library as a test dependency:
77

88
```
9-
testImplementation("com.squareup.okhttp3:mockwebserver3-junit4:5.4.0")
9+
testImplementation("com.squareup.okhttp3:mockwebserver3-junit4:5.5.0")
1010
```
1111

1212
Then in tests annotated `@org.junit.Test`, you may declare a field with the `@Rule` annotation:

mockwebserver-junit5/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module integrates mockwebserver3.MockWebServer with JUnit 5.
66
To use, first add this library as a test dependency:
77

88
```
9-
testImplementation("com.squareup.okhttp3:mockwebserver3-junit5:5.4.0")
9+
testImplementation("com.squareup.okhttp3:mockwebserver3-junit5:5.5.0")
1010
```
1111

1212
Annotate fields in test classes with `@StartStop`. The server will be started and shut down

mockwebserver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ server.dispatcher = dispatcher
270270
### Download
271271

272272
```kotlin
273-
testImplementation("com.squareup.okhttp3:mockwebserver3:5.4.0")
273+
testImplementation("com.squareup.okhttp3:mockwebserver3:5.5.0")
274274
```
275275

276276
### License

okhttp-brotli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ OkHttpClient client = new OkHttpClient.Builder()
1414
```
1515

1616
```kotlin
17-
implementation("com.squareup.okhttp3:okhttp-brotli:5.4.0")
17+
implementation("com.squareup.okhttp3:okhttp-brotli:5.5.0")
1818
```
1919

2020
[1]: https://github.com/google/brotli

okhttp-dnsoverhttps/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module is an implementation of [DNS over HTTPS][1] using OkHttp.
66
### Download
77

88
```kotlin
9-
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:5.4.0")
9+
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:5.5.0")
1010
```
1111

1212
### Usage

okhttp-java-net-cookiejar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ This used to be part of `okhttp-urlconnection`
77
### Download
88

99
```kotlin
10-
testImplementation("com.squareup.okhttp3:okhttp-java-net-cookiejar:5.4.0")
10+
testImplementation("com.squareup.okhttp3:okhttp-java-net-cookiejar:5.5.0")
1111
```

okhttp-logging-interceptor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Download
3737
--------
3838

3939
```kotlin
40-
implementation("com.squareup.okhttp3:logging-interceptor:5.4.0")
40+
implementation("com.squareup.okhttp3:logging-interceptor:5.5.0")
4141
```
4242

4343

0 commit comments

Comments
 (0)