diff options
-rw-r--r-- | res/values-de/arrays.xml | 19 | ||||
-rw-r--r-- | res/values/strings.xml | 35 | ||||
-rw-r--r-- | res/xml/main_headers.xml | 9 | ||||
-rw-r--r-- | res/xml/vpn_authentification.xml | 18 | ||||
-rw-r--r-- | res/xml/vpn_ipsettings.xml | 34 | ||||
-rw-r--r-- | res/xml/vpn_obscure.xml | 8 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/ShowConfigFragment.java | 1 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/VPNProfileList.java | 2 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 2 |
9 files changed, 90 insertions, 38 deletions
diff --git a/res/values-de/arrays.xml b/res/values-de/arrays.xml index 06b26fa..ad3ea97 100644 --- a/res/values-de/arrays.xml +++ b/res/values-de/arrays.xml @@ -1,8 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="tls_directions_entries"> <item>0</item> <item>1</item> <item>Unspezifiziert</item> </string-array> + <string-array name="vpn_types"> + <item>Zertifikate</item> + <item>PKCS12 Datei</item> + <item>Android Zertifikat Speicher</item> + <item>Benutzerame/Passwort</item> + <item>Statische Schlüssel</item> + <item>Nutzer/PW + Zertifikate</item> + <item>Nutzer/PW + PKCS12 </item> + <item>Nutzer/PW + Android</item> + </string-array> + <string-array name="verb_entries"> + <item>0 - Kein Logging</item> + <item>1 - Standard Logging</item> + <item>2 - Ausführlicheres Logging</item> + <item>3</item> + <item>4</item> + <item>5 - Debug Logging</item> + </string-array> </resources>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index c8e2b1e..07268b0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -69,6 +69,9 @@ <string name="lzo">LZO</string> <string name="openssl">OpenSSL</string> <string name="about">About</string> + <string name="about_summary">About Openvpn for Android</string> + <string name="vpn_list_summary">List of all configured VPNs</string> + <string name="vpn_list_title">All your precious VPNs</string> <string name="vpn_type">Type</string> <string name="pkcs12pwquery">PKCS12 Password</string> @@ -112,10 +115,40 @@ <string name="custom_config_title">Enable Custom Options</string> <string name="custom_config_summary">Specify custom options. Use with care!</string> <string name="route_rejected">Route rejected by Android</string> - <string formatted="false" name="ip_not_cidr">Cannot make sense of %s and %s as IP and CIDR netmask, assuming P2P for local address (/32)</string> + <string formatted="false" name="ip_not_cidr">Cannot make sense of %s and %s as IP and CIDR netmask, assuming second address is peer address of remote. Using /32 netmask for local IP.</string> <string name="cancel_connection">cancel</string> <string name="clear_log">clear log</string> <string name="title_cancel">Cancel Confirmation</string> <string name="cancel_connection_query">Disconnect the connected VPN/cancel the connection attempt?</string> <string name="remove_vpn">Remove VPN</string> + <string name="check_remote_tlscert">Checks whether the server uses a TLS Server Certificate</string> + <string name="check_remote_tlscert_title">Except TLS Server</string> + <string name="remote_tlscn_check_summary">Checks the Remote Server Certificate CN against a String</string> + <string name="remote_tlscn_check_title">Certificate Hostname Check</string> + <string name="enter_tlscn_dialog">Enter the String against which the remote Server is checked. Openvpn will use prefix matching. &quot;Server&quot; matches &quot;Server-1&quot; and &quot;Server-2&quot;\\nLeave empty to check the CN against the server hostname.</string> + <string name="enter_tlscn_title">Remote Hostname(CN)</string> + <string name="tls_key_auth">Enables the TLS Key Authentication</string> + <string name="tls_auth_file">TLS Auth File</string> + <string name="pull_on_summary">Requests IP addresses, routes and timing options from the server.</string> + <string name="pull_off_summary">No information is requested from the server. Settings need to be specified below.</string> + <string name="use_pull">Pull Settings</string> + <string name="dns">DNS</string> + <string name="override_dns">Override DNS Settings by Server</string> + <string name="dns_override_summary">Use your own DNS Servers</string> + <string name="searchdomain">searchDomain</string> + <string name="dns1_title">DNS Server to be used.</string> + <string name="dns1_summary">DNS Server to be used.</string> + <string name="dns_server">DNS Server</string> + <string name="secondary_dns_message">Secondary DNS Server used if the normal DNS Server cannot be reached.</string> + <string name="backup_dns">Backup DNS Server</string> + <string name="ignored_pushed_routes">Ignore pushed routes</string> + <string name="ignore_routes_summary">Ignore routed pushed by the server.</string> + <string name="default_route_summary">Redirects all Traffic over the VPN</string> + <string name="use_default_title">Use default Route</string> + <string name="custom_route_message">Enter custom routes. Only enter destination in CIDR format. &quot;10.0.0.0/8 2002::/16&quot; would direct the networks 10.0.0.0/8 and 2002::/16 over the VPN.</string> + <string name="custom_routes_title">Custom Routes</string> + <string name="log_verbosity_level">Log verbosity level</string> + <string name="float_summary">Allows authenticated packets from any IP</string> + <string name="float_title">Allow floating server</string> + <string name="custom_options_title">Custom Options</string> </resources> diff --git a/res/xml/main_headers.xml b/res/xml/main_headers.xml index 7ea9584..0270f9b 100644 --- a/res/xml/main_headers.xml +++ b/res/xml/main_headers.xml @@ -3,12 +3,13 @@ <header android:fragment="de.blinkt.openvpn.VPNProfileList" - android:summary="List of all configured VPNs" - android:title="All your precious VPNs" /> + android:summary="@string/vpn_list_summary" + android:title="@string/vpn_list_title" /> <header android:fragment="de.blinkt.openvpn.AboutFragment" - android:summary="About Openvpn for Android" - android:title="About" /> + android:summary="@string/about_summary" + android:title="@string/about" /> + </preference-headers>
\ No newline at end of file diff --git a/res/xml/vpn_authentification.xml b/res/xml/vpn_authentification.xml index ceeb514..bd8d8ca 100644 --- a/res/xml/vpn_authentification.xml +++ b/res/xml/vpn_authentification.xml @@ -3,29 +3,29 @@ <CheckBoxPreference android:key="remoteServerTLS" - android:summary="Checks whether the server uses a TLS Server Certificate" - android:title="Except TLS Server" /> + android:summary="@string/check_remote_tlscert" + android:title="@string/check_remote_tlscert_title" /> <CheckBoxPreference android:key="checkRemoteCN" - android:summary="Checks the Remote Server Certificate CN against a String" - android:title="Certificate Hostname Check" /> + android:summary="@string/remote_tlscn_check_summary" + android:title="@string/remote_tlscn_check_title" /> <EditTextPreference android:dependency="checkRemoteCN" - android:dialogMessage="Enter the String against which the remote Server is checked. Openvpn will use prefix matching. "Server" matches "Server-1" and "Server-2"\nLeave empty to check the CN against the server hostname." + android:dialogMessage="@string/enter_tlscn_dialog" android:key="remotecn" - android:title="Remote Hostname(CN)" /> + android:title="@string/enter_tlscn_title" /> <PreferenceCategory android:title="TLS Authentication" > <SwitchPreference android:key="useTLSAuth" - android:summary="Enables the TLS Key Authentication" + android:summary="@string/tls_key_auth" android:title="@string/useTLSAuth" /> <Preference android:dependency="useTLSAuth" android:key="tlsAuthFile" - android:title="TLS Auth File" /> + android:title="@string/tls_auth_file" /> <ListPreference android:entries="@array/tls_directions_entries" @@ -34,7 +34,7 @@ android:entryValues="@array/tls_directions_values" android:key="tls_direction" android:persistent="false" - android:title="TLS Direction" /> + android:title="@string/tls_direction" /> </PreferenceCategory> /> diff --git a/res/xml/vpn_ipsettings.xml b/res/xml/vpn_ipsettings.xml index a018321..00774b6 100644 --- a/res/xml/vpn_ipsettings.xml +++ b/res/xml/vpn_ipsettings.xml @@ -4,9 +4,9 @@ <SwitchPreference android:disableDependentsState="true" android:key="usePull" - android:title="Pull Settings" - android:summaryOn="Requests IP addresses, routes and timing options from the server." - android:summaryOff="No information is requested from the server. Settings need to be specified below." /> + android:title="@string/use_pull" + android:summaryOn="@string/pull_on_summary" + android:summaryOff="@string/pull_off_summary" /> <PreferenceCategory android:title="IP" > <EditTextPreference @@ -20,42 +20,42 @@ android:key="ipv6_address" android:title="@string/ipv6_address" /> </PreferenceCategory> - <PreferenceCategory android:title="DNS" > + <PreferenceCategory android:title="@string/dns" > <CheckBoxPreference android:key="overrideDNS" - android:summary="Override DNS Settings by Server" - android:title="Override DNS Settings" /> + android:summary="@string/dns_override_summary" + android:title="@string/override_dns" /> <EditTextPreference android:key="searchdomain" - android:title="searchDomain" /> + android:title="@string/searchdomain" /> <EditTextPreference android:key="dns1" - android:dialogMessage="DNS Server to be used." - android:title="DNS Server" /> + android:dialogMessage="@string/dns1_summary" + android:title="@string/dns_server" /> <EditTextPreference android:key="dns2" - android:dialogMessage="Secondary DNS Server used if the normal DNS Server cannot be reached." - android:title="Backup DNS Server" /> + android:dialogMessage="@string/secondary_dns_message" + android:title="@string/backup_dns" /> </PreferenceCategory> <PreferenceCategory android:title="Routing" > <CheckBoxPreference - android:title="Ignore pushed routes" + android:title="@string/ignored_pushed_routes" android:key="routenopull" - android:summary="Ignore routed pushed by the server." + android:summary="@string/ignore_routes_summary" /> <CheckBoxPreference android:disableDependentsState="true" android:key="useDefaultRoute" - android:summary="Redirects all Traffic over the VPN" - android:title="Use default Route" /> + android:summary="@string/default_route_summary" + android:title="@string/use_default_title" /> <EditTextPreference android:dependency="useDefaultRoute" - android:dialogMessage="Enter custom routes. Only enter destination in CIDR format. "10.0.0.0/8 2002::/16" would direct the networks 10.0.0.0/8 and 2002::/16 over the VPN." + android:dialogMessage="@string/custom_route_message" android:key="customRoutes" - android:title="Custom Routes" /> + android:title="@string/custom_routes_title" /> </PreferenceCategory> </PreferenceScreen>
\ No newline at end of file diff --git a/res/xml/vpn_obscure.xml b/res/xml/vpn_obscure.xml index 6c7d498..44f71c5 100644 --- a/res/xml/vpn_obscure.xml +++ b/res/xml/vpn_obscure.xml @@ -7,7 +7,7 @@ android:entryValues="@array/verb_values" android:key="verblevel" android:persistent="false" - android:title="Log verbosity level" /> + android:title="@string/log_verbosity_level" /> <CheckBoxPreference android:key="useRandomHostname" @@ -17,8 +17,8 @@ <CheckBoxPreference android:key="useFloat" android:persistent="false" - android:summary="Allows authenticated packets from any IP" - android:title="Allow floating server" /> + android:summary="@string/float_summary" + android:title="@string/float_title" /> <!-- <CheckBoxPreference android:key="setmtu" android:title="Set custom MTU" /> @@ -62,7 +62,7 @@ android:dialogMessage="@string/custom_option_warning" android:key="customOptions" android:persistent="false" - android:title="Custom Options" /> + android:title="@string/custom_options_title" /> </PreferenceCategory> </PreferenceScreen>
\ No newline at end of file diff --git a/src/de/blinkt/openvpn/ShowConfigFragment.java b/src/de/blinkt/openvpn/ShowConfigFragment.java index 68898e0..13c65df 100644 --- a/src/de/blinkt/openvpn/ShowConfigFragment.java +++ b/src/de/blinkt/openvpn/ShowConfigFragment.java @@ -22,7 +22,6 @@ public class ShowConfigFragment extends Fragment { } else { String cfg=vp.getConfigFile(getActivity().getCacheDir()); - cv.setText(cfg); } return v; diff --git a/src/de/blinkt/openvpn/VPNProfileList.java b/src/de/blinkt/openvpn/VPNProfileList.java index 42c881a..58c9237 100644 --- a/src/de/blinkt/openvpn/VPNProfileList.java +++ b/src/de/blinkt/openvpn/VPNProfileList.java @@ -31,7 +31,7 @@ public class VPNProfileList extends PreferenceFragment implements VpnPreference setHasOptionsMenu(true); refreshList(); // Debug load JNI - OpenVPN.foo(); + //OpenVPN.foo(); } diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 04b5927..683ba66 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -376,7 +376,7 @@ public class VpnProfile implements Serializable{ long nm = 0xffffffffl; - nm = (nm << len) & 0xffffffffl; + nm = (nm << (32-len)) & 0xffffffffl; String netmask =String.format("%d.%d.%d.%d", (nm & 0xff000000) >> 24,(nm & 0xff0000) >> 16, (nm & 0xff00) >> 8 ,nm & 0xff ); return parts[0] + " " + netmask; |