Merge pull request #2659 from davotoula/fix/strictmode-cleartext-localhost
fix(android): silence StrictMode cleartext violations for 127.0.0.1 (Tor SOCKS)
This commit is contained in:
@@ -86,6 +86,7 @@
|
|||||||
android:theme="@style/Theme.Amethyst"
|
android:theme="@style/Theme.Amethyst"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:localeConfig="@xml/locales_config"
|
android:localeConfig="@xml/locales_config"
|
||||||
tools:targetApi="34">
|
tools:targetApi="34">
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Cleartext traffic is permitted globally so user-configured ws:// relays keep working.
|
||||||
|
The explicit localhost domain-config silences StrictMode CleartextNetworkViolation
|
||||||
|
for the Tor SOCKS proxy on 127.0.0.1.
|
||||||
|
-->
|
||||||
|
<network-security-config>
|
||||||
|
<base-config cleartextTrafficPermitted="true">
|
||||||
|
<trust-anchors>
|
||||||
|
<certificates src="system" />
|
||||||
|
</trust-anchors>
|
||||||
|
</base-config>
|
||||||
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
|
<domain includeSubdomains="false">127.0.0.1</domain>
|
||||||
|
<domain includeSubdomains="false">localhost</domain>
|
||||||
|
</domain-config>
|
||||||
|
</network-security-config>
|
||||||
Reference in New Issue
Block a user