aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/res
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-07-04 11:57:21 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-07-04 11:57:21 +0200
commitb1783fb3d2c5797aa154ff203be7a8ca854ac69b (patch)
treec5d50a4db3b3cf716905a14b49aad2f98ac12964 /OpenKeychain/src/main/res
parent0faf69e91fa5ccf3ba14267c5e2e6414e7be0324 (diff)
parentaca106e8080dc58a0020b23f671daf1431674afb (diff)
downloadopen-keychain-b1783fb3d2c5797aa154ff203be7a8ca854ac69b.tar.gz
open-keychain-b1783fb3d2c5797aa154ff203be7a8ca854ac69b.tar.bz2
open-keychain-b1783fb3d2c5797aa154ff203be7a8ca854ac69b.zip
Merge pull request #1329 from open-keychain/tor-support
added proxy/tor preferences
Diffstat (limited to 'OpenKeychain/src/main/res')
-rw-r--r--OpenKeychain/src/main/res/values/arrays.xml8
-rw-r--r--OpenKeychain/src/main/res/values/strings.xml40
-rw-r--r--OpenKeychain/src/main/res/xml/preference_headers.xml3
-rw-r--r--OpenKeychain/src/main/res/xml/proxy_prefs.xml34
4 files changed, 85 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/res/values/arrays.xml b/OpenKeychain/src/main/res/values/arrays.xml
index 44bbe00cc..241f530d8 100644
--- a/OpenKeychain/src/main/res/values/arrays.xml
+++ b/OpenKeychain/src/main/res/values/arrays.xml
@@ -29,6 +29,14 @@
<item>28800</item>
<item>-1</item>
</string-array>
+ <string-array name="pref_proxy_type_entries" translatable="false">
+ <item>@string/pref_proxy_type_choice_http</item>
+ <item>@string/pref_proxy_type_choice_socks</item>
+ </string-array>
+ <string-array name="pref_proxy_type_values" translatable="false">
+ <item>@string/pref_proxy_type_value_http</item>
+ <item>@string/pref_proxy_type_value_socks</item>
+ </string-array>
<string-array name="rsa_key_size_spinner_values" translatable="false">
<item>@string/key_size_2048</item>
<item>@string/key_size_4096</item>
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index 5a43fda19..f6892c664 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -49,6 +49,7 @@
<string name="section_keys">"Subkeys"</string>
<string name="section_cloud_search">"Cloud search"</string>
<string name="section_passphrase_cache">"Password/PIN Handling"</string>
+ <string name="section_proxy_settings">"Proxy Settings"</string>
<string name="section_certify">"Confirm"</string>
<string name="section_actions">"Actions"</string>
<string name="section_share_key">"Key"</string>
@@ -172,6 +173,41 @@
<string name="pref_keybase">"keybase.io"</string>
<string name="pref_keybase_summary">"Search keys on keybase.io"</string>
+ <!-- Proxy Preferences -->
+ <string name="pref_proxy_tor_title">"Enable Tor"</string>
+ <string name="pref_proxy_tor_summary">"Requires Orbot to be installed"</string>
+ <string name="pref_proxy_normal_title">"Enable other proxy"</string>
+ <string name="pref_proxy_host_title">"Proxy Host"</string>
+ <string name="pref_proxy_host_err_invalid">"Proxy host cannot be empty"</string>
+ <string name="pref_proxy_port_title">"Proxy Port"</string>
+ <string name="pref_proxy_port_err_invalid">"Invalid port number entered"</string>
+ <string name="pref_proxy_type_title">"Proxy Type"</string>
+
+ <!-- proxy type choices and values -->
+ <string name="pref_proxy_type_choice_http">"HTTP"</string>
+ <string name="pref_proxy_type_choice_socks">"SOCKS"</string>
+ <string name="pref_proxy_type_value_http">"proxyHttp"</string>
+ <string name="pref_proxy_type_value_socks">"proxySocks"</string>
+
+ <!-- OrbotHelper strings -->
+ <string name="orbot_ignore_tor">"Don\'t use Tor"</string>
+
+ <!-- InstallDialogFragment strings -->
+ <string name="orbot_install_dialog_title">Install Orbot to use Tor?</string>
+ <string name="orbot_install_dialog_install">"Install"</string>
+ <string name="orbot_install_dialog_content">You must have Orbot installed and activated to proxy traffic through it. Would you like to install it?</string>
+ <string name="orbot_install_dialog_cancel">"Cancel"</string>
+ <string name="orbot_install_dialog_ignore_tor">"Don\'t use Tor"</string>
+
+ <!-- StartOrbotDialogFragment strings -->
+ <string name="orbot_start_dialog_title">Start Orbot?</string>
+ <string name="orbot_start_dialog_content">"Orbot doesn\'t appear to be running. Would you like to start it up and connect to Tor?"</string>
+ <string name="orbot_start_btn">"Start Orbot"</string>
+ <string name="orbot_start_dialog_start">"Start Orbot"</string>
+ <string name="orbot_start_dialog_cancel">"Cancel"</string>
+ <string name="orbot_start_dialog_ignore_tor">"Don\'t use Tor"</string>
+
+
<string name="user_id_no_name">"&lt;no name&gt;"</string>
<string name="none">"&lt;none&gt;"</string>
@@ -1163,6 +1199,7 @@
<string name="msg_crt_warn_not_found">"Key not found!"</string>
<string name="msg_crt_warn_cert_failed">"Certificate generation failed!"</string>
<string name="msg_crt_warn_save_failed">"Save operation failed!"</string>
+ <string name="msg_crt_warn_upload_failed">"Upload operation failed!"</string>
<string name="msg_crt_upload_success">"Successfully uploaded key to server"</string>
@@ -1192,6 +1229,7 @@
</plurals>
<string name="msg_export_all">"Exporting all keys"</string>
<string name="msg_export_public">"Exporting public key %s"</string>
+ <string name="msg_export_upload_public">"Uploading public key %s"</string>
<string name="msg_export_secret">"Exporting secret key %s"</string>
<string name="msg_export_error_no_file">"No filename specified!"</string>
<string name="msg_export_error_fopen">"Error opening file!"</string>
@@ -1201,7 +1239,9 @@
<string name="msg_export_error_db">"Database error!"</string>
<string name="msg_export_error_io">"Input/output error!"</string>
<string name="msg_export_error_key">"Error preprocessing key data!"</string>
+ <string name="msg_export_error_upload">"Error uploading key to server! Please check your internet connection"</string>
<string name="msg_export_success">"Export operation successful"</string>
+ <string name="msg_export_upload_success">"Upload to keyserver successful"</string>
<string name="msg_del_error_empty">"Nothing to delete!"</string>
<string name="msg_del_error_multi_secret">"Secret keys can only be deleted individually!"</string>
diff --git a/OpenKeychain/src/main/res/xml/preference_headers.xml b/OpenKeychain/src/main/res/xml/preference_headers.xml
index e3447ff48..70e400567 100644
--- a/OpenKeychain/src/main/res/xml/preference_headers.xml
+++ b/OpenKeychain/src/main/res/xml/preference_headers.xml
@@ -5,4 +5,7 @@
<header
android:fragment="org.sufficientlysecure.keychain.ui.SettingsActivity$AdvancedPrefsFragment"
android:title="@string/section_passphrase_cache" />
+ <header
+ android:fragment="org.sufficientlysecure.keychain.ui.SettingsActivity$ProxyPrefsFragment"
+ android:title="@string/section_proxy_settings" />
</preference-headers>
diff --git a/OpenKeychain/src/main/res/xml/proxy_prefs.xml b/OpenKeychain/src/main/res/xml/proxy_prefs.xml
new file mode 100644
index 000000000..94e101cb6
--- /dev/null
+++ b/OpenKeychain/src/main/res/xml/proxy_prefs.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <CheckBoxPreference
+ android:key="useTorProxy"
+ android:persistent="true"
+ android:title="@string/pref_proxy_tor_title"
+ android:summary="@string/pref_proxy_tor_summary" />
+ <CheckBoxPreference
+ android:key="useNormalProxy"
+ android:persistent="true"
+ android:title="@string/pref_proxy_normal_title" />
+ <EditTextPreference
+ android:key="proxyHost"
+ android:persistent="true"
+ android:defaultValue="127.0.0.1"
+ android:title="@string/pref_proxy_host_title"
+ android:cursorVisible="true"
+ android:textCursorDrawable="@null"
+ android:inputType="textEmailAddress"/>
+ <EditTextPreference
+ android:key="proxyPort"
+ android:defaultValue="8118"
+ android:persistent="true"
+ android:title="@string/pref_proxy_port_title"
+ android:textCursorDrawable="@null"
+ android:inputType="number" />
+ <ListPreference
+ android:entries="@array/pref_proxy_type_entries"
+ android:entryValues="@array/pref_proxy_type_values"
+ android:defaultValue="@string/pref_proxy_type_value_http"
+ android:key="proxyType"
+ android:persistent="true"
+ android:title="@string/pref_proxy_type_title" />
+</PreferenceScreen>