mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-20 07:28:29 +00:00
TLS only on release builds
This commit is contained in:
parent
8eac6c0b48
commit
e0410b6f10
8
app/shared/src/debug/AndroidManifest.xml
Normal file
8
app/shared/src/debug/AndroidManifest.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<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 @@
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user