Skip to content
Merged
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
37 changes: 34 additions & 3 deletions app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<!-- Allow cleartext traffic at OS level to support runtime toggling. Also trust user CAs. -->
<base-config cleartextTrafficPermitted="true">
<network-security-config xmlns:tools="http://schemas.android.com/tools">
<!--
Custom AI endpoints are entered by the user at runtime (Ollama, LM Studio, self-hosted servers,
self-signed or private-CA certificates), so the base config has to stay open for them. Plain HTTP
is still blocked in the app unless "Allow insecure connections" is enabled.
-->
<base-config cleartextTrafficPermitted="true" tools:ignore="InsecureBaseConfiguration,AcceptsUserCertificates">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>

<!--
Hosts the app contacts by itself (AI providers, model and plugin downloads, updates) are fixed, so
they only get HTTPS with the system CAs. A user-installed CA cannot intercept API keys or downloads.
-->
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">groq.com</domain>
<domain includeSubdomains="true">googleapis.com</domain>
<domain includeSubdomains="true">openai.com</domain>
<domain includeSubdomains="true">huggingface.co</domain>
<domain includeSubdomains="true">hf.co</domain>
<domain includeSubdomains="true">github.com</domain>
<domain includeSubdomains="true">githubusercontent.com</domain>
<domain includeSubdomains="true">codeberg.org</domain>
<domain includeSubdomains="true">google.com</domain>
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</domain-config>

<!-- debug builds can still be inspected with a proxy -->
<debug-overrides>
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>