Skip to content

Commit 1e12697

Browse files
committed
Don't follow redirects when testing the proxy
If there's a redirect, then we're hitting the internet directly (it's the real HTTPS -> HTTP redirect) and it's better to give up immediately.
1 parent f1324fd commit 1e12697

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/main/java/tech/httptoolkit/android/ProxySetup.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private suspend fun testProxyAddress(
7575
.proxy(Proxy(Proxy.Type.HTTP, InetSocketAddress(address, port)))
7676
.connectTimeout(2, TimeUnit.SECONDS)
7777
.readTimeout(2, TimeUnit.SECONDS)
78+
.followRedirects(false)
7879
.build()
7980

8081
Log.i(TAG, "Testing proxy $address:$port")

0 commit comments

Comments
 (0)