Add support for proxies - 2/3

This commit is contained in:
Rahul Patel
2023-10-22 14:27:13 +05:30
parent 687c14c394
commit f19631ad6a
36 changed files with 226 additions and 44 deletions

View File

@@ -240,6 +240,10 @@
<string name="pref_install_profile_summary">"Select the target profile to install apps to. Only works with the root installation method"</string>
<string name="pref_install_profile_title">"Installation profiles (Experimental)"</string>
<string name="pref_network_title">"Networking"</string>
<string name="pref_network_proxy_title">Proxy</string>
<string name="pref_network_proxy_enable">"Enable proxy"</string>
<string name="pref_network_proxy_enable_desc">"Allow all traffic from app to go through the proxy"</string>
<string name="pref_network_proxy_url">"Proxy URL"</string>
<string name="pref_ui_accent_title">"Accent"</string>
<string name="pref_ui_theme_black">"Black"</string>
<string name="pref_ui_theme_dark">"Dark"</string>
@@ -326,7 +330,10 @@
<string name="toast_export_success">Device config exported</string>
<string name="toast_export_failed">Could not export device config</string>
<string name="toast_import_success">Device config imported</string>
<string name="toast_import_failed">Could not import device config</string>
<string name="toast_import_failed">"Could not import device config"</string>
<string name="toast_proxy_invalid">"Invalid proxy URL, check format!"</string>
<string name="toast_proxy_success">"Proxy set successfully"</string>
<string name="toast_proxy_failed">"Failed to set proxy"</string>
<string name="notification_channel_updater_service">App background download service</string>
<string name="app_updater_service_notif_title">Background app download</string>
<string name="app_updater_service_notif_text">Enables background app download</string>

View File

@@ -19,6 +19,28 @@
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
app:allowDividerAbove="true"
app:allowDividerBelow="true"
app:iconSpaceReserved="false"
app:key="PREFERENCE_CATEGORY_PROXY"
app:summary="protocol://user:password@host:port"
app:title="@string/pref_network_proxy_title">
<SwitchPreferenceCompat
app:disableDependentsState="false"
app:iconSpaceReserved="false"
app:key="PREFERENCE_PROXY_ENABLED"
app:summary="@string/pref_network_proxy_enable_desc"
app:title="@string/pref_network_proxy_enable" />
<EditTextPreference
app:dependency="PREFERENCE_PROXY_ENABLED"
app:iconSpaceReserved="false"
app:key="PREFERENCE_PROXY_URL"
app:title="@string/pref_network_proxy_url" />
</PreferenceCategory>
<SwitchPreferenceCompat
app:defaultValue="false"
app:iconSpaceReserved="false"