Skip to content

[PR] Enable TLS 1.3 by default #1282

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import android.util.Log
import okhttp3.CacheControl
import okhttp3.Call
import okhttp3.ConnectionPool
import okhttp3.ConnectionSpec
import okhttp3.Cookie
import okhttp3.CookieJar
import okhttp3.HttpUrl
Expand Down Expand Up @@ -102,6 +103,10 @@ class OKHTTPBackend private constructor() : HTTPBackend() {
builder.proxy(tor)
}

// This restrict the client to only use TLSv1.2 and TLSv1.3
// In other word, only modern website with HTTPS enabled
builder.connectionSpecs(listOf(ConnectionSpec.RESTRICTED_TLS))

builder.followRedirects(true)
builder.followSslRedirects(true)

Expand Down
Loading