Commit e0410b6f authored by topjohnwu's avatar topjohnwu

TLS only on release builds

parent 8eac6c0b
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute" />
</manifest>
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
android:label="Magisk" android:label="Magisk"
android:requestLegacyExternalStorage="true" android:requestLegacyExternalStorage="true"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute" />
</manifest> </manifest>
...@@ -47,8 +47,7 @@ private class DnsResolver(client: OkHttpClient) : Dns { ...@@ -47,8 +47,7 @@ private class DnsResolver(client: OkHttpClient) : Dns {
if (Config.doh) { if (Config.doh) {
try { try {
return doh.lookup(hostname) return doh.lookup(hostname)
} catch (e: UnknownHostException) { } catch (e: UnknownHostException) {}
}
} }
return Dns.SYSTEM.lookup(hostname) return Dns.SYSTEM.lookup(hostname)
} }
...@@ -64,7 +63,7 @@ fun createOkHttpClient(context: Context): OkHttpClient { ...@@ -64,7 +63,7 @@ fun createOkHttpClient(context: Context): OkHttpClient {
level = HttpLoggingInterceptor.Level.BASIC level = HttpLoggingInterceptor.Level.BASIC
}) })
} else { } else {
builder.connectionSpecs(listOf(ConnectionSpec.RESTRICTED_TLS)) builder.connectionSpecs(listOf(ConnectionSpec.MODERN_TLS))
} }
builder.dns(DnsResolver(builder.build())) builder.dns(DnsResolver(builder.build()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment