From 27594eeae6f40a402bc3110f06d57975168e74e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 4 Jun 2015 19:20:15 +0200 Subject: ics-openvpn as a submodule! beautiful ics-openvpn is now officially on GitHub, and they track openssl and openvpn as submodules, so it's easier to update everything. Just a git submodule update --recursive. I've also set up soft links to native modules from ics-openvpn in app, so that we don't copy files in Gradle (which was causing problems with the submodules .git* files, not being copied). That makes the repo cleaner. --- app/src/main/java/de/blinkt/openvpn/LaunchVPN.java | 17 +- .../main/java/de/blinkt/openvpn/VpnProfile.java | 12 +- .../main/java/de/blinkt/openvpn/core/CIDRIP.java | 1 + .../java/de/blinkt/openvpn/core/ConfigParser.java | 39 +- .../blinkt/openvpn/core/ICSOpenVPNApplication.java | 1 - .../de/blinkt/openvpn/core/OpenVPNService.java | 100 ++-- .../de/blinkt/openvpn/core/ProfileManager.java | 318 +++++------ .../de/blinkt/openvpn/core/VPNLaunchHelper.java | 5 +- .../java/de/blinkt/openvpn/core/VpnStatus.java | 598 +++++++++++---------- .../de/blinkt/openvpn/fragments/LogFragment.java | 2 - .../org/spongycastle/util/encoders/Base64.java | 5 + .../spongycastle/util/encoders/Base64Encoder.java | 5 + .../org/spongycastle/util/encoders/Encoder.java | 5 + .../util/io/pem/PemGenerationException.java | 5 + .../org/spongycastle/util/io/pem/PemHeader.java | 5 + .../org/spongycastle/util/io/pem/PemObject.java | 5 + .../util/io/pem/PemObjectGenerator.java | 5 + .../org/spongycastle/util/io/pem/PemReader.java | 7 +- .../org/spongycastle/util/io/pem/PemWriter.java | 5 + app/src/main/res/values-ca/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-cs/strings-icsopenvpn.xml | 26 +- app/src/main/res/values-de/strings-icsopenvpn.xml | 32 +- app/src/main/res/values-es/strings-icsopenvpn.xml | 6 +- app/src/main/res/values-et/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-fr/strings-icsopenvpn.xml | 32 +- app/src/main/res/values-hu/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-in/strings-icsopenvpn.xml | 5 +- app/src/main/res/values-it/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-ja/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-ko/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-nl/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-no/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-pl/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-pt/strings-icsopenvpn.xml | 18 +- app/src/main/res/values-ro/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-ru/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-sv/strings-icsopenvpn.xml | 4 +- app/src/main/res/values-tr/strings-icsopenvpn.xml | 5 +- app/src/main/res/values-uk/strings-icsopenvpn.xml | 5 +- app/src/main/res/values-v21/refs.xml | 12 +- app/src/main/res/values-vi/strings-icsopenvpn.xml | 377 +++++++++++++ .../main/res/values-zh-rCN/strings-icsopenvpn.xml | 60 ++- .../main/res/values-zh-rTW/strings-icsopenvpn.xml | 4 +- app/src/main/res/values/refs.xml | 12 +- app/src/main/res/values/strings-icsopenvpn.xml | 37 +- app/src/main/res/values/untranslatable.xml | 120 +++++ 46 files changed, 1285 insertions(+), 654 deletions(-) create mode 100755 app/src/main/res/values-vi/strings-icsopenvpn.xml (limited to 'app/src') diff --git a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java index 0eb1d99c..f1d769e1 100644 --- a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java +++ b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java @@ -7,8 +7,6 @@ package de.blinkt.openvpn; import se.leap.bitmaskclient.R; -import se.leap.bitmaskclient.R; - import android.app.Activity; import android.app.AlertDialog; import android.content.ActivityNotFoundException; @@ -117,26 +115,27 @@ public class LaunchVPN extends Activity { } } - + @Override protected void onActivityResult (int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode==START_VPN_PROFILE) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - boolean showlogwindow = prefs.getBoolean("showlogwindow", true); - - if(!mhideLog && showlogwindow) + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + boolean showLogWindow = prefs.getBoolean("showlogwindow", true); + + if(!mhideLog && showLogWindow) showLogWindow(); new startOpenVpnThread().start(); } else if (resultCode == Activity.RESULT_CANCELED) { // User does not want us to start, so we just vanish - VpnStatus.updateStateString("USER_VPN_PERMISSION_CANCELLED", "", R.string.state_user_vpn_permission_cancelled, ConnectionStatus.LEVEL_NOTCONNECTED); + VpnStatus.updateStateString("USER_VPN_PERMISSION_CANCELLED", "", R.string.state_user_vpn_permission_cancelled, + ConnectionStatus.LEVEL_NOTCONNECTED); finish(); } } - + void showLogWindow() { Intent startLW = new Intent(getBaseContext(),LogWindow.class); diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index 4f747d21..43e1b57c 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -7,8 +7,6 @@ package de.blinkt.openvpn; import se.leap.bitmaskclient.R; -import se.leap.bitmaskclient.R; - import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; @@ -98,7 +96,7 @@ public class VpnProfile implements Serializable, Cloneable { // variable named wrong and should haven beeen transient // but needs to keep wrong name to guarante loading of old // profiles - public transient boolean profileDleted = false; + public transient boolean profileDeleted = false; public int mAuthenticationType = TYPE_KEYSTORE; public String mName; public String mAlias; @@ -156,7 +154,7 @@ public class VpnProfile implements Serializable, Cloneable { public boolean mRemoteRandom=false; public HashSet mAllowedAppsVpn = new HashSet(); public boolean mAllowedAppsVpnAreDisallowed = true; - + public String mProfileCreator; /* Options no long used in new profiles */ public String mServerName = "openvpn.blinkt.de"; @@ -699,7 +697,11 @@ public class VpnProfile implements Serializable, Cloneable { protected VpnProfile clone() throws CloneNotSupportedException { VpnProfile copy = (VpnProfile) super.clone(); copy.mUuid = UUID.randomUUID(); - copy.mConnections = mConnections.clone(); + copy.mConnections = new Connection[mConnections.length]; + int i=0; + for (Connection conn: mConnections) { + copy.mConnections[i++]=conn.clone(); + } copy.mAllowedAppsVpn = (HashSet) mAllowedAppsVpn.clone(); return copy; } diff --git a/app/src/main/java/de/blinkt/openvpn/core/CIDRIP.java b/app/src/main/java/de/blinkt/openvpn/core/CIDRIP.java index e525abd5..94ed8a0b 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/CIDRIP.java +++ b/app/src/main/java/de/blinkt/openvpn/core/CIDRIP.java @@ -54,6 +54,7 @@ class CIDRIP { } else { return false; } + } static long getInt(String ipaddr) { diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java index 5f5d486c..232c454b 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java @@ -31,6 +31,9 @@ public class ConfigParser { public static final String CONVERTED_PROFILE = "converted Profile"; private HashMap>> options = new HashMap>>(); private HashMap> meta = new HashMap>(); + private String auth_user_pass_file; + private String crl_verify_file; + public void parseConfig(Reader reader) throws IOException, ConfigParseError { @@ -114,6 +117,14 @@ public class ConfigParser { } + public String getAuthUserPassFile() { + return auth_user_pass_file; + } + + public String getCrlVerifyFile() { + return crl_verify_file; + } + enum linestate { initial, readin_single_quote, reading_quoted, reading_unquoted, done @@ -572,6 +583,7 @@ public class ConfigParser { options.put("remotetls", remotetls); Vector authuser = getOption("auth-user-pass", 0, 1); + if (authuser != null) { if (noauthtypeset) { np.mAuthenticationType = VpnProfile.TYPE_USERPASS; @@ -581,12 +593,24 @@ public class ConfigParser { np.mAuthenticationType = VpnProfile.TYPE_USERPASS_KEYSTORE; } if (authuser.size() > 1) { - // Set option value to password get to embed later. + if (!authuser.get(1).startsWith(VpnProfile.INLINE_TAG)) + auth_user_pass_file = authuser.get(1); np.mUsername = null; useEmbbedUserAuth(np, authuser.get(1)); } } + Vector crlfile = getOption("crl-verify", 1, 2); + if (crlfile != null) { + // If the 'dir' parameter is present just add it as custom option .. + np.mCustomConfigOptions += TextUtils.join(" ", crlfile) + "\n"; + if (crlfile.size() == 2) { + // Save the filename for the config converter to add later + crl_verify_file = crlfile.get(1); + } + } + + Pair conns = parseConnectionOptions(null); np.mConnections = conns.second; @@ -761,6 +785,16 @@ public class ConfigParser { } } + public static void removeCRLCustomOption(VpnProfile np) { + String lines[] = np.mCustomConfigOptions.split("\\r?\\n"); + Vector keeplines = new Vector<>(); + for (String l : lines) { + if (!l.startsWith("crl-verify ")) + keeplines.add(l); + } + np.mCustomConfigOptions = TextUtils.join("\n", keeplines); + } + private void checkIgnoreAndInvalidOptions(VpnProfile np) throws ConfigParseError { for (String option : unsupportedOptions) if (options.containsKey(option)) @@ -772,7 +806,8 @@ public class ConfigParser { if (options.size() > 0) { - np.mCustomConfigOptions += "# These Options were found in the config file do not map to config settings:\n"; + np.mCustomConfigOptions = "# These options found in the config file do not map to config settings:\n" + + np.mCustomConfigOptions; for (Vector> option : options.values()) { diff --git a/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java b/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java index 56a574dc..6e9e63c5 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java @@ -38,5 +38,4 @@ public class ICSOpenVPNApplication extends Application { //ACRA.init(this); } } - } diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 3c1ec064..ed3a5446 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -16,7 +16,6 @@ import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.net.ConnectivityManager; -import android.net.NetworkRequest; import android.net.VpnService; import android.os.Binder; import android.os.Build; @@ -51,8 +50,6 @@ import static de.blinkt.openvpn.core.NetworkSpace.ipAddress; import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_CONNECTED; import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_CONNECTING_NO_SERVER_REPLY_YET; import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT; -import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_NOTCONNECTED; -import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_NONETWORK; import se.leap.bitmaskclient.Dashboard; @@ -65,7 +62,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private static final String RESUME_VPN = "se.leap.bitmaskclient.RESUME_VPN"; private static final int OPENVPN_STATUS = 1; private static boolean mNotificationAlwaysVisible = false; - private final Vector mDnslist = new Vector(); + private final Vector mDnslist = new Vector<>(); private final NetworkSpace mRoutes = new NetworkSpace(); private final NetworkSpace mRoutesv6 = new NetworkSpace(); private final IBinder mBinder = new LocalBinder(); @@ -84,7 +81,6 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private String mLastTunCfg; private String mRemoteGW; private final Object mProcessLock = new Object(); - private LollipopDeviceStateListener mLollipopDeviceStateListener; // From: http://stackoverflow.com/questions/3758606/how-to-convert-byte-size-into-human-readable-format-in-java public static String humanReadableByteCount(long bytes, boolean mbit) { @@ -176,7 +172,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac mNotificationManager.notify(OPENVPN_STATUS, notification); - //startForeground(OPENVPN_STATUS, notification); + startForeground(OPENVPN_STATUS, notification); } private int getIconByConnectionStatus(ConnectionStatus level) { @@ -238,13 +234,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac //ignore exception - } catch (NoSuchMethodException nsm) { - VpnStatus.logException(nsm); - } catch (IllegalArgumentException e) { - VpnStatus.logException(e); - } catch (IllegalAccessException e) { - VpnStatus.logException(e); - } catch (InvocationTargetException e) { + } catch (NoSuchMethodException | IllegalArgumentException | + InvocationTargetException | IllegalAccessException e) { VpnStatus.logException(e); } @@ -328,6 +319,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac /* The intent is null when the service has been restarted */ if (intent == null) { mProfile = ProfileManager.getLastConnectedProfile(this, false); + VpnStatus.logInfo(R.string.service_restarted); /* Got no profile, just stop */ if (mProfile == null) { @@ -415,7 +407,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } else { - HashMap env = new HashMap(); + HashMap env = new HashMap<>(); processThread = new OpenVPNThread(this, argv, env, nativeLibraryDirectory); } @@ -431,7 +423,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac ProfileManager.setConnectedVpnProfile(this, mProfile); /* TODO: At the moment we have no way to handle asynchronous PW input - * Fixing will also allow to handle challenge/responsee authentication */ + * Fixing will also allow to handle challenge/response authentication */ if (mProfile.needUserPWInput(true) != 0) return START_NOT_STICKY; @@ -442,17 +434,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac try { Class cl = Class.forName("de.blinkt.openvpn.core.OpenVPNThreadv3"); return (OpenVPNManagement) cl.getConstructor(OpenVPNService.class, VpnProfile.class).newInstance(this, mProfile); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (InstantiationException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (ClassNotFoundException e) { + } catch (IllegalArgumentException | InstantiationException | InvocationTargetException | + NoSuchMethodException | ClassNotFoundException | IllegalAccessException e ) { e.printStackTrace(); } return null; @@ -501,8 +484,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac VpnStatus.logInfo(R.string.last_openvpn_tun_config); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mProfile.mAllowLocalLAN) - { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mProfile.mAllowLocalLAN) { allowAllAFFamilies(builder); } @@ -576,6 +558,26 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } } + if ("samsung".equals(Build.BRAND) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mDnslist.size() >= 1) { + // Check if the first DNS Server is in the VPN range + try { + ipAddress dnsServer = new ipAddress(new CIDRIP(mDnslist.get(0), 32), true); + boolean dnsIncluded=false; + for (ipAddress net : positiveIPv4Routes) { + if (net.containsNet(dnsServer)) { + dnsIncluded = true; + } + } + if (!dnsIncluded) { + String samsungwarning = String.format("Warning Samsung Android 5.0+ devices ignore DNS servers outside the VPN range. To enable DNS add a custom route to your DNS Server (%s) or change to a DNS inside your VPN range", mDnslist.get(0)); + VpnStatus.logWarning(samsungwarning); + } + } catch (Exception e) { + VpnStatus.logError("Error parsing DNS Server IP: " + mDnslist.get(0)); + } + } + + if (mDomain != null) builder.addSearchDomain(mDomain); @@ -616,7 +618,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac try { //Debug.stopMethodTracing(); ParcelFileDescriptor tun = builder.establish(); - if (tun==null) + if (tun == null) throw new NullPointerException("Android establish() method returned null (Really broken network configuration?)"); return tun; } catch (Exception e) { @@ -636,22 +638,6 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac builder.allowFamily(OsConstants.AF_INET6); } - @TargetApi(Build.VERSION_CODES.LOLLIPOP) - void removeLollipopCMListener() { - ConnectivityManager cm = (ConnectivityManager) getBaseContext().getSystemService(CONNECTIVITY_SERVICE); - cm.unregisterNetworkCallback(mLollipopDeviceStateListener); - mLollipopDeviceStateListener = null; - } - - @TargetApi(Build.VERSION_CODES.LOLLIPOP) - void addLollipopCMListener() { - ConnectivityManager cm = (ConnectivityManager) getBaseContext().getSystemService(CONNECTIVITY_SERVICE); - NetworkRequest.Builder nrb = new NetworkRequest.Builder(); - - mLollipopDeviceStateListener = new LollipopDeviceStateListener(); - cm.registerNetworkCallback(nrb.build(), mLollipopDeviceStateListener); - } - private void addLocalNetworksToRoutes() { // Add local network interfaces @@ -667,11 +653,11 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac intf.startsWith("tun") || intf.startsWith("rmnet")) continue; - if (ipAddr==null || netMask == null) { + if (ipAddr == null || netMask == null) { VpnStatus.logError("Local routes are broken?! (Report to author) " + TextUtils.join("|", localRoutes)); continue; } - + if (ipAddr.equals(mLocalIP.mIp)) continue; @@ -854,21 +840,6 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac mDisplayBytecount = true; mConnecttime = System.currentTimeMillis(); lowpriority = true; - if(mProfile.mPersistTun) { - NotificationManager ns = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - ns.cancel(OPENVPN_STATUS); - return; - } - } else if (level == LEVEL_NONETWORK || level == LEVEL_NOTCONNECTED) { - NotificationManager ns = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - ns.cancel(OPENVPN_STATUS); - return; - } else if (level != LEVEL_NOTCONNECTED && mConnecttime > 0) { - mDisplayBytecount = false; - String msg = "Traffic is blocked until the VPN becomes active."; - String ticker = msg; - showNotification(msg, ticker, lowpriority , 0, level); - return; } else { mDisplayBytecount = false; } @@ -878,8 +849,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac // CONNECTED // Does not work :( String msg = getString(resid); - String ticker = msg; - showNotification(msg + " " + logmessage, ticker, lowpriority, 0, level); + showNotification(msg + " " + logmessage, msg, lowpriority, 0, level); } } @@ -902,7 +872,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac humanReadableByteCount(diffOut / OpenVPNManagement.mBytecountInterval, true)); boolean lowpriority = !mNotificationAlwaysVisible; - //showNotification(netstat, null, lowpriority, mConnecttime, LEVEL_CONNECTED); + showNotification(netstat, null, lowpriority, mConnecttime, LEVEL_CONNECTED); } } diff --git a/app/src/main/java/de/blinkt/openvpn/core/ProfileManager.java b/app/src/main/java/de/blinkt/openvpn/core/ProfileManager.java index 1ebc0a57..086cdb44 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ProfileManager.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ProfileManager.java @@ -5,11 +5,15 @@ package de.blinkt.openvpn.core; -import java.io.FileNotFoundException; +import android.app.Activity; +import android.content.Context; +import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; +import android.preference.PreferenceManager; + import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.io.StreamCorruptedException; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -17,213 +21,173 @@ import java.util.Set; import de.blinkt.openvpn.VpnProfile; -import android.app.Activity; -import android.content.Context; -import android.content.SharedPreferences; -import android.content.SharedPreferences.Editor; -import android.preference.PreferenceManager; - public class ProfileManager { - private static final String PREFS_NAME = "VPNList"; + private static final String PREFS_NAME = "VPNList"; + private static final String LAST_CONNECTED_PROFILE = "lastConnectedProfile"; + private static ProfileManager instance; + private static VpnProfile mLastConnectedVpn = null; + private HashMap profiles = new HashMap<>(); + private static VpnProfile tmpprofile = null; - private static final String LAST_CONNECTED_PROFILE = "lastConnectedProfile"; + private static VpnProfile get(String key) { + if (tmpprofile != null && tmpprofile.getUUIDString().equals(key)) + return tmpprofile; + if (instance == null) + return null; + return instance.profiles.get(key); + + } - private static ProfileManager instance; + private ProfileManager() { + } + private static void checkInstance(Context context) { + if (instance == null) { + instance = new ProfileManager(); + instance.loadVPNList(context); + } + } - private static VpnProfile mLastConnectedVpn=null; - private HashMap profiles=new HashMap(); - private static VpnProfile tmpprofile=null; + synchronized public static ProfileManager getInstance(Context context) { + checkInstance(context); + return instance; + } + public static void setConntectedVpnProfileDisconnected(Context c) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); + Editor prefsedit = prefs.edit(); + prefsedit.putString(LAST_CONNECTED_PROFILE, null); + prefsedit.apply(); - private static VpnProfile get(String key) { - if (tmpprofile!=null && tmpprofile.getUUIDString().equals(key)) - return tmpprofile; - - if(instance==null) - return null; - return instance.profiles.get(key); - - } + } + public static void setConnectedVpnProfile(Context c, VpnProfile connectedrofile) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); + Editor prefsedit = prefs.edit(); - - private ProfileManager() { } - - private static void checkInstance(Context context) { - if(instance == null) { - instance = new ProfileManager(); - instance.loadVPNList(context); - } - } + prefsedit.putString(LAST_CONNECTED_PROFILE, connectedrofile.getUUIDString()); + prefsedit.apply(); + mLastConnectedVpn = connectedrofile; - synchronized public static ProfileManager getInstance(Context context) { - checkInstance(context); - return instance; - } - - public static void setConntectedVpnProfileDisconnected(Context c) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); - Editor prefsedit = prefs.edit(); - prefsedit.putString(LAST_CONNECTED_PROFILE, null); - prefsedit.apply(); - - } + } - public static void setConnectedVpnProfile(Context c, VpnProfile connectedrofile) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); - Editor prefsedit = prefs.edit(); - - prefsedit.putString(LAST_CONNECTED_PROFILE, connectedrofile.getUUIDString()); - prefsedit.apply(); - mLastConnectedVpn=connectedrofile; - - } - - public static VpnProfile getLastConnectedProfile(Context c, boolean onBoot) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); + public static VpnProfile getLastConnectedProfile(Context c, boolean onBoot) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); - boolean useStartOnBoot = prefs.getBoolean("restartvpnonboot", false); + boolean useStartOnBoot = prefs.getBoolean("restartvpnonboot", false); if (onBoot && !useStartOnBoot) return null; - - String lastConnectedProfile = prefs.getString(LAST_CONNECTED_PROFILE, null); - if(lastConnectedProfile!=null) - return get(c, lastConnectedProfile); - else - return null; - } - - - - - public Collection getProfiles() { - return profiles.values(); - } - - public VpnProfile getProfileByName(String name) { - for (VpnProfile vpnp : profiles.values()) { - if(vpnp.getName().equals(name)) { - return vpnp; - } - } - return null; - } - - public void saveProfileList(Context context) { - SharedPreferences sharedprefs = context.getSharedPreferences(PREFS_NAME,Activity.MODE_PRIVATE); - Editor editor = sharedprefs.edit(); - editor.putStringSet("vpnlist", profiles.keySet()); - - // For reasing I do not understand at all - // Android saves my prefs file only one time - // if I remove the debug code below :( - int counter = sharedprefs.getInt("counter", 0); - editor.putInt("counter", counter+1); - editor.apply(); - - } - - public void addProfile(VpnProfile profile) { - profiles.put(profile.getUUID().toString(),profile); - - } - - public static void setTemporaryProfile(VpnProfile tmp) { - ProfileManager.tmpprofile = tmp; - } - - - public void saveProfile(Context context,VpnProfile profile) { - // First let basic settings save its state - - ObjectOutputStream vpnfile; - try { - vpnfile = new ObjectOutputStream(context.openFileOutput((profile.getUUID().toString() + ".vp"),Activity.MODE_PRIVATE)); - - vpnfile.writeObject(profile); - vpnfile.flush(); - vpnfile.close(); - } catch (FileNotFoundException e) { - VpnStatus.logException("saving VPN profile", e); - throw new RuntimeException(e); - } catch (IOException e) { - VpnStatus.logException("saving VPN profile", e); - throw new RuntimeException(e); - } - } - - - private void loadVPNList(Context context) { - profiles = new HashMap(); - SharedPreferences listpref = context.getSharedPreferences(PREFS_NAME,Activity.MODE_PRIVATE); - Set vlist = listpref.getStringSet("vpnlist", null); - Exception exp =null; - if(vlist==null){ - vlist = new HashSet(); - } - - for (String vpnentry : vlist) { - try { - ObjectInputStream vpnfile = new ObjectInputStream(context.openFileInput(vpnentry + ".vp")); - VpnProfile vp = ((VpnProfile) vpnfile.readObject()); - - // Sanity check - if(vp==null || vp.mName==null || vp.getUUID()==null) - continue; + String lastConnectedProfile = prefs.getString(LAST_CONNECTED_PROFILE, null); + if (lastConnectedProfile != null) + return get(c, lastConnectedProfile); + else + return null; + } - vp.upgradeProfile(); - profiles.put(vp.getUUID().toString(), vp); - } catch (StreamCorruptedException e) { - exp=e; - } catch (FileNotFoundException e) { - exp=e; - } catch (IOException e) { - exp=e; - } catch (ClassNotFoundException e) { - exp=e; - } - if(exp!=null) { - VpnStatus.logException("Loading VPN List",exp); - } - } - } + public Collection getProfiles() { + return profiles.values(); + } + + public VpnProfile getProfileByName(String name) { + for (VpnProfile vpnp : profiles.values()) { + if (vpnp.getName().equals(name)) { + return vpnp; + } + } + return null; + } + + public void saveProfileList(Context context) { + SharedPreferences sharedprefs = context.getSharedPreferences(PREFS_NAME, Activity.MODE_PRIVATE); + Editor editor = sharedprefs.edit(); + editor.putStringSet("vpnlist", profiles.keySet()); + + // For reasing I do not understand at all + // Android saves my prefs file only one time + // if I remove the debug code below :( + int counter = sharedprefs.getInt("counter", 0); + editor.putInt("counter", counter + 1); + editor.apply(); + + } + + public void addProfile(VpnProfile profile) { + profiles.put(profile.getUUID().toString(), profile); + + } - public int getNumberOfProfiles() { - return profiles.size(); - } + public static void setTemporaryProfile(VpnProfile tmp) { + ProfileManager.tmpprofile = tmp; + } + public void saveProfile(Context context, VpnProfile profile) { + ObjectOutputStream vpnfile; + try { + vpnfile = new ObjectOutputStream(context.openFileOutput((profile.getUUID().toString() + ".vp"), Activity.MODE_PRIVATE)); - public void removeProfile(Context context,VpnProfile profile) { - String vpnentry = profile.getUUID().toString(); - profiles.remove(vpnentry); - saveProfileList(context); - context.deleteFile(vpnentry + ".vp"); - if(mLastConnectedVpn==profile) - mLastConnectedVpn=null; - - } + vpnfile.writeObject(profile); + vpnfile.flush(); + vpnfile.close(); + } catch (IOException e) { + VpnStatus.logException("saving VPN profile", e); + throw new RuntimeException(e); + } + } + + + private void loadVPNList(Context context) { + profiles = new HashMap<>(); + SharedPreferences listpref = context.getSharedPreferences(PREFS_NAME, Activity.MODE_PRIVATE); + Set vlist = listpref.getStringSet("vpnlist", null); + if (vlist == null) { + vlist = new HashSet<>(); + } + + for (String vpnentry : vlist) { + try { + ObjectInputStream vpnfile = new ObjectInputStream(context.openFileInput(vpnentry + ".vp")); + VpnProfile vp = ((VpnProfile) vpnfile.readObject()); + + // Sanity check + if (vp == null || vp.mName == null || vp.getUUID() == null) + continue; + + vp.upgradeProfile(); + profiles.put(vp.getUUID().toString(), vp); + } catch (IOException | ClassNotFoundException e) { + VpnStatus.logException("Loading VPN List", e); + } + } + } - public static VpnProfile get(Context context, String profileUUID) { - checkInstance(context); - return get(profileUUID); - } + public void removeProfile(Context context, VpnProfile profile) { + String vpnentry = profile.getUUID().toString(); + profiles.remove(vpnentry); + saveProfileList(context); + context.deleteFile(vpnentry + ".vp"); + if (mLastConnectedVpn == profile) + mLastConnectedVpn = null; + } + public static VpnProfile get(Context context, String profileUUID) { + checkInstance(context); + return get(profileUUID); + } - public static VpnProfile getLastConnectedVpn() { - return mLastConnectedVpn; - } + public static VpnProfile getLastConnectedVpn() { + return mLastConnectedVpn; + } } diff --git a/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java b/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java index 73ed05bc..47cb633c 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java +++ b/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java @@ -8,7 +8,6 @@ package de.blinkt.openvpn.core; import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; -import android.content.pm.ApplicationInfo; import android.os.Build; import java.io.File; @@ -67,14 +66,14 @@ public class VPNLaunchHelper { public static String[] buildOpenvpnArgv(Context c) { - Vector args = new Vector(); + Vector args = new Vector<>(); // Add fixed paramenters //args.add("/data/data/de.blinkt.openvpn/lib/openvpn"); args.add(writeMiniVPN(c)); args.add("--config"); - args.add(c.getCacheDir().getAbsolutePath() + "/" + OVPNCONFIGFILE); + args.add(getConfigFilePath(c)); return args.toArray(new String[args.size()]); } diff --git a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index ffc8097d..dc3fa1c7 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -6,6 +6,7 @@ package de.blinkt.openvpn.core; import android.annotation.SuppressLint; +import android.app.Activity; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; @@ -14,10 +15,10 @@ import android.content.pm.Signature; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; -import se.leap.bitmaskclient.R; +import android.text.TextUtils; import java.io.ByteArrayInputStream; -import java.io.FileNotFoundException; +import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; import java.security.MessageDigest; @@ -32,28 +33,30 @@ import java.util.Locale; import java.util.UnknownFormatConversionException; import java.util.Vector; +import se.leap.bitmaskclient.R; + public class VpnStatus { - public static LinkedList logbuffer; + public static LinkedList logbuffer; - private static Vector logListener; - private static Vector stateListener; - private static Vector byteCountListener; + private static Vector logListener; + private static Vector stateListener; + private static Vector byteCountListener; - private static String mLaststatemsg=""; + private static String mLaststatemsg = ""; - private static String mLaststate = "NOPROCESS"; + private static String mLaststate = "NOPROCESS"; - private static int mLastStateresid=R.string.state_noprocess; + private static int mLastStateresid = R.string.state_noprocess; - private static long mlastByteCount[]={0,0,0,0}; + private static long mlastByteCount[] = {0, 0, 0, 0}; - public static void logException(LogLevel ll, String context, Exception e) { + public static void logException(LogLevel ll, String context, Exception e) { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); LogItem li; - if (context !=null) { + if (context != null) { li = new LogItem(ll, R.string.unhandled_exception_context, e.getMessage(), sw.toString(), context); } else { li = new LogItem(ll, R.string.unhandled_exception, e.getMessage(), sw.toString()); @@ -71,18 +74,16 @@ public class VpnStatus { private static final int MAXLOGENTRIES = 1000; - public static final String MANAGMENT_PREFIX = "M:"; - public enum ConnectionStatus { LEVEL_CONNECTED, LEVEL_VPNPAUSED, LEVEL_CONNECTING_SERVER_REPLIED, LEVEL_CONNECTING_NO_SERVER_REPLY_YET, LEVEL_NONETWORK, - LEVEL_NOTCONNECTED, - LEVEL_AUTH_FAILED, - LEVEL_WAITING_FOR_USER_INPUT, - UNKNOWN_LEVEL + LEVEL_NOTCONNECTED, + LEVEL_AUTH_FAILED, + LEVEL_WAITING_FOR_USER_INPUT, + UNKNOWN_LEVEL } public enum LogLevel { @@ -93,6 +94,7 @@ public class VpnStatus { DEBUG(4); protected int mValue; + LogLevel(int value) { mValue = value; } @@ -103,59 +105,64 @@ public class VpnStatus { public static LogLevel getEnumByValue(int value) { switch (value) { - case 1: return INFO; - case 2: return ERROR; - case 3: return WARNING; - case 4: return DEBUG; - default: return null; + case 1: + return INFO; + case 2: + return ERROR; + case 3: + return WARNING; + case 4: + return DEBUG; + default: + return null; } } } // keytool -printcert -jarfile de.blinkt.openvpn_85.apk - public static final byte[] officalkey = {-58, -42, -44, -106, 90, -88, -87, -88, -52, -124, 84, 117, 66, 79, -112, -111, -46, 86, -37, 109}; - public static final byte[] officaldebugkey = {-99, -69, 45, 71, 114, -116, 82, 66, -99, -122, 50, -70, -56, -111, 98, -35, -65, 105, 82, 43}; - public static final byte[] amazonkey = {-116, -115, -118, -89, -116, -112, 120, 55, 79, -8, -119, -23, 106, -114, -85, -56, -4, 105, 26, -57}; + public static final byte[] officalkey = {-58, -42, -44, -106, 90, -88, -87, -88, -52, -124, 84, 117, 66, 79, -112, -111, -46, 86, -37, 109}; + public static final byte[] officaldebugkey = {-99, -69, 45, 71, 114, -116, 82, 66, -99, -122, 50, -70, -56, -111, 98, -35, -65, 105, 82, 43}; + public static final byte[] amazonkey = {-116, -115, -118, -89, -116, -112, 120, 55, 79, -8, -119, -23, 106, -114, -85, -56, -4, 105, 26, -57}; public static final byte[] fdroidkey = {-92, 111, -42, -46, 123, -96, -60, 79, -27, -31, 49, 103, 11, -54, -68, -27, 17, 2, 121, 104}; - private static ConnectionStatus mLastLevel=ConnectionStatus.LEVEL_NOTCONNECTED; + private static ConnectionStatus mLastLevel = ConnectionStatus.LEVEL_NOTCONNECTED; - static { - logbuffer = new LinkedList(); - logListener = new Vector(); - stateListener = new Vector(); - byteCountListener = new Vector(); - logInformation(); - } + static { + logbuffer = new LinkedList<>(); + logListener = new Vector<>(); + stateListener = new Vector<>(); + byteCountListener = new Vector<>(); + logInformation(); + } - public static class LogItem implements Parcelable { + public static class LogItem implements Parcelable { - private Object [] mArgs = null; - private String mMessage = null; - private int mRessourceId; - // Default log priority - LogLevel mLevel = LogLevel.INFO; - private long logtime = System.currentTimeMillis(); + private Object[] mArgs = null; + private String mMessage = null; + private int mRessourceId; + // Default log priority + LogLevel mLevel = LogLevel.INFO; + private long logtime = System.currentTimeMillis(); private int mVerbosityLevel = -1; - private LogItem(int ressourceId, Object[] args) { - mRessourceId = ressourceId; - mArgs = args; - } + private LogItem(int ressourceId, Object[] args) { + mRessourceId = ressourceId; + mArgs = args; + } public LogItem(LogLevel level, int verblevel, String message) { - mMessage=message; + mMessage = message; mLevel = level; mVerbosityLevel = verblevel; } @Override - public int describeContents() { - return 0; - } + public int describeContents() { + return 0; + } @Override @@ -169,65 +176,65 @@ public class VpnStatus { dest.writeLong(logtime); } - public LogItem(Parcel in) { - mArgs = in.readArray(Object.class.getClassLoader()); - mMessage = in.readString(); - mRessourceId = in.readInt(); - mLevel = LogLevel.getEnumByValue(in.readInt()); + public LogItem(Parcel in) { + mArgs = in.readArray(Object.class.getClassLoader()); + mMessage = in.readString(); + mRessourceId = in.readInt(); + mLevel = LogLevel.getEnumByValue(in.readInt()); mVerbosityLevel = in.readInt(); - logtime = in.readLong(); - } + logtime = in.readLong(); + } - public static final Parcelable.Creator CREATOR - = new Parcelable.Creator() { - public LogItem createFromParcel(Parcel in) { - return new LogItem(in); - } + public static final Parcelable.Creator CREATOR + = new Parcelable.Creator() { + public LogItem createFromParcel(Parcel in) { + return new LogItem(in); + } - public LogItem[] newArray(int size) { - return new LogItem[size]; - } - }; + public LogItem[] newArray(int size) { + return new LogItem[size]; + } + }; - public LogItem(LogLevel loglevel,int ressourceId, Object... args) { + public LogItem(LogLevel loglevel, int ressourceId, Object... args) { mRessourceId = ressourceId; - mArgs =args; + mArgs = args; mLevel = loglevel; } - public LogItem(LogLevel loglevel, String msg) { - mLevel = loglevel; - mMessage = msg; - } + public LogItem(LogLevel loglevel, String msg) { + mLevel = loglevel; + mMessage = msg; + } - public LogItem(LogLevel loglevel, int ressourceId) { - mRessourceId =ressourceId; - mLevel = loglevel; - } + public LogItem(LogLevel loglevel, int ressourceId) { + mRessourceId = ressourceId; + mLevel = loglevel; + } - public String getString(Context c) { + public String getString(Context c) { try { - if(mMessage !=null) { - return mMessage; - } else { - if(c!=null) { - if(mRessourceId==R.string.mobile_info) - return getMobileInfoString(c); - if(mArgs == null) - return c.getString(mRessourceId); - else - return c.getString(mRessourceId,mArgs); - } else { - String str = String.format(Locale.ENGLISH,"Log (no context) resid %d", mRessourceId); - if(mArgs !=null) - for(Object o:mArgs) - str += "|" + o.toString(); - - return str; - } - } + if (mMessage != null) { + return mMessage; + } else { + if (c != null) { + if (mRessourceId == R.string.mobile_info) + return getMobileInfoString(c); + if (mArgs == null) + return c.getString(mRessourceId); + else + return c.getString(mRessourceId, mArgs); + } else { + String str = String.format(Locale.ENGLISH, "Log (no context) resid %d", mRessourceId); + if (mArgs != null) + str += TextUtils.join("|", mArgs); + + + return str; + } + } } catch (UnknownFormatConversionException e) { if (c != null) throw new UnknownFormatConversionException(e.getLocalizedMessage() + getString(null)); @@ -235,68 +242,66 @@ public class VpnStatus { throw e; } catch (java.util.FormatFlagsConversionMismatchException e) { if (c != null) - throw new FormatFlagsConversionMismatchException(e.getLocalizedMessage() + getString(null),e.getConversion()); + throw new FormatFlagsConversionMismatchException(e.getLocalizedMessage() + getString(null), e.getConversion()); else throw e; } - } + } - public LogLevel getLogLevel() - { + public LogLevel getLogLevel() { return mLevel; } // The lint is wrong here - @SuppressLint("StringFormatMatches") - private String getMobileInfoString(Context c) { - c.getPackageManager(); - String apksign="error getting package signature"; - - String version="error getting version"; - try { - Signature raw = c.getPackageManager().getPackageInfo(c.getPackageName(), PackageManager.GET_SIGNATURES).signatures[0]; - CertificateFactory cf = CertificateFactory.getInstance("X.509"); - X509Certificate cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(raw.toByteArray())); - MessageDigest md = MessageDigest.getInstance("SHA-1"); - byte[] der = cert.getEncoded(); - md.update(der); - byte[] digest = md.digest(); - - if (Arrays.equals(digest, officalkey)) - apksign = c.getString(R.string.official_build); - else if (Arrays.equals(digest, officaldebugkey)) - apksign = c.getString(R.string.debug_build); - else if (Arrays.equals(digest, amazonkey)) - apksign = "amazon version"; - else if (Arrays.equals(digest, fdroidkey)) + @SuppressLint("StringFormatMatches") + private String getMobileInfoString(Context c) { + c.getPackageManager(); + String apksign = "error getting package signature"; + + String version = "error getting version"; + try { + Signature raw = c.getPackageManager().getPackageInfo(c.getPackageName(), PackageManager.GET_SIGNATURES).signatures[0]; + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + X509Certificate cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(raw.toByteArray())); + MessageDigest md = MessageDigest.getInstance("SHA-1"); + byte[] der = cert.getEncoded(); + md.update(der); + byte[] digest = md.digest(); + + if (Arrays.equals(digest, officalkey)) + apksign = c.getString(R.string.official_build); + else if (Arrays.equals(digest, officaldebugkey)) + apksign = c.getString(R.string.debug_build); + else if (Arrays.equals(digest, amazonkey)) + apksign = "amazon version"; + else if (Arrays.equals(digest, fdroidkey)) apksign = "F-Droid built and signed version"; else - apksign = c.getString(R.string.built_by,cert.getSubjectX500Principal().getName()); + apksign = c.getString(R.string.built_by, cert.getSubjectX500Principal().getName()); - PackageInfo packageinfo = c.getPackageManager().getPackageInfo(c.getPackageName(), 0); - version = packageinfo.versionName; + PackageInfo packageinfo = c.getPackageManager().getPackageInfo(c.getPackageName(), 0); + version = packageinfo.versionName; - } catch (NameNotFoundException e) { - } catch (CertificateException e) { - } catch (NoSuchAlgorithmException e) { - } + } catch (NameNotFoundException | CertificateException | + NoSuchAlgorithmException ignored) { + } - Object[] argsext = Arrays.copyOf(mArgs, mArgs.length+2); - argsext[argsext.length-1]=apksign; - argsext[argsext.length-2]=version; + Object[] argsext = Arrays.copyOf(mArgs, mArgs.length + 2); + argsext[argsext.length - 1] = apksign; + argsext[argsext.length - 2] = version; - return c.getString(R.string.mobile_info_extended, argsext); + return c.getString(R.string.mobile_info_extended, argsext); - } + } - public long getLogtime() { - return logtime; - } + public long getLogtime() { + return logtime; + } public int getVerbosityLevel() { - if (mVerbosityLevel==-1) { + if (mVerbosityLevel == -1) { // Hack: // For message not from OpenVPN, report the status level as log level return mLevel.getInt(); @@ -305,90 +310,94 @@ public class VpnStatus { } } + public void saveLogToDisk(Context c) { + + new File(c.getCacheDir(), "log.xml"); + + + } + + public interface LogListener { + void newLog(LogItem logItem); + } + public interface StateListener { + void updateState(String state, String logmessage, int localizedResId, ConnectionStatus level); + } - public interface LogListener { - void newLog(LogItem logItem); - } - - public interface StateListener { - void updateState(String state, String logmessage, int localizedResId, ConnectionStatus level); - } - - public interface ByteCountListener { - void updateByteCount(long in, long out, long diffIn, long diffOut); - } - - public synchronized static void logMessage(LogLevel level,String prefix, String message) - { - newLogItem(new LogItem(level, prefix + message)); - - } - - public synchronized static void clearLog() { - logbuffer.clear(); - logInformation(); - } - - private static void logInformation() { - logInfo(R.string.mobile_info,Build.MODEL, Build.BOARD,Build.BRAND,Build.VERSION.SDK_INT); - } - - public synchronized static void addLogListener(LogListener ll){ - logListener.add(ll); - } - - public synchronized static void removeLogListener(LogListener ll) { - logListener.remove(ll); - } - - public synchronized static void addByteCountListener(ByteCountListener bcl) { - bcl.updateByteCount(mlastByteCount[0], mlastByteCount[1], mlastByteCount[2], mlastByteCount[3]); - byteCountListener.add(bcl); - } - - public synchronized static void removeByteCountListener(ByteCountListener bcl) { - byteCountListener.remove(bcl); - } - - - public synchronized static void addStateListener(StateListener sl){ - if(!stateListener.contains(sl)){ - stateListener.add(sl); - if(mLaststate!=null) - sl.updateState(mLaststate, mLaststatemsg, mLastStateresid, mLastLevel); - } - } - - private static int getLocalizedState(String state){ - if (state.equals("CONNECTING")) - return R.string.state_connecting; - else if (state.equals("WAIT")) - return R.string.state_wait; - else if (state.equals("AUTH")) - return R.string.state_auth; - else if (state.equals("GET_CONFIG")) - return R.string.state_get_config; - else if (state.equals("ASSIGN_IP")) - return R.string.state_assign_ip; - else if (state.equals("ADD_ROUTES")) - return R.string.state_add_routes; - else if (state.equals("CONNECTED")) - return R.string.state_connected; - else if (state.equals("DISCONNECTED")) - return R.string.state_disconnected; - else if (state.equals("RECONNECTING")) - return R.string.state_reconnecting; - else if (state.equals("EXITING")) - return R.string.state_exiting; - else if (state.equals("RESOLVE")) - return R.string.state_resolve; - else if (state.equals("TCP_CONNECT")) - return R.string.state_tcp_connect; - else - return R.string.unknown_state; - - } + public interface ByteCountListener { + void updateByteCount(long in, long out, long diffIn, long diffOut); + } + + public synchronized static void logMessage(LogLevel level, String prefix, String message) { + newLogItem(new LogItem(level, prefix + message)); + + } + + public synchronized static void clearLog() { + logbuffer.clear(); + logInformation(); + } + + private static void logInformation() { + logInfo(R.string.mobile_info, Build.MODEL, Build.BOARD, Build.BRAND, Build.VERSION.SDK_INT); + } + + public synchronized static void addLogListener(LogListener ll) { + logListener.add(ll); + } + + public synchronized static void removeLogListener(LogListener ll) { + logListener.remove(ll); + } + + public synchronized static void addByteCountListener(ByteCountListener bcl) { + bcl.updateByteCount(mlastByteCount[0], mlastByteCount[1], mlastByteCount[2], mlastByteCount[3]); + byteCountListener.add(bcl); + } + + public synchronized static void removeByteCountListener(ByteCountListener bcl) { + byteCountListener.remove(bcl); + } + + + public synchronized static void addStateListener(StateListener sl) { + if (!stateListener.contains(sl)) { + stateListener.add(sl); + if (mLaststate != null) + sl.updateState(mLaststate, mLaststatemsg, mLastStateresid, mLastLevel); + } + } + + private static int getLocalizedState(String state) { + if (state.equals("CONNECTING")) + return R.string.state_connecting; + else if (state.equals("WAIT")) + return R.string.state_wait; + else if (state.equals("AUTH")) + return R.string.state_auth; + else if (state.equals("GET_CONFIG")) + return R.string.state_get_config; + else if (state.equals("ASSIGN_IP")) + return R.string.state_assign_ip; + else if (state.equals("ADD_ROUTES")) + return R.string.state_add_routes; + else if (state.equals("CONNECTED")) + return R.string.state_connected; + else if (state.equals("DISCONNECTED")) + return R.string.state_disconnected; + else if (state.equals("RECONNECTING")) + return R.string.state_reconnecting; + else if (state.equals("EXITING")) + return R.string.state_exiting; + else if (state.equals("RESOLVE")) + return R.string.state_resolve; + else if (state.equals("TCP_CONNECT")) + return R.string.state_tcp_connect; + else + return R.string.unknown_state; + + } public static void updateStatePause(OpenVPNManagement.pauseReason pauseReason) { switch (pauseReason) { @@ -405,88 +414,84 @@ public class VpnStatus { } - private static ConnectionStatus getLevel(String state){ - String[] noreplyet = {"CONNECTING","WAIT", "RECONNECTING", "RESOLVE", "TCP_CONNECT"}; - String[] reply = {"AUTH","GET_CONFIG","ASSIGN_IP","ADD_ROUTES"}; - String[] connected = {"CONNECTED"}; - String[] notconnected = {"DISCONNECTED", "EXITING"}; - - for(String x:noreplyet) - if(state.equals(x)) - return ConnectionStatus.LEVEL_CONNECTING_NO_SERVER_REPLY_YET; - - for(String x:reply) - if(state.equals(x)) - return ConnectionStatus.LEVEL_CONNECTING_SERVER_REPLIED; + private static ConnectionStatus getLevel(String state) { + String[] noreplyet = {"CONNECTING", "WAIT", "RECONNECTING", "RESOLVE", "TCP_CONNECT"}; + String[] reply = {"AUTH", "GET_CONFIG", "ASSIGN_IP", "ADD_ROUTES"}; + String[] connected = {"CONNECTED"}; + String[] notconnected = {"DISCONNECTED", "EXITING"}; - for(String x:connected) - if(state.equals(x)) - return ConnectionStatus.LEVEL_CONNECTED; + for (String x : noreplyet) + if (state.equals(x)) + return ConnectionStatus.LEVEL_CONNECTING_NO_SERVER_REPLY_YET; - for(String x:notconnected) - if(state.equals(x)) - return ConnectionStatus.LEVEL_NOTCONNECTED; + for (String x : reply) + if (state.equals(x)) + return ConnectionStatus.LEVEL_CONNECTING_SERVER_REPLIED; - return ConnectionStatus.UNKNOWN_LEVEL; + for (String x : connected) + if (state.equals(x)) + return ConnectionStatus.LEVEL_CONNECTED; - } + for (String x : notconnected) + if (state.equals(x)) + return ConnectionStatus.LEVEL_NOTCONNECTED; + return ConnectionStatus.UNKNOWN_LEVEL; + } - public synchronized static void removeStateListener(StateListener sl) { - stateListener.remove(sl); - } + public synchronized static void removeStateListener(StateListener sl) { + stateListener.remove(sl); + } - synchronized public static LogItem[] getlogbuffer() { + synchronized public static LogItem[] getlogbuffer() { - // The stoned way of java to return an array from a vector - // brought to you by eclipse auto complete - return logbuffer.toArray(new LogItem[logbuffer.size()]); + // The stoned way of java to return an array from a vector + // brought to you by eclipse auto complete + return logbuffer.toArray(new LogItem[logbuffer.size()]); - } + } - public static void updateStateString (String state, String msg) { - int rid = getLocalizedState(state); - ConnectionStatus level = getLevel(state); - updateStateString(state, msg, rid, level); - } + public static void updateStateString(String state, String msg) { + int rid = getLocalizedState(state); + ConnectionStatus level = getLevel(state); + updateStateString(state, msg, rid, level); + } - public synchronized static void updateStateString(String state, String msg, int resid, ConnectionStatus level) { + public synchronized static void updateStateString(String state, String msg, int resid, ConnectionStatus level) { // Workound for OpenVPN doing AUTH and wait and being connected // Simply ignore these state if (mLastLevel == ConnectionStatus.LEVEL_CONNECTED && - (state.equals("WAIT") || state.equals("AUTH"))) - { - newLogItem(new LogItem((LogLevel.DEBUG), String.format("Ignoring OpenVPN Status in CONNECTED state (%s->%s): %s",state,level.toString(),msg))); + (state.equals("WAIT") || state.equals("AUTH"))) { + newLogItem(new LogItem((LogLevel.DEBUG), String.format("Ignoring OpenVPN Status in CONNECTED state (%s->%s): %s", state, level.toString(), msg))); return; } - mLaststate= state; - mLaststatemsg = msg; - mLastStateresid = resid; - mLastLevel = level; - + mLaststate = state; + mLaststatemsg = msg; + mLastStateresid = resid; + mLastLevel = level; for (StateListener sl : stateListener) { - sl.updateState(state,msg,resid,level); - } + sl.updateState(state, msg, resid, level); + } //newLogItem(new LogItem((LogLevel.DEBUG), String.format("New OpenVPN Status (%s->%s): %s",state,level.toString(),msg))); - } + } - public static void logInfo(String message) { - newLogItem(new LogItem(LogLevel.INFO, message)); - } + public static void logInfo(String message) { + newLogItem(new LogItem(LogLevel.INFO, message)); + } public static void logDebug(String message) { newLogItem(new LogItem(LogLevel.DEBUG, message)); } public static void logInfo(int resourceId, Object... args) { - newLogItem(new LogItem(LogLevel.INFO, resourceId, args)); - } + newLogItem(new LogItem(LogLevel.INFO, resourceId, args)); + } public static void logDebug(int resourceId, Object... args) { newLogItem(new LogItem(LogLevel.DEBUG, resourceId, args)); @@ -494,19 +499,19 @@ public class VpnStatus { private synchronized static void newLogItem(LogItem logItem) { - logbuffer.addLast(logItem); - if(logbuffer.size()>MAXLOGENTRIES) - logbuffer.removeFirst(); + logbuffer.addLast(logItem); + if (logbuffer.size() > MAXLOGENTRIES) + logbuffer.removeFirst(); - for (LogListener ll : logListener) { - ll.newLog(logItem); - } - } + for (LogListener ll : logListener) { + ll.newLog(logItem); + } + } - public static void logError(String msg) { - newLogItem(new LogItem(LogLevel.ERROR, msg)); + public static void logError(String msg) { + newLogItem(new LogItem(LogLevel.ERROR, msg)); - } + } public static void logWarning(int resourceId, Object... args) { newLogItem(new LogItem(LogLevel.WARNING, resourceId, args)); @@ -518,11 +523,12 @@ public class VpnStatus { public static void logError(int resourceId) { - newLogItem(new LogItem(LogLevel.ERROR, resourceId)); - } - public static void logError(int resourceId, Object... args) { - newLogItem(new LogItem(LogLevel.ERROR, resourceId, args)); - } + newLogItem(new LogItem(LogLevel.ERROR, resourceId)); + } + + public static void logError(int resourceId, Object... args) { + newLogItem(new LogItem(LogLevel.ERROR, resourceId, args)); + } public static void logMessageOpenVPN(LogLevel level, int ovpnlevel, String message) { newLogItem(new LogItem(level, ovpnlevel, message)); @@ -531,19 +537,17 @@ public class VpnStatus { public static synchronized void updateByteCount(long in, long out) { - long lastIn = mlastByteCount[0]; - long lastOut = mlastByteCount[1]; - long diffIn = mlastByteCount[2] = in - lastIn; - long diffOut = mlastByteCount[3] = out - lastOut; - - - - mlastByteCount = new long[] {in,out,diffIn,diffOut}; - for(ByteCountListener bcl:byteCountListener){ - bcl.updateByteCount(in, out, diffIn,diffOut); - } - } + long lastIn = mlastByteCount[0]; + long lastOut = mlastByteCount[1]; + long diffIn = mlastByteCount[2] = in - lastIn; + long diffOut = mlastByteCount[3] = out - lastOut; + + mlastByteCount = new long[]{in, out, diffIn, diffOut}; + for (ByteCountListener bcl : byteCountListener) { + bcl.updateByteCount(in, out, diffIn, diffOut); + } + } } diff --git a/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java b/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java index 92bf9ad3..2a75c15e 100644 --- a/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java +++ b/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java @@ -5,8 +5,6 @@ package de.blinkt.openvpn.fragments; -import se.leap.bitmaskclient.R; - import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; diff --git a/app/src/main/java/org/spongycastle/util/encoders/Base64.java b/app/src/main/java/org/spongycastle/util/encoders/Base64.java index 87bd80a0..0993e7be 100644 --- a/app/src/main/java/org/spongycastle/util/encoders/Base64.java +++ b/app/src/main/java/org/spongycastle/util/encoders/Base64.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.encoders; import java.io.ByteArrayOutputStream; diff --git a/app/src/main/java/org/spongycastle/util/encoders/Base64Encoder.java b/app/src/main/java/org/spongycastle/util/encoders/Base64Encoder.java index 84060707..4248bb8b 100644 --- a/app/src/main/java/org/spongycastle/util/encoders/Base64Encoder.java +++ b/app/src/main/java/org/spongycastle/util/encoders/Base64Encoder.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.encoders; import java.io.IOException; diff --git a/app/src/main/java/org/spongycastle/util/encoders/Encoder.java b/app/src/main/java/org/spongycastle/util/encoders/Encoder.java index 106c36b7..2007ac3e 100644 --- a/app/src/main/java/org/spongycastle/util/encoders/Encoder.java +++ b/app/src/main/java/org/spongycastle/util/encoders/Encoder.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.encoders; import java.io.IOException; diff --git a/app/src/main/java/org/spongycastle/util/io/pem/PemGenerationException.java b/app/src/main/java/org/spongycastle/util/io/pem/PemGenerationException.java index 0127ca0c..b9474ed3 100644 --- a/app/src/main/java/org/spongycastle/util/io/pem/PemGenerationException.java +++ b/app/src/main/java/org/spongycastle/util/io/pem/PemGenerationException.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.io.pem; import java.io.IOException; diff --git a/app/src/main/java/org/spongycastle/util/io/pem/PemHeader.java b/app/src/main/java/org/spongycastle/util/io/pem/PemHeader.java index 4adb815e..6d655c87 100644 --- a/app/src/main/java/org/spongycastle/util/io/pem/PemHeader.java +++ b/app/src/main/java/org/spongycastle/util/io/pem/PemHeader.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.io.pem; public class PemHeader diff --git a/app/src/main/java/org/spongycastle/util/io/pem/PemObject.java b/app/src/main/java/org/spongycastle/util/io/pem/PemObject.java index 6f7c79c5..59186e09 100644 --- a/app/src/main/java/org/spongycastle/util/io/pem/PemObject.java +++ b/app/src/main/java/org/spongycastle/util/io/pem/PemObject.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.io.pem; import java.util.ArrayList; diff --git a/app/src/main/java/org/spongycastle/util/io/pem/PemObjectGenerator.java b/app/src/main/java/org/spongycastle/util/io/pem/PemObjectGenerator.java index 1a8cea6d..ddce091c 100644 --- a/app/src/main/java/org/spongycastle/util/io/pem/PemObjectGenerator.java +++ b/app/src/main/java/org/spongycastle/util/io/pem/PemObjectGenerator.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.io.pem; public interface PemObjectGenerator diff --git a/app/src/main/java/org/spongycastle/util/io/pem/PemReader.java b/app/src/main/java/org/spongycastle/util/io/pem/PemReader.java index cbbebab9..0b3b55c4 100644 --- a/app/src/main/java/org/spongycastle/util/io/pem/PemReader.java +++ b/app/src/main/java/org/spongycastle/util/io/pem/PemReader.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.io.pem; import java.io.BufferedReader; @@ -49,7 +54,7 @@ public class PemReader { String line; String endMarker = END + type; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); List headers = new ArrayList(); while ((line = readLine()) != null) diff --git a/app/src/main/java/org/spongycastle/util/io/pem/PemWriter.java b/app/src/main/java/org/spongycastle/util/io/pem/PemWriter.java index f5a6a363..25730efd 100644 --- a/app/src/main/java/org/spongycastle/util/io/pem/PemWriter.java +++ b/app/src/main/java/org/spongycastle/util/io/pem/PemWriter.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2012-2014 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + package org.spongycastle.util.io.pem; import java.io.BufferedWriter; diff --git a/app/src/main/res/values-ca/strings-icsopenvpn.xml b/app/src/main/res/values-ca/strings-icsopenvpn.xml index ce7b8919..16147643 100755 --- a/app/src/main/res/values-ca/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ca/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Adreá del servidor: diff --git a/app/src/main/res/values-cs/strings-icsopenvpn.xml b/app/src/main/res/values-cs/strings-icsopenvpn.xml index 87a6bed1..12837f13 100755 --- a/app/src/main/res/values-cs/strings-icsopenvpn.xml +++ b/app/src/main/res/values-cs/strings-icsopenvpn.xml @@ -1,16 +1,14 @@ + - - - Adresa serveru: Port serveru: - Lokace + Cesta Nelze přečíst adresář Zvolit Storno @@ -348,4 +346,24 @@ Pokročilé nastavení Možnosti dat Nastevení TLS + Nedefinovaná protistrana + Duplicitní VPN profil + Duplicitní profil: %s + Zobrazit log + Rozdíly mezi OpenVPN klienty pro Android + Ignorovat vícesměrovou trasu: %s + Android podporuje ve VPN síti podporuje pouze CIDR trasy. Protože ne-CIDR trasy nejsou téměř nikdy používány, OpenVPN pro Android použije /32 pro trasy, které nejsou CIDR a zobrazí varování. + Sdílení připojení funguje během aktivního VPN spojení. Sdílené připojení NEpoužije VPN. + Dřívější KitKat verze nastavovaly špatnou hodnotu MSS na TCP spojení (#61948). OpenVPN automaticky zapne mssfix možnost pro obejití chyby. + VPN vůbec nefunguje pro vedlejší uživatele. + Ne-CIDR trasy + Proxy chování pro VPN + Přeinstalování VPN aplikací + %s a starší + Kopie %s + Trasa k nastavené IP adrese + Špatná hodnota MSS pro VPN spojení + Vedlejší uživaté tabletu + Vlastní možnosti + Odstranit položku připojení diff --git a/app/src/main/res/values-de/strings-icsopenvpn.xml b/app/src/main/res/values-de/strings-icsopenvpn.xml index ba667502..247eccd1 100755 --- a/app/src/main/res/values-de/strings-icsopenvpn.xml +++ b/app/src/main/res/values-de/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Server: @@ -89,7 +87,7 @@ Leitet allen Internet Verkehr über das VPN Benutze Default Route Benutze eigene Routen. Geben Sie Zielnetzwerk im CIDR Format an. Z.b. \"10.0.0.0/8 2002::/16\" würde die Netzwerke 10.0.0.0/8 und 2002::/16 über das VPN routen. - Netze, die nicht über das VPN geleitet werden sollen. Nutzt die gleiche Syntax wie die eigenen Routen. + Routen, die NICHT über das VPN geleitet werden sollen. Verwendet die gleiche Syntax wie bei den eigenen Routen. Eigene Routen Ausgeschlossene Netze Log Detail Level @@ -195,7 +193,7 @@ ICS OpenVPN Konfiguration Es werden keine DNS Server für die VPN Verbindung genutzt. Die Namensauflösung wird möglicherweise nicht funktionieren. Ziehen Sie in Erwähung selbst DNS Server in den Optionen zu setzen. Beachten Sie weiterhin, dass Android die Proxyeinstellungen für Handy/WLAN weiterhin benutzt, falls keine DNS Server für das VPN festgelegt sind. Konnte den DNS Server \"%1$s\" nicht hinzufügen, da das System ihn zurückweist mit %2$s - Konnte nicht die IP Adresse \"%1$s\" nicht setzen. Fehlermeldung des Systems: %2$s + Konnte die IP Adresse \"%1$s\" nicht setzen, abgelehnt vom System: %2$s <p>Benutzen Sie eine funktionierende Konfiguration (getestet auf einem Computer, oder von Ihrer Organisation/Ihrem Provider bereitgestellt)</p><p>Falls Sie nur eine einzelne Datei benötigen, können Sie sich diese als Email-Anhang zuschicken. Falls Ihre OpenVPN Konfiguration aus mehreren Dateien besteht, müssen Sie alle Dateien auf die SD Karte kopieren.</p><p>Klicken Sie auf den Email Anhang im Android Mail Programm bzw. benutzen Sie das Ordner Symbol in der VPN Liste und wählen Sie die .ovpn bzw. .conf Konfigurationsdatei aus.</p><p>Falls der Import fehlende Dateien anmerkt, kopieren Sie diese auf die SD Karte und starten den Import erneut.</p><p>Benutzen Sie anschließend das Speichern Symbol um das VPN zur VPN Liste hinzuzufügen</p><p>Tippen Sie den Namen des VPNs an, um das VPN zu starten</p><p>Achten Sie auf Fehler und Warnungen im Verbindungslog.</p> Schnellstart Versuche das tun.ko Kernel Modul zu laden. Benötigt root. @@ -259,7 +257,7 @@ Verbinde mit VPN %s Verbinde mit VPN %s Einige Versionen von Android 4.1 haben Probleme, wenn der Name des im Zertifikat Keystore gespeicherten Zertifikates nicht alphanumerische Zeichen (wie Leerzeichen, Unterstriche oder Bindestriche) enthält. Probieren Sie das Sie das Zertifikat mit einem Namen ohne Sonderzeichen zu importieren. - Verschlüsslungsalgorithmus + Verschlüsselungsalgorithmus Packetauthentifizierung Geben Sie den Authentifizierungsalgorithmus an Modell %1$s (%2$s) %3$s, Android API %4$d, version %5$s, %6$s @@ -351,4 +349,26 @@ Keine Server definiert VPN Profil duplizieren VPN Profil duplizieren: %s + Log anzeigen + Unterschiede zwischen Android OpenVPN Apps + Ignoriere Multicastroute: %s + Android unterstützt nur CIDR Routen. Da Routen, die nicht CIDR sind, fast nie verwendet werden, wird OpenVPN für Android eine /32 Route für nicht konforme Routen verwenden und eine Warnung ausgegeben. + Verbindungsfreigabe (WiFi-Hotspot/Tethering) funktioniert, während ein VPN aktiv ist, nutzt aber NICHT die VPN Verbindung. + Frühe KitKat-Version setzen einen falschen MSS-Wert für TCP-Verbindungen (#61948). Versuchen Sie die mssfix-Option zu aktivieren, um dieses Problem zu umgehen. + VPN funktioniert überhaupt nicht für die Sekundärnutzer. + Mehrere Benutzer berichten, dass die mobile Verbindung/Mobile Datenverbindung häufig getrennt wird, wenn ein VPN aktiv. Das Verhalten scheint nur einige Anbieter/Mobilgerät-Kombination beeinflussen und bisher konnte weder Ursache noch Lösung für den Bug identifiziert werden. + Nur Ziele, die ohne VPN erreichbar sind, sind auch mit VPN erreichbar. IPv6 VPNs funktionieren überhaupt nicht. + Nicht CIDR konforme Routen + Proxy-Verhalten für VPNs + Neuinstallation von VPN-apps + %s und früher + Kopie von %s + Route zur der konfigurierten VPN IP Adresse + Falscher MSS-Wert für VPN-Verbindung + Sekundäre Tablet-Nutzer + Definieren Sie benutzerdefinierte verbindungsspezifische Optionen. Seien Sie vorsichtig! + Benutzerdefinierte Optionen + Verbindungseintrag zu entfernen + %s und neuer + diff --git a/app/src/main/res/values-es/strings-icsopenvpn.xml b/app/src/main/res/values-es/strings-icsopenvpn.xml index 4cbb152d..63b8435b 100755 --- a/app/src/main/res/values-es/strings-icsopenvpn.xml +++ b/app/src/main/res/values-es/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Dirección del servidor: @@ -187,7 +185,7 @@ hacia/de Móvil) Error al firmar con la llave del almacén de llaves de Android %1$s: %2$s El aviso de conectividad VPN que esta aplicación puede interceptar todo el trafico esta impuesta por el sistema para evitar abusos de la API VPNService.\nLa notificación de conectividad (El símbolo de llave) también esta impuesta por el sistema Android para notificar una conexión VPN en curso. En algunas imágenes, esta notificación también emite un sonido.\nAndroid ha introducido estos diálogos de sistema para su seguridad e se ha asegurado que no pueden ser evitados. (En algunas imágenes, esto incluye la notificación sonora) Advertencia de conexión y sonido de notificación - Traducción al español por José Luis Bandala Pérez<luis.449bp@gmail.com> + Traducción al español por José Luis Bandala Pérez<luis449bp+openvpn@gmail.com> IP y DNS Básico Enrutamiento diff --git a/app/src/main/res/values-et/strings-icsopenvpn.xml b/app/src/main/res/values-et/strings-icsopenvpn.xml index c5174284..a5ae396b 100755 --- a/app/src/main/res/values-et/strings-icsopenvpn.xml +++ b/app/src/main/res/values-et/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Serveri aadress: diff --git a/app/src/main/res/values-fr/strings-icsopenvpn.xml b/app/src/main/res/values-fr/strings-icsopenvpn.xml index 657646c8..630b2514 100755 --- a/app/src/main/res/values-fr/strings-icsopenvpn.xml +++ b/app/src/main/res/values-fr/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - "Adresse du serveur:" @@ -221,6 +219,7 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces "Utilisez l\'icône <img src=\"ic_menu_archive\"/> pour importer un fichier profil (.opvpn ou .conf) de votre carte SD." "Veillez également à consulter la FAQ. Il s\'y trouve un guide de démarrage rapide." "Redirections / Configuration de l\'interface" + La configuration du routage et des interfaces n\'est pas faite par l\'intermédiaire des commandes traditionnelles ifconfig/route, mais en utilisant l\'API VPNService. Il en résulte une configuration de routage différente que sur les autres systèmes d\'exploitation. \nLa configuration du tunnel VPN se compose de l\'adresse IP et des réseaux qui doivent être routés via cette interface. En particulier aucune adresse de pair ou de passerelle n\'est nécessaire ou requise. Des routes spéciales pour atteindre le serveur VPN (par exemple ajoutées lorsque vous utilisez \"redirect-gateway\") ne sont pas nécessaires. L\'application ignore par conséquent ces paramètres lors de l\'importation d\'une configuration. L\'application assure avec l\'API VPNService que la connexion au serveur ne passe pas par le tunnel VPN.\nL\'API VPNService ne permet pas de spécifier les réseaux qui ne doivent pas être routés via le VPN. Pour contourner ce problème, l\'application essaye de détecter les réseaux qui ne doivent pas être routés par le tunnel (ex. route x.x.x.x y.y.y.y net_gateway) et calcule un ensemble de routes qui exclut cette route pour mimer le comportement des autres plates-formes. La fenêtre des logs montre la configuration de VPNService lors d\'une connexion.\nEn coulisse: Android 4.4+ n\'utilise pas la politique du routage. Utiliser route/ifconfig n\'affichera pas les routes installés. Utilisez plutôt ip rule, iptables -t mangle -L Ne pas couper la connexion VPN lors de la reconnexion d\'OpenVPN. Persistance de l\'interface TUN Log OpenVPN @@ -324,4 +323,31 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Certains fichiers sont introuvables. Sélectionner les fichiers pour importer le profil : Pour utiliser cette application, vous avez besoin d\'un fournisseur/passerelle VPN qui soutient OpenVPN (souvent fourni par votre employeur). Vérifier ici http://community.openvpn.net/ pour plus d\'informations sur OpenVPN et comment configurer votre propre serveur OpenVPN. Journal d\'importation : + Topologie VPN «%3$s » spécifiée mais ifconfig %1$s %2$s ressemble plus à une adresse IP avec un masque de réseau. On suppose que la topologie « sous-réseau » est utilisée. + La valeur de mssfix doit être un entier compris entre 0 et 9000 + Announce to TCP sessions running over the tunnel that they should limit their send packet sizes such that after OpenVPN has encapsulated them, the resulting UDP packet size that OpenVPN sends to its peer will not exceed this number of bytes. (default is 1450) + Override MSS value of TCP payload + Set MSS of TCP payload + Comportement du client + Clear allowed external apps + Chargement… + Allowed VPN apps: %1$s + Disallowed VPN apps: %1$s + Package %s is no longer installed, removing it from app allow/disallow list + VPN is used for all apps but exclude selected + VPN is used for only for selected apps + Remove remote server entry? + Garder + Supprimer + Add new remote + Use connection entries in random order on connect + You need to define and enable at least one remote server. + Liste des serveurs + Allowed Apps + Paramètres avancés + Payload options + Paramètres TLS + No remote defined + Dupliquer le profil VPN + Duplicating profile: %s diff --git a/app/src/main/res/values-hu/strings-icsopenvpn.xml b/app/src/main/res/values-hu/strings-icsopenvpn.xml index 2efdcf5f..5be8bbc4 100755 --- a/app/src/main/res/values-hu/strings-icsopenvpn.xml +++ b/app/src/main/res/values-hu/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Szerver cím: diff --git a/app/src/main/res/values-in/strings-icsopenvpn.xml b/app/src/main/res/values-in/strings-icsopenvpn.xml index 3dac7c71..c88db1db 100755 --- a/app/src/main/res/values-in/strings-icsopenvpn.xml +++ b/app/src/main/res/values-in/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Alamat Server: @@ -89,6 +87,7 @@ Alihkan semua lalulintas data melalui VPN Gunakan rute standar Masukkan rute butan sendiri. Masukkan tujuan dalam format CIDR. \"10.0.0.0/8 2002:: / 16\" akan mengarahkan jaringan 10.0.0.0/8 dan 2002:: / 16 melalui jaringan VPN + Routes that should NOT be routed over the VPN. Use the same syntax as for included routes. Rute buatan sendiri Jaringan Dikecualikan Tingkat rincian catatan diff --git a/app/src/main/res/values-it/strings-icsopenvpn.xml b/app/src/main/res/values-it/strings-icsopenvpn.xml index 36198678..13043923 100755 --- a/app/src/main/res/values-it/strings-icsopenvpn.xml +++ b/app/src/main/res/values-it/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Indirizzo server: diff --git a/app/src/main/res/values-ja/strings-icsopenvpn.xml b/app/src/main/res/values-ja/strings-icsopenvpn.xml index 792e6200..f12d149b 100755 --- a/app/src/main/res/values-ja/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ja/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - サーバアドレス diff --git a/app/src/main/res/values-ko/strings-icsopenvpn.xml b/app/src/main/res/values-ko/strings-icsopenvpn.xml index 9266a36c..b35bdbfe 100755 --- a/app/src/main/res/values-ko/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ko/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - 서버 주소: diff --git a/app/src/main/res/values-nl/strings-icsopenvpn.xml b/app/src/main/res/values-nl/strings-icsopenvpn.xml index b486706e..7030eaff 100755 --- a/app/src/main/res/values-nl/strings-icsopenvpn.xml +++ b/app/src/main/res/values-nl/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Server Adres: diff --git a/app/src/main/res/values-no/strings-icsopenvpn.xml b/app/src/main/res/values-no/strings-icsopenvpn.xml index 501b18df..bd71a77c 100755 --- a/app/src/main/res/values-no/strings-icsopenvpn.xml +++ b/app/src/main/res/values-no/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Server adresse: diff --git a/app/src/main/res/values-pl/strings-icsopenvpn.xml b/app/src/main/res/values-pl/strings-icsopenvpn.xml index 052b0135..dece207b 100755 --- a/app/src/main/res/values-pl/strings-icsopenvpn.xml +++ b/app/src/main/res/values-pl/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Adres serwera: diff --git a/app/src/main/res/values-pt/strings-icsopenvpn.xml b/app/src/main/res/values-pt/strings-icsopenvpn.xml index ec7d2534..155f9c8a 100755 --- a/app/src/main/res/values-pt/strings-icsopenvpn.xml +++ b/app/src/main/res/values-pt/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Endereço do Servidor: @@ -63,7 +61,9 @@ Desconectar VPN Limpar registo Cancelar Confirmação + Desligar a ligação actual/Cancelar tentativa de ligação? Remover VPN + Verifica se o servidor utiliza um certificado com extensões TLS Server (--remote-cert-tls server) Esperar certificado do servidor TLS Verificar nome de host do certificado Assunto do certificado remoto @@ -79,11 +79,16 @@ Servidor DNS Servidor DNS secundário utilizado caso o servidor primário esteja inacessível. Servidor DNS alternativo + Ignorar rotas empurradas + Ignorar rotas definidas pelo servidor. Redireccionar todo o tráfego pela VPN Usar rota padrão + Introduzir rotas personalizadas. Introduzir destino no formato CIDR. \"10.0.0.0/8 2002::/16\" iria direccionar as redes 10.0.0.0/8 e 2002::/16 pela VPN. + Rotas que NÃO deviam ser roteadas pela VPN. Usar a mesma sintaxe que as rotas incluídas. Rotas personalizadas Redes excluídas Nível de verbosidade do log + Autoriza pacotes autenticados vindos de qualquer IP Permitir servidor flutuante Opções personalizadas Editar definições VPN @@ -117,6 +122,7 @@ A imagem não suporta a API VPNService, lamentamos :( Encriptação Digite o método de encriptação + Introduzir o algoritmo de cifra utilizado pelo OpenVPN. Deixar vazio para usar o defeito. Autenticação/encriptação Explorador de ficheiros Ficheiro embutido @@ -138,12 +144,14 @@ Considerações de segurança "Como OpenVPN é segurança sensíveis algumas notas sobre segurança são sensatas. Todos os dados no sdcard é inerentemente inseguro. Cada aplicativo pode lê-lo (por exemplo, este programa não requer direitos especiais cartão SD). Os dados desta aplicação só pode ser lido pelo próprio aplicativo. Ao usar a opção de importação para cacert / cert / chave no diálogo os dados do arquivo é armazenado no perfil de VPN. Os perfis de VPN são acessíveis apenas por esta aplicação. (Não se esqueça de apagar as cópias no sd cartão depois). Mesmo com acesso apenas por este aplicativo os dados ainda não é criptografado. torcendo por telefone ou outros exploits pode ser possível recuperar os dados. senhas salvas são armazenadas em texto simples assim. Para arquivos PKCS12 é altamente recomendável que você importá-los para o armazenamento de chaves android. " Importar + Erro a mostrar a selecção de certificados IPv4 IPv6 A esperar mensagem de estado... perfil importado Perfil importado %d Imagens quebradas + Chave de crifra de ficheiros PKCS12 Senha de chave privada Senha ícone de ficheiro @@ -253,4 +261,8 @@ Ficheiro de utilizador/senha [Importado de: %s] Log de importação: + Ignorar caminho multicast: %s + Android apenas suporta rotas CIDR para a VPN. Pelo facto de as rotas não-CIDR quase nunca serem usadas, OpenVPN para Android irá usar uma rota /32 para rotas não-CIDR e emitir um aviso. + VPN não funcionar para utilizadores secundários. + Rotas não CIDR diff --git a/app/src/main/res/values-ro/strings-icsopenvpn.xml b/app/src/main/res/values-ro/strings-icsopenvpn.xml index 3821f964..3bf61a9d 100755 --- a/app/src/main/res/values-ro/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ro/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Adresa server: diff --git a/app/src/main/res/values-ru/strings-icsopenvpn.xml b/app/src/main/res/values-ru/strings-icsopenvpn.xml index 5db415df..a67c6362 100755 --- a/app/src/main/res/values-ru/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ru/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Адрес сервера: diff --git a/app/src/main/res/values-sv/strings-icsopenvpn.xml b/app/src/main/res/values-sv/strings-icsopenvpn.xml index 151742a5..6ef522c4 100755 --- a/app/src/main/res/values-sv/strings-icsopenvpn.xml +++ b/app/src/main/res/values-sv/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Serveradress: diff --git a/app/src/main/res/values-tr/strings-icsopenvpn.xml b/app/src/main/res/values-tr/strings-icsopenvpn.xml index ea81d3ed..1df631d0 100755 --- a/app/src/main/res/values-tr/strings-icsopenvpn.xml +++ b/app/src/main/res/values-tr/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Sunucu adresi: @@ -105,6 +103,7 @@ Açılış tun arabirimi: Yerel IPv4: %1$s/%2$d IPv6: %3$s MTU: %4$d DNS sunucusu: %1$s, etki alanı: %2$s + Routes: %1$s %2$s Arabirim bilgileri %1$s ve %2$s var, tabii ikinci eş adresi uzaktan adresidir. /32 Kullanarak için yerel IP ağ maskesi. OpenVPN tarafından verilen \"%3$s\" modudur. %1$s ve %2$s olarak IP yolu ile CIDR ağ maskesi, ağ maskesi /32 kullanarak yapamazsınız. Rota %1$s/%2$s %3$s/%2$s için düzeltilmiş diff --git a/app/src/main/res/values-uk/strings-icsopenvpn.xml b/app/src/main/res/values-uk/strings-icsopenvpn.xml index dbbc65a0..4eae3d61 100755 --- a/app/src/main/res/values-uk/strings-icsopenvpn.xml +++ b/app/src/main/res/values-uk/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - Адреса сервера: @@ -284,6 +282,7 @@ Зберегти пароль Призупинити VPN Відновити VPN + VPN пауза на вимогу користувача Неможливо відобразити інформацію про сертифікат Поведінка VPN Дозволити зміни в профілі VPN diff --git a/app/src/main/res/values-v21/refs.xml b/app/src/main/res/values-v21/refs.xml index a4a26bec..2a09271d 100644 --- a/app/src/main/res/values-v21/refs.xml +++ b/app/src/main/res/values-v21/refs.xml @@ -5,10 +5,10 @@ --> - @drawable/ic_close_white_24dp - @drawable/ic_share_white_24dp - @drawable/ic_check_white_24dp - @drawable/ic_filter_list_white_24dp - @drawable/ic_delete_white_24dp - @drawable/ic_delete_grey600_24dp + @drawable/ic_close_white_24dp + @drawable/ic_share_white_24dp + @drawable/ic_check_white_24dp + @drawable/ic_filter_list_white_24dp + @drawable/ic_delete_white_24dp + @drawable/ic_delete_grey600_24dp diff --git a/app/src/main/res/values-vi/strings-icsopenvpn.xml b/app/src/main/res/values-vi/strings-icsopenvpn.xml new file mode 100755 index 00000000..9b71d0ab --- /dev/null +++ b/app/src/main/res/values-vi/strings-icsopenvpn.xml @@ -0,0 +1,377 @@ + + + + + + Địa chỉ máy chủ: + Cổng máy chủ: + Vị trí + Không thể đọc thư mục + Chọn + Hủy bỏ + Không có dữ liệu + LZO Nén + Không chứng nhận + Chứng nhận máy trạm + Khóa chứng nhận máy trạm + Tập tin PKCS12 + Chứng nhận CA + Bạn phải chọn một chứng chỉ + Mã nguồn và theo dõi lỗi hiện có tại http://code.google.com/p/ics-openvpn/ + Chương trình này sử dụng các thành phần sau: xem mã nguồn đầy đủ trong giấy phép + Về + Hồ sơ + Loại + Mật khẩu PKCS12 + Chọn… + Bạn phải chọn một tập tin + Sử dụng xác thực TLS + Hướng TLS + Nhập địa chỉ IPv6/Netmask trong định dạng CIDR (ví dụ 2000:dd::23/64) + Nhập địa chỉ IPv4/Netmask trong định dạng CIDR (ví dụ 1.2.3.4/24) + Địa chỉ IPv4 + Địa chỉ IPv6 + Nhập tùy chọn cá nhân Open VPN. Sử dụng thận trọng. Lưu ý các thiết lập OpenVPN không thể hỗ trợ bởi thiết kế cấu hình của VPN. Nếu bạn thấy tùy chọn quan trọng hoặc mất mát, bạn có thể liên hệ với tác giả + Tên người dùng + Mật khẩu + Đối với cấu hình tĩnh thì khóa TLS sẽ được dùng như khóa tĩnh + Cấu hình VPN + Thêm hồ sơ + Nhập một tên để xác định hồ sơ mới + Vui lòng nhập một tên hồ sơ duy nhất + Tên hồ sơ + Bạn phải chọn một chứng chỉ người dùng + Không tìm thấy lỗi + Lỗi trong cấu hình + Lỗi phân tích cú pháp địa chỉ IPv4 + Lỗi phân tích cú pháp định tuyến tùy chỉnh + (để trống để truy vấn theo yêu cầu) + Lối tắt Open VPN + Kết nối đến VPN + Hồ sơ quy định tại lối tắt không tìm thấy + Tiền tố miền ngẫu nhiên + Thêm 6 ký tự ngẫu nhiên ở phía trước tên miền + Kích hoạt tùy chỉnh + Chỉ định các tùy chỉnh. Dùng cẩn thận! + Định tuyến bị từ chối bởi Android + Ngắt kết nối + Ngắt kết nối VPN + xóa Nhật ký + Xác nhận hủy bỏ + Ngắt kết nối VPN/hủy bỏ nỗ lực kết nối? + Loại bỏ VPN + Kiểm tra máy chủ sử dụng chứng nhận với các phần mở rộng máy chủ TLS (--remote-cert-tls server) + Đợi chứng chỉ máy chủ TLS + Kiểm tra Chứng chỉ máy chủ từ xa + Kiểm tra chứng chỉ tên miền + Xác định để kiểm tra sử dụng chứng nhận từ xa DN (e.g. C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de)\n\nHoàn chỉnh các DN hoặc RDN (openvpn.blinkt.de làm ví dụ) hoặc một tiền tố RDN để xác minh.\n\nKhi dùng tiền tố RDN phù hợp \"Server-1\" và \"Server-2\"\n\nĐể trường văn bản trống sẽ kiểm tra tiền tố RDN phản biện tên miền máy chủ. \n\nĐể biết thêm chi tiết xem tại phần quản lý OpenVPN 2.3.1+ bên dưới —xác minh-x509-tên + Chủ đề chứng chỉ từ xa + Cho phép xác thực khóa TLS + Tập tin chứng thực TLS + Yêu cầu các địa chỉ IP, định tuyến và tùy chọn thời gian từ máy chủ. + Không có thông tin được yêu cầu từ máy chủ. Thiết lập cần phải được xác định bên dưới. + Cài đặt kéo + DNS + Ghi đè thiết lập DNS bởi máy chủ + Dùng máy chủ DNS của riêng bạn + Tìm tên miền + Máy chủ DNS để dùng. + Máy chủ DNS + Máy chủ DNS thứ hai được dùng nếu máy chủ DNS bình thường không thể kết nối. + Sao lưu máy chủ DNS + Bỏ qua các định tuyến đẩy + Bỏ qua các định tuyến đẩy bởi máy chủ. + Chuyển hướng tất cả lưu lượng qua VPN + Sử dụng định tuyến mặc định + Nhập định tuyến tùy chỉnh. Chỉ nhập điểm đích trong định dạng CIDR. \"10.0.0.0/8 2002::/16\" sẽ điều hành trực tiếp mạng \"10.0.0.0/8 và 2002::/16\" qua VPN. + Định tuyến KHÔNG nên chuyển tải qua VPN. Sử dụng cú pháp tương tự như với bao gồm các định tuyến. + Định tuyến tùy chỉnh + Các mạng loại trừ + Đăng nhập mức chậm + Cho phép các gói tin xác thực từ IP bất kỳ + Cho phép các máy chủ nổi + Cấu hình tùy chỉnh + Chỉnh sửa cài đặt VPN + Loại bỏ hồ sơ VPN \'%s\'? + Trên một số ROM tùy chỉnh ICS cho phép trên/dev/tun có thể sai, hoặc tun module có thể bị mất hoàn toàn. Đối với ROM CM9 thử sửa lại các tùy chỉnh theo cấu hình cài đặt chung + Không thể mở giao diện tun + "Lỗi: " + Xóa + Đang mở giao diện TUN: + IPv4 địa phương: %1$s/%2$d IPv6: %3$s MTU: %4$d + DNS Server: %1$s, Domain: %2$s + Định tuyến: %1$s %2$s + Định tuyến loại trừ: %1$s %2$s + Dịch vụ định tuyến VPN đã cài đặt: %1$s %2$s + Lấy giao diện thông tin %1$s và %2$s, giả sử địa chỉ thứ hai là địa chỉ ngang hàng từ xa. Dùng mặt nạ mạng /32 cho IP địa phương. Chế độ được đưa ra bởi Open VPN là \"%3$s\". + Không thể tạo liên kết %1$s và %2$s như định tuyến IP với định dạng CIDR, sử dụng /32 như mặt nạ mạng. + Đã sửa định tuyến %1$s / %2$s để %3$s / %2$s + Không thể truy cập vào Khóa điều khoản Android. Nó có thể gây ra bởi sự nâng cấp phần mềm hoặc bởi việc phục hồi bản sao của ứng dụng/cấu hình của ứng dụng. Vui lòng chỉnh sửa và chọn lại chứng chỉ bên dưới thiết lập cơ bản để tạo lại quyền truy cập chứng chỉ. + %1$s %2$s + Gửi tập tin bản ghi + Gửi + Tập tin bản ghi ICS OpenVPN + Sao chép bản ghi vào bộ nhớ tạm + Chế độ kiểm tra điểm truy cập + Chế độ kiểm tra truy cập không thể thực hiện với API VPN không nguồn gốc. Do đó ứng dụng không thể cung cấp hỗ trợ kiểm tra truy cập + Lại lần nữa? Bạn đang đùa à? Không, chế độ kiểm tra truy cập thực sự không hỗ trợ và gửi thư yêu cầu nữa nếu nó không được hỗ trợ giúp đỡ. + Lần thứ ba? Thực tế, ta có thể viết một chế độ kiểm tra truy cập giả lập dựa trên cấu hình đã thêm thông tin nền tảng khi gửi và dải thông tin nền tảng khi nhận. Nhưng chế độ kiểm tra truy cập giả lập này cũng sẽ có thể thực hiện cho ARP và máy trạm DHCP. Tôi không biết ai đã làm việc theo hướng này. Liên hệ với tôi nếu bạn muốn bắt đầu mã hóa trên đây. + Câu hỏi thường gặp + Đang sao chép các mục bản ghi + Để sao chép một mục đăng nhập hãy nhấn và giữ trên mục đăng nhập. Để sao chép/gửi toàn bộ nhật ký sử dụng hãy dùng tùy chọn Gửi Bản Ghi. Sử dụng nút menu phần cứng nếu như nút đó không hiển thị trong GUI. + Phím tắt để bắt đầu + Bạn có thể đặt một phím tắt truy cập OpenVPN trên màn hình chính. Tùy thuộc vào chương trình màn hình bạn sẽ phải thêm một phím tắt hoặc một widget. + Hình ảnh của bạn không hỗ trợ dịch vụ VPN API, xin lỗi :( + Mã hóa + Nhập phương thức mã hóa + Nhập các thuật toán mã hóa được sử dụng bởi OpenVPN. Để trống để sử dụng thuật toán mã hóa mặc định. + Nhập cấu hình xác thực dùng cho OpenVPN. Để trống nếu sử dụng cấu hình mặc định. + Xác thực/Mã hóa + Duyệt tập tin + Tập tin nội tuyến + Lỗi khi nhập tập tin + Không thể nhập tập tin từ hệ thống + [[Tập tin dữ liệu nội tuyến]] + Từ chối mở thiết bị tun khi không có thông tin IP + Nhập hồ sơ từ tập tin ovpn + Nhập + Không thể đọc hồ sơ vừa nhập + Lỗi đọc tập tin cấu hình + Thêm hồ sơ + Không thể tìm thấy tập tin %1$s đề cập trong tập tin cấu hình vừa nhập + Nhập tập tin cấu hình từ nguồn %1$s + Cấu hình của bạn có vài tùy chỉnh không được tương thích với cấu hình người dùng. Những tùy chọn này đã được thêm như là cấu hình tùy chỉnh. Cấu hình tùy chỉnh được hiển thị bên dưới: + Hoàn tất đọc tập tin cấu hình. + Đừng gán vào địa chỉ địa phương và cổng + Không ràng buộc địa phương + Nhập tập tin cấu hình + Cân nhắc bảo mật + "Vấn đề bảo mật OpenVPN trong một số trường hợp là nhạy cảm. Tất cả dữ liệu trên thẻ nhớ vốn không an toàn. Các ứng dụng khác có thể đọc được nó (ví dụ như chương trình này không bắt buộc các quyền đặc biệt từ thẻ nhớ). Dữ liệu của ứng dụng này chỉ có thể đọc bởi chính nó. Mặc dù có thể sử dụng tùy chọn nhập vào để truy cập/xem/khóa ứng dụng bên trong dữ liệu hội thoại lưu trữ trong hồ sơ VPN. Nhưng hồ sơ VPN chỉ có thể truy cập bởi chính ứng dụng này. (Đừng quên xóa các bản sao trên thẻ nhớ sau đó). Dù có thể chỉ truy cập bằng ứng dụng này nhưng dữ liệu vẫn không được mã hóa. Việc root điện thoại hoặc khai thác các vấn đề khác có thể lấy cắp được dữ liệu. Lưu trữ mật khẩu lại trong văn bản là tốt nhất. Tập tin pkcs12 là lời khuyên tốt nhất để bạn có thể nhập chúng vào Khóa lưu trữ Android." + Nhập + Lỗi hiển thị lựa chọn chứng chỉ + Có một sự cố khi cố gắng hiển thị chứng chỉ Android 4.0+ được chọn. Điều này sẽ không bao giờ xảy ra vì đây là một tính năng tiêu chuẩn của Android 4.0+. Có thể phần hỗ trợ ROM Android cho chứng chỉ được lưu trữ đã hỏng + IPv4 + IPv6 + Đang chờ tin nhắn trạng thái… + hồ sơ đã nhập + hồ sơ đã nhập %d + Ảnh bị hỏng + <p>Thông tin chính thức của HTC có một số vấn đề định tuyến đường truyền xảy ea khi không lưu thông được (Xem thêm <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">Issue 18</a> trong báo cáo theo dõi lỗi.)</p><p>Thông tin chính thức từ Sony dòng Xperia Arc S và Xperia Ray đã được báo cáo về việc mất kết nối với dịch vụ VPN. (Xem thêm <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">Issue 29</a> trong báo cáo theo dõi lỗi.)</p><p>Mật số bản dựng tùy chỉnh cho tun module có thể bị thiếu /dev/tun hoặc có thể sai. Một vài ROM CM9 cần phải \"Sửa tùy chọn chủ sở hữu\" bên dưới \"Sư xâm nhập thiết bị cụ thể\" được bật..</p><p>Quan trọng nhất, nếu thiết bị của bạn hỏng ROM Android, hãy báo cáo cho nhà phát triển. Càng nhiều người báo cáo vấn đề đến nhà phát triển thì càng có nhiều khả năng họ sẽ sửa lỗi đó.</p> + Tập tin khóa mã hóa PKCS12 + Khóa mật khẩu riêng tư + Mật khẩu + biểu tượng tập tin + Xác thực TLS + Tạo cấu hình + Cài đặt + Cố gắng thiết lập chủ sở hữu của /dev/tun vào hệ thống. Một vài ROM CM9 cần việc này để thực hiện thiết lập VPN API. Yêu cầu root. + Sửa quyền sở hữu /dev/tun + Hiển thị tập tin cấu hình OpenVPN đã tạo + Đang chỉnh sửa \"%s\" + Đang dựng cấu hình... + Bật tùy chọn này sẽ buộc kết nối lại nếu tình trạng mạng bị thay đổi (ví dụ Wifi đến/từ điện thoại) + Kết nối lại khi mạng thay đổi + Tình trạng mạng: %s + Chứng chỉ CA thường trả về từ khóa lưu trữ Android. Chứng nhận riêng biệt sẽ được chỉ định nếu bạn nhận được lỗi xác minh chứng chỉ. + Chọn + Không có chứng chỉ CA phản hồi khi đọc khóa lưu trữ Android. Chứng thực có thể sẽ thất bại. + Hiển thị cửa sổ đăng nhập khi kết nối. Cửa sổ đăng nhập có thể luôn truy cập từ thanh thông báo trạng thái. + Hiển thị cửa sổ đăng nhập + Đang chạy trên %1$s (%2$s) %3$s, Android API %4$d + Lỗi đăng ký với khóa lưu trữ Android %1$s: %2$s + Các kết nối VPN đang cảnh báo bạn rằng ứng dụng này có thể chặn tất cả lưu lượng được đặt bởi hệ thống để chặn tình trạng lạm dụng VPN API. \nThông báo kết nối VPN (Biểu tượng chìa khóa) cũng được đặt bởi hệ thống Android để báo hiệu một kết nối VPN đang hoạt động. Với một số trường hợp thông báo này sẽ phát một âm thanh. \nAndroid giới thiệu những đoạn hội thoại này vì sự an toàn của bạn và chắn chắn rằng chúng không thể bị xâm nhập phá hoại. (Trên một số trường hợp thật không may không bao gồm âm thanh thông báo) + Cảnh báo kết nối và thông báo âm thanh + Bản dịch tiếng Anh bởi Tojido Takarin<arne@tojidotakarin@gmail.com> + IP và DNS + Cơ bản + Định tuyến + Ẩn danh cài đặt OpenVPN. Bình thường việc này không cần thiết. + Nâng cao + Cấu hình ICS OpenVPN + Không có máy chủ DNS đang sử dụng. Tên giải quyết có thể không hoạt động. Xem xét việc thiết lập máy chủ DNS. Cũng xin lưu ý rằng Android sẽ tiếp tục dùng cấu hình cài đặt proxy của bạn để kết nối cho điện thoại di động của bạn/kết nối Wifi khi không có máy chủ DNS được thiết lập. + Không thể thêm máy chủ DNS \"%1$s\", bị từ chối bởi hệ thống: %2$s + Không thể cấu hình địa chỉ IP \"%1$s\", từ chối bởi hệ thống: %2$s + <p>Nhận cấu hình hoạt động (thử nghiệm trên máy tính hoặc tải về từ nhà cung cấp dịch vụ của bạn/hoặc tổ chức)</p><p>Nếu nó là một tập tin duy nhất mà không có tập tin pem/pks12 bạn có thể gửi email tập tin đó của bạn và mở tệp đính kèm. Nếu bạn có nhiều tập tin, hãy để nó trên thẻ nhớ của bạn</p><p>Nhấp vào tập tin đính kèm trên email /Dùng biểu tượng thư mục để nhập VPN mới vào danh sách VPN của bạn</p><p>Nếu có tập tin sai sót thì hãy để các tập tin lỗi đó trên thẻ nhớ của bạn</p><p>Nhấn vào biểu tượng Lưu để thêm VPN mới vào VPN của bạn</p><p>Kết nối VPN bằng cách nhấn vào tên của nó</p><p>Nếu có lỗi hoặc cảnh báp trong bản ghi đăng nhập thì hãy cố gắng tìm hiểu cảnh báo/ lỗi đó và cố thử sửa chúng</p> + Khởi động nhanh + Thử tải tun.ko module kernel trước khi kết nối. Cần phải root thiết bị. + Tải tun module + Nhập PKCS12 từ cấu hình vào Khóa lưu trữ Android + Lỗi nhận cấu hình proxy: %s + Đang sử dụng proxy %1$s %2$d + Sử dụng proxy hệ thống + Sử dụng các cấu hình hệ thống rộng cho HTTP/HTTPS proxy để kết nối. + Bạn có thể <a href=\"https://www.paypal.com/cgi-bin/webscr?hosted_button_id=R2M6ZP9AF25LS&amp;cmd=_s-xclick\">tặng với PayPal</a> + OpenVPN sẽ kết nối lại VPN nếu nó đã hoạt động khi hệ thống khởi động lại/tắt máy. Xin vui lòng đọc phần cảnh báo kết nối trong các câu hỏi thường gặp trước khi sử dụng tùy chọn này. + Kết nối lại khi khởi động lại máy + Bỏ qua + Khởi động lại + Cấu hình sẽ được áp dụng sau khi khởi động lại VPN. (Khởi động) bắt đầu VPN lại ngay bây giờ? + Cấu hình đã thay đổi + Không thể xác định hồ sơ kết nối cuối cùng để chỉnh sửa + Thông báo trùng lặp + Nếu Android đang chịu ảnh hưởng của bộ nhớ hệ thống (RAM), các ứng dụng và dịch vụ không cần thiết sẽ được xóa khỏi bộ nhớ hoạt động. Điều này sẽ chấm dứt kết nối VPN. Để đảm bảo rằng kết nối/dịch vụ OpenVPN chạy với độ ưu tiên cao. Để chạy với độ ưu tiên cao hơn phải hiển thị một thông báo. Biểu tượng khóa thông báo đang được áp đặt bởi hệ thống như được mô tả trong các câu hỏi thường gặp trước. Nếu nó không được tính là thông báo ứng dụng cho mục đích chạy với độ ưu tiên cao. + Không có hồ sơ VPN được xác định. + Sử dụng <img src=\"ic_menu_add\"/> biểu tượng để thêm VPN mới + Sử dụng <img src=\"ic_menu_archive\"/> biểu tượng để nhập tập tin cấu hình hồ sơ (.ovpn hoặc .conf) từ thẻ nhớ của bạn. + Hãy chắc chắn đã xem qua các câu hỏi thường gặp. Có một phần hướng dẫn bắt đầu nhanh. + Định tuyến/giao diện cấu hình + Định tuyến và cấu hình giao diện không được thực hiện thông qua lệnh ifconfig/dòng lệnh định tuyến nhưng được dùng bằng cấu hình VPN API. Điều này dẫn đến một cấu hình định tuyến khác hơn những hệ điều hành khác. \nCấu hình của đường truyền VPN bao gồm các địa chỉ IP và mạng lưới được định tuyến qua giao diện này. Đặc biệt, không có địa chỉ đối tác ngay hàng hoặc cổng địa chỉ cần thiết hoặc bắt buộc. Các định tuyến đặc biệt để kết nối đến máy chủ VPN (ví dụ thêm vào khi sử dụng cổng kết nối chuyển hướng) thì không cần thiết. Ứng dụng sẽ bỏ qua những cài đặt khi thiết lập cấu hình. Ứng dụng được gán với dịch vụ VPN API để kết nối đến máy chủ không được định tuyến thông qua VPN.\nCấu hình dịch vụ VPN API sẽ không cho phép các mạng mà không được định tuyến qua VPN. Như các ứng dụng cố gắng để xác lập mạng lưới sẽ không được định tuyến thông qua đường truyền (ví dụ định tuyến x.x.x.x y.y.y.y net_gateway) và tính toán xác định đường truyền để cạnh tranh với các nền tảng khác. Cửa sổ đăng nhập hiển thị cấu hình dịch vụ VPN khi thiết lập kết nối.\nSau đây: Android 4.4+ sẽ không dùng chính sách định tuyến nữa. Dùng định tuyến/ifconfig sẽ không hiển thị các định tuyến đã cài đặt. Thay vì sử dụng quy tắc ip, iptables -t mangle -L + Đừng ngắt kết nối VPN khi OpenVPN đang kết nối lại. + Tun thường xuyên truy cập + Đăng nhập OpenVPN + Nhập cấu hình OpenVPN + Mức tiêu thụ pin + Trong các lần thử nghiệm của tôi thì lý do chính ở việc tiêu thụ pin cao của OpenVPN là do các gói dữ liệu trực tuyến liên tục. Hầu hết các máy chủ OpenVPN có một chỉ thị cấu hình như \'trực tuyến liên tục 10 60\' mà nguyên nhân của máy trạm và máy chủ trao đổi với nhau các gói dữ liệu trực tuyến này mỗi 10 giây. <p> Trong khi các gói dữ liệu nhỏ và không sử dụng nhiều lưu lượng truy cập. (Xem thêm <a href=\"http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\">The Radio State Machine | Nhà phát triển Android</a>) <p> Gói dữ liệu trực tuyến này không thể thay đổi trên máy trạm. Chỉ quản trị viên hệ thống của OpenVPN mới có thể thay đổi. <p> Không may là nếu sử dụng các gói dữ liệu trực tuyến này hơn 60 giây với UDP có thể gây ra hiện tượng các cổng NAT thả các kết nối do chờ một thời gian mà không hoạt động. Sử dụng TCP với một thời gian dài không hoạt động, nhưng thông lượng TCP qua cấu hình TCP thực hiện rất kém trên kết nối với độ mất mát gói cao. (Xem <a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">Tại sao TCP qua TCP lại là mo65y ý kiến tồi</a>) + Các tính năng Android Tethering (thông qua Wifi, USB hoặc Bluetooth) và các dịch vụ VPN API (được sử dụng bởi chương trình này) không làm việc cùng nhau. Để biết thêm chi tiết xin xem tại <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=34\">issue #34</a> + VPN và Tethering + Thử lại kết nối + Thiết lập kết nối lại + Số giây đợi trong khi cố gắng kết nối. + Số giây giữa các kết nối + OpenVPN bất ngờ bị lỗi. Vui lòng xem xét và gửi tùy chọn Báo cáo sự cố trong menu chính + Gửi Báo cáo lỗi đến nhà phát triển + Gửi thông tin gỡ lỗi về sự cố lần cuối đến nhà phát triển + OpenVPN - %s + %1$s - %2$s + %1$s - %3$s, %2$s + Đang kết nối + Đang chờ máy chủ phản hồi + Đang chứng thực + Đang nhận cấu hình máy trạm + Đang gán các địa chỉ IP + Đang thêm các định tuyến + Đã kết nối + Đã ngắt kết nối + Đang kết nối lại + Đang thoát + Đang ngưng hoạt động + Đang xử lý tên máy chủ lưu trữ + Đang kết nối (TCP) + Chứng thực không thành công + Đang đợi mạng khả dụng + ↓%2$s/s %1$s - ↑%4$s/s %3$s + Không kết nối + Đang kết nối VPN %s + Đang kết nối VPN %s + Một số phiên bản Android 4.1 có vấn đề nếu tên của khóa lưu trữ chứng chỉ chứa các ký tự không phải chữ và số (như dấu cách, gạch chân hoặc gạch ngang). Hãy thử nhập lại chứng chỉ không có ký tự đặc biệt + Mã hóa mật mã + Gói xác thực + Nhập phương thức xác thực gói + Đang chạy trên %1$s (%2$s) %3$s, Android API %4$d, phiên bản %5$s, %6$s + được xây dựng bởi %s + bản dựng gỡ lỗi + bản dựng chính thức + Sao chép vào hồ sơ + Báo cáo sự cố + Thêm + Gửi tập tin cấu hình + Hoàn tất DN + Cấu hình bạn nhập vào dùng tùy chọn DEPRECATED cũ, cấu hình tls từ xa khác với định dạng DN. + RDN (tên thường gọi) + Tiền tố RDN + tls-remote (DEPRECATED) + Bạn có thể giúp phiên dịch bằng cách truy cập http://crowdin.net/project/ics-openvpn/invite + %1$s cố gắng để kiểm soát %2$s + Hiện tại, bạn đang cho phép các ứng dụng có quyền kiểm soát OpenVPN cho Android và chặn tất cả lưu lượng mạng.KHÔNG chấp nhận nếu bạn không tin tưởng ứng dụng này.Nếu không, bạn có nguy cơ bị tổn hại dữ liệu bởi những phần mềm chứa mã độc.\" + Tôi tin tưởng ứng dụng này. + Không có ứng dụng cho phép sử dụng API bên ngoài + Cho phép ứng dụng: %s + Xóa danh sách ứng dụng bên ngoài được cho phép?\nDanh sách hiện tại các ứng dụng được cho phép:\n\n%s + \"Tạm dừng VPN khi màn hình tắt và truyền dữ liệu ít hơn 64KB trong 60 giây. Khi tùy chọn \"TUN thường dùng\" được kích hoạt sẽ tạm dừng các VPN để ứng dụng của bạn KHÔNG kết nối mạng. Nếu không chọn tùy chọn \"TUN thường dùng\" thì thiết bị sẽ không có kết nối VPN/hoặc bảo vệ. + Tạm dừng kết nối VPN sau khi tắt màn hình + Tạm dừng kết nối khi màn hình tắt: ít hơn %1$s trong %2$s + Cảnh báo: TUN thường dùng không được bật cho VPN này. Lưu lượng sẽ dùng kết nối mạng bình thường khi màn hình tắt. + Lưu mật khẩu + Tạm dừng VPN + Tiếp tục VPN + VPN tạm dừng theo yêu cầu của người dùng + VPN đã tạm dừng - tắt màn hình + Chi tiết thiết bị xâm nhập + Không thể hiển thị thông tin chứng chỉ + Hành vi ứng dụng + Hành vi VPN + Cho phép thay đổi Hồ sơ VPN + Khóa lưu trữ phần cứng: + Biểu tượng của ứng dụng đang cố gắng sử dụng OpenVPN cho Android + "Bắt đầu với Android 4.3, việc xác nhận VPN được hiểu như là xác nhận \"ứng dụng nền tảng\". Kết quả này trên hộp thoại không nhận việc nhập liệu vào. Nếu bạn tìm thấy ứng dụng sử dụng nền có thể gây ra vấn đề này, nó là vi phạm và hãy liên hệ với tác giả. Vấn đề này ảnh hưởng đến tất cả ứng dụng VPN trên Android 4.3 và cao hơn. Xem thêm <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\">Issue 185<a> để biết thêm chi tiết" + Hộp thoại xác nhận VPN + Ngoài ra, bạn có thể gửi tài trợ cho tôi bằng CH Play: + Cảm ơn bạn đã tài trợ %s! + Xóa Bản ghi. + Hiển thị mật khẩu + Lỗi truy cập Keychain: %s + Ngắn + ISO + Dấu thời gian + Không + Tải lên + Tải xuống + Trạng thái VPN + Xem tùy chọn + Tùy chọn ngoại lệ: %1$s\n\n%2$s + %3$s: %1$s\n\n%2$s + Nếu bạn đã root thiết bị Android bạn có thể cài đặt <href=\"http://xposed.info/\">Xposed framework</a> và <a href=\"http://repo.xposed.info/module/de.blinkt.vpndialogxposed\">Hộp thoại xác nhận VPN module</a> để xác nhận nguy cơ\" + Giấy phép đầy đủ + Mạng kết nối trực tiếp đến giao diện địa phương sẽ không định tuyến qua VPN. Bỏ tùy chọn này sẽ chuyển hướng tất cả lưu lượng truy cập cho mạng nội bộ đến VPN. + Bỏ qua VPN cho mạng địa phương + Tập tin tên người dùng/Mật khẩu + [Nhập khẩu từ: %s] + Một số tập tin không thể tìm thấy. Vui lòng chọn tập tin để nhập vào hồ sơ: + Để dùng ứng dụng này bạn cần một nhà cung cấp dịch vụ VPN/ cổng hỗ trợ OpenVPN (thường được cung cấp bởi chủ sở hữu). Kiểm tra tại http://community.openvpn.net/ để biết thêm thông tin về Open VPN và cách làm thế nào để thiết lập máy chủ Open VPN của riêng bạn. + Nhập bản ghi: + Cấu trúc VPN \"%3$s\" quy định nhưng ifconfig %1$s %2$s trông giống như một địa chỉ IP với một mặt nạ mạng. Giả định cấu trúc liên kết \"mạng con\". + Các giá trị MSS phải là một số nguyên từ 0 đến 9000 + Thông báo với các phiên TCP đang chạy thông qua đường truyền mà chúng nên hạn chế gửi kích cỡ gói dữ liệu sau khi Open VPN đã đóng gói nó, kết quả kích thước gói dữ liệu UDP mà OpenVPN gửi tới sẽ không vượt qua số byte này. (Mặc định là 1450) + Ghi đè lên giá trị MSS của TCP payload + Đặt MSS của TCP payload + Hành vi máy trạm + Xóa các ứng dụng bên ngoài đã cho phép + Đang tải... + Cho phép các ứng dụng VPN: %1$s + Không cho phép ứng dụng VPN: %1$s + Gói %s không còn được cài đặt nữa, gỡ bỏ nó từ danh sách ứng dụng cho phép/không cho phép + VPN được sử dụng cho tất cả các ứng dụng nhưng loại trừ lựa chọn này + VPN được dùng chỉ cho các ứng dụng được lựa chọn + Gỡ bỏ mục nhập máy chủ từ xa? + Giữ + Xóa + Thêm điều khiển từ xa mới + Sử dụng mục kết nối ngẫu nhiên + Bạn cần phải xác định và cho phép ít nhất một máy chủ từ xa. + Danh sách máy chủ + Cho phép ứng dụng + Cài đặt nâng cao + Tùy chọn trả phí + Cài đặt TLS + Không xác định điều khiển từ xa + Hồ sơ VPN trùng lặp + Sao chép hồ sơ: %s + Hiển thị đăng nhập + Nhiều máy trạm OpenVPN cho Android đang tồn tại. Việc phổ biến nhất là OpenVPN cho Android (client này), OpenVPN Connect và OpenVPN Settings <p> Các khách hàng có thể được chia thành hai nhóm: OpenVPN cho Android và OpenVPN Connect sử dụng dịch vụ VPN API chính thức (Android 4.0 +) không cần quyền root và Open VPN khi dùng root. <p> OpenVPN cho Android là ứng dụng mã nguồn mở và phát triển bởi Arne Schwabe. Mục tiêu hàng đầu cho những người dùng cao cấp hơn và khả năng nhập hồ sơ từ các tập tin cấu hình/thay đổi hồ sơ bên trong ứng dụng. Các khách hàng được dựa trên phiên bản cộng đồng của OpenVPN. Nó được dựa trên mã nguồn 2.x OpenVPN. Máy trạm này có thể được xem như là máy trạm chính thức của cộng đồng. <p> OpenVPN Connect là máy trạm mã nguồn mở được phát triển bởi OpenVPN Technologies, Inc. Các khách hàng có thể dùng chung với nhiều mục tiêu vì chúng tôi nhắm vào người dùng bình thường và cho phép nhập khẩu hồ sơ OpenVPN. Máy trạm dựa trên OpenVPN C ++ reimplementation của giao thức OpenVPN (Điều này đã được yêu cầu để cho phép OpenVPN Technologies, Inc xuất bản một ứng dụng iOS OpenVPN).Máy trạm này là chính thức của công nghệ OpenVPN <p> OpenVPN Setting là máy trạm lâu đời nhất và cũng là UI cho mã nguồn mở OpenVPN. Ngược lại, OpenVPN cho Android yêu cầu quyền root và không sử dụng dịch vụ VPN API. Nó không xây dựng phụ thuộc cho Android 4.0+ + Sự khác nhau giữa các máy trạm OpenVPN Android + Bỏ qua định tuyến đa luồng: %s + Android chỉ hỗ trợ định tuyến CIDR cho VPN. Kể từ khi định tuyến không phải CIDR hầu như không dùng nữa, OpenVPN cho Android sẽ sử dụng một định tuyến /32 mà không phải là CIDR và cảnh báo sự cố. + Tethering hoạt động trong khi VPN đang kích hoạt. Các kết nối Tetherd sẽ KHÔNG sử dụng VPN. + Các phiên bản trước KitKat thiết lập giá trị MSS trên kết nối TCP (#61948). OpenVPN sẽ tự động kích hoạt tùy chỉnh mssfix để xử lý lỗi này. + Android sẽ sử dụng cấu hình proxy của bạn để kết nối điện thoại/Wifi khi không có máy chủ DNS được đặt. OpenVPN cho Android sẽ cảnh báo bạn về điều này trong bản ghi.

Khi VPN thiết đặt máy chủ DNS Android sẽ không kèm proxy. Không có API nào thiết đặt cho proxy trong kết nối VPN.

+ Ứng dụng VPN có thể dừng hoạt động khi gỡ cài đặt và cài đặt lại lần nữa. Chi tiết xem tại #80074 + Cấu hình IP của máy trạm và IP trong mặt nạ mạng thì không định tuyến đến VPN. OpenVPN hoạt động bởi sự cố này bằng cách thêm định tuyến mà chuyển đến địa chỉ IP máy trạm và mặt nạ mạng của nó + Mở một thiết bị tun khi một thiết bị tun khác đang hoạt động, có thể dùng để hỗ trợ tun, sự cố trên dịch vụ VPN. Cần khởi động lại để VPN hoạt động. OpenVPN cho Android cố gắng mở lại thiết bị tun và thực sự cần thiết để đóng TUN hiện tại trước khi mở TUN mới để tránh sự cố. Điều này có thể dẫn đến một cửa sổ nơi các gói tin được gửi qua kết nối không dây VPN. Ngay cả việc giải quyết dịch vụ VPN này thỉnh thoảng vẫn gặp sự cố và cần phải khởi động lại thiết bị. + VPN không làm việc cho tất cả người dùng phổ thông. + "Nhiều người dùng báo cáo rằng kết nối của di động/dữ liệu di động thỉnh thoảng bị gián đoạn trong khi sử dụng VPN. Các lỗi này dường như chỉ ảnh hưởng bởi một số nhà cung cấp dịch vụ di động/bản chất của thiết bị và cho đến nay chưa xác định được nguyên nhân gây lỗi." + Chỉ có nguồn đích mới có thể truy cập vượt qua VPN mà không cần VPN. IPv6 không hoạt động cho tất cả. + Không định tuyến CIDR + Proxy chuyển tiếp cho VPN + Đang cài đặt lại ứng dụng VPN + %s và trước đó + Bản sao của %s + Định tuyến đến cấu hình địa chỉ IP + Giá trị MSS sai cho kết nối VPN + Người sử dụng máy tính bảng thứ cấp + Xác định kết nối tùy chỉnh cụ thể. Dùng cẩn thận + Cấu hình tùy chỉnh + Gỡ bỏ mục kết nối +
diff --git a/app/src/main/res/values-zh-rCN/strings-icsopenvpn.xml b/app/src/main/res/values-zh-rCN/strings-icsopenvpn.xml index 4a3da0f4..2e8b95de 100755 --- a/app/src/main/res/values-zh-rCN/strings-icsopenvpn.xml +++ b/app/src/main/res/values-zh-rCN/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - 服务器地址: @@ -14,8 +12,8 @@ 无法读取目录 选择 取消 - 无数据 - LZO 压缩 + 未收到数据 + 启用 LZO 压缩算法 无客户端证书 客户端证书 客户端证书密钥 @@ -36,7 +34,7 @@ 输入 CIDR 格式 IPv4 地址/子网掩码(例如:1.2.3.4/24) IPv4 地址 IPv6 地址 - 请谨慎输入 OpenVPN 的自定义选项。此外请注意许多与 tun 模块有关的 OpenVPN 设置由于系统 VPN 功能的设计而不能得到支持。如果您缺少认为一个很重要的选项,请联系作者。 + 请谨慎输入 OpenVPN 的自定义选项。此外请注意许多与 tun 模块有关的 OpenVPN 设置由于系统 VPN 功能的设计而不能得到支持。如果您觉得缺少一个很重要的选项,请与作者联系。 用户名 密码 静态配置中 TLS 身份验证密钥将被用作静态密钥 @@ -51,7 +49,7 @@ 无法解析 IPv4 地址 无法解析自定义路由 (根据需求留空) - OpenVPN 快捷方式 + OpenVPN 主屏幕快捷方式 连接至 VPN 未找到快捷方式中指定的配置文件 随机主机前缀 @@ -65,7 +63,7 @@ 取消确认 断开已连接的 VPN / 取消连接尝试? 删除 VPN - 检查服务器是否使用了 TLS服务器端扩展 (--remote-cert-tlsserver server) + 检查服务器是否使用 TLS 服务器端扩展 (--remote-cert-tlsserver server) 需要 TLS 服务器证书 检查远程服务器证书的 DN 属性 证书主机名检查 @@ -145,7 +143,7 @@ 添加配置文件 无法找到导入配置文件参考的文件: %1$s 从 %1$s 中导入配置文件 - 您的配置文件中有几个配置项无法在配置菜单中查看和修改,这些配置项将会当成自定义配置选项。下面是自定义的配置选项: + 您的配置文件中有几个配置项无法在配置菜单中查看和修改,这些配置项将会当成自定义配置选项。下面是这些自定义的配置选项: 读取配置文件完成 不关联到本地地址和端口 无本地绑定 @@ -228,6 +226,7 @@ OpenVPN 日志 导入 OpenVPN 配置文件 电池消耗 + 在我的测试中,发现最能消耗电量的是 OpenVPN 的 keepalive 包。大多数 OpenVPN 服务器都在配置文件中使用了“keepalive 10 60”这样的选项,这会导致 OpenVPN 服务器和客户端每隔 10 秒就相互向对方发送一个数据包。<p>虽然这些包很小,几乎不会消耗多少流量,但是频繁地发送这些包会导致手机的无线模块长时间处于活跃状态,并消耗大量的电能。(请参见(英文网页): <a href=\"http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\">)<p> keepalive 选项无法在客户端进行修改,只能在服务器上进行修改。<p>令人郁闷的是,如果发送 keepalive 的频率小于 60 秒,某些 NAT 网关可能会关闭 UDP 连接(我测试得到的结果是 60 秒)。使用 TCP 模式虽然可以将 keepalive 的频率设成很大,但是会造成 TCP over TCP 问题。(请参见(英文网页):<a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">)(TCP over TCP 问题指的是由于 TCP 协议的机制,在 TCP 协议上再次封装一个 TCP 协议时,如果上层 TCP 链路的速度比下层 TCP 协议的链路速度快,就会造成大量 TCP 重传,从而导致网络拥塞,对用户来说就是网络变成龟速 ——译者注) Android 网络分享和便携式热点功能(通过 WiFi, USB 或蓝牙)无法与本程序所使用的 VPN 服务接口一同工作。详情请见 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=34\">issue #34</a> VPN 和中继 连接重试次数 @@ -278,6 +277,7 @@ tls-remote(不再使用) 你可以通过访问 http://crowdin.net/project/ics-openvpn/invite 来帮助翻译 %1$s 正在试图控制 %2$s + 如果继续,你将允许该应用完全控制 OpenVPN for Android,并拦截所有网络流量。除非你信任该应用,否则请不要继续。如果该应用是恶意应用,你需要自行承担所有的后果。 我信任此应用。 没有允许使用外部 API 的应用 已授权的应用:%s @@ -297,6 +297,10 @@ VPN 行为 允许更改 VPN 配置 硬件密钥库: + 应用程序试图使用 OpenVPN 为 Android 的图标 + "入手 Android 4.3 VPN 确认被防范\"覆盖应用程序\"。这将导致在不发生反应,触摸输入的对话框中。如果您有一个应用程序,使用覆盖它可能会导致这种行为。如果你发现违规应用程序联系的应用程序的作者。这个问题影响到所有 VPN 应用程序的 Android 4.3 及更高版本。请参阅 < href =\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\"> 问题 185 < > 有关其他详细信息" + Vpn 确认对话框的 Android 4.3 及更高版本 + 或者你可以给我捐赠与播放存储: 感谢捐赠 %s! 日志已清除。 显示密码 @@ -313,7 +317,45 @@ %3$s: %1$s\n\n%2$s 如果您的 Android 设备已经 root,您可以自担风险安装<a href=\"http://xposed.info/\">Xposed 框架</a> 和 <a href=\"http://repo.xposed.info/module/de.blinkt.vpndialogxposed\">VPN 对话框确认模块</a> 完整授权 + 不会将网络直接连接到本地接口路由通过 VPN。取消选中此选项会将缩进到 VPN 的本地网络的所有流量重都定向。 对本地地址绕过 VPN 用户名/密码文件 + [从进口: %s] + 找不到一些文件。请选择要导入的配置文件的文件: + 若要使用此应用程序需要支持 OpenVPN (通常由您的雇主提供) 的 VPN 提供商/VPN 网关。查阅 http://community.openvpn.net/ OpenVPN 和如何设置您自己的 OpenVPN 服务器的详细信息。 导入日志: + VPN拓扑“%3$s”指定的,但使用ifconfig %1$s %2$s看起来更像是一个网络掩码的IP地址。假设“子网”的拓扑结构。 + mssfix 值必须是一个介于 0 和 9000 之间的整数 + 公布于运行在他们应该限制其发送分组大小,使得后的OpenVPN已包封它们,将得到的UDP包大小的OpenVPN发送到其对等体将不超过此字节数隧道TCP会话。 (默认为1450) + 重写TCP有效载荷的MSS值 + 设置的 TCP MSS 负载 + 客户端行为 + 明确允许外部应用程序 + 加载中... + 允许 VPN 应用程序: %1$s + 不允许VPN应用:%1$s + 从应用程序允许禁止列表中移除它,不再安装包 %s + VPN 用于所有的应用程序,但排除选定 + VPN 是只用于所选的应用程序 + 删除远程服务器的条目吗? + Thorny + 删除 + 添加新的远程服务器 + 您需要至少定义并启用一个远程服务器。 + 服务器列表 + 允许的应用程序 + 高级选项 + 负载设置 + TLS 设置 + 未定义任何远程服务器 + 重复的VPN配置文件 + 创建配置文件副本: %s + 显示日志 + 不同OpenVPN安卓客户端的区别 + 忽略多播路由:%s + 在连接VPN时手机热点依然工作,但连接不会通过VPN。 + 非CIDR路由 + 正在重新安装VPN应用 + 自定义选项 + 删除连接条目 diff --git a/app/src/main/res/values-zh-rTW/strings-icsopenvpn.xml b/app/src/main/res/values-zh-rTW/strings-icsopenvpn.xml index 36360cf1..b0056965 100755 --- a/app/src/main/res/values-zh-rTW/strings-icsopenvpn.xml +++ b/app/src/main/res/values-zh-rTW/strings-icsopenvpn.xml @@ -1,11 +1,9 @@ + - - - 伺服器地址: diff --git a/app/src/main/res/values/refs.xml b/app/src/main/res/values/refs.xml index 4d97e380..6abfb609 100644 --- a/app/src/main/res/values/refs.xml +++ b/app/src/main/res/values/refs.xml @@ -5,10 +5,10 @@ --> - @android:drawable/ic_menu_close_clear_cancel - @android:drawable/ic_menu_share - @android:drawable/ic_menu_save - @android:drawable/ic_menu_view - @android:drawable/ic_menu_delete - @android:drawable/ic_menu_edit + @android:drawable/ic_menu_close_clear_cancel + @android:drawable/ic_menu_share + @android:drawable/ic_menu_save + @android:drawable/ic_menu_view + @android:drawable/ic_menu_delete + @android:drawable/ic_menu_edit diff --git a/app/src/main/res/values/strings-icsopenvpn.xml b/app/src/main/res/values/strings-icsopenvpn.xml index 39ad1193..dec656fc 100755 --- a/app/src/main/res/values/strings-icsopenvpn.xml +++ b/app/src/main/res/values/strings-icsopenvpn.xml @@ -18,7 +18,7 @@ PKCS12 File CA Certificate You must select a certificate - Source code and issue tracker available at http://code.google.com/p/ics-openvpn/ + Source code and issue tracker available at https://github.com/schwabe/ics-openvpn This program uses the following components; see the source code for full details on the licenses About Profiles @@ -294,8 +294,8 @@ Allow changes to VPN Profiles Hardware Keystore: Icon of app trying to use OpenVPN for Android - "Starting with Android 4.3 the VPN confirmation is guarded against \"overlaying apps\". This results in the dialog not reacting to touch input. If you have an app that uses overlays it may cause this behaviour. If you find an offending app contact the author of the app. This problem affect all VPN applications on Android 4.3 and later. See also <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\">Issue 185<a> for additional details" - Vpn Confirm Dialog on Android 4.3 and later + "Starting with Android 4.3 the VPN confirmation is guarded against \"overlaying apps\". This results in the dialog not reacting to touch input. If you have an app that uses overlays it may cause this behaviour. If you find an offending app contact the author of the app. This problem affect all VPN applications on Android 4.3 and later. See also <a href=\"https://github.com/schwabe/ics-openvpn/issues/185\">Issue 185<a> for additional details" + Vpn Confirmation Dialog Alternatively you can send me a donation with the Play Store: Thanks for donating %s! Log cleared. @@ -351,5 +351,36 @@ Multiple OpenVPN clients for Android exist. The most common ones are OpenVPN for Android (this client), OpenVPN Connect and OpenVPN Settings.<p>The clients can be grouped into two groups: OpenVPN for Android and OpenVPN Connect use the official VPNService API (Android 4.0+) and require no root and OpenVPN Settings which uses root.<p>OpenVPN for Android is an open source client and developed by Arne Schwabe. It is targeted at more advanced users and offers many settings and the ability to import profiles from files and to configure/change profiles inside the app. The client is based on the community version of OpenVPN. It is based on the OpenVPN 2.x source code. This client can be seen as the semi officially client of the community. <p>OpenVPN Connect is non open source client that is developed by OpenVPN Technologies, Inc. The client is indented to be general use client and moree targeted at the average user and allows the import of OpenVPN profiles. This client is based on the OpenVPN C++ reimplementation of the OpenVPN protocol (This was required to allow OpenVPN Technologies, Inc to publish an iOS OpenVPN app). This client is the official client of the OpenVPN technologies <p> OpenVPN Settings is the oldest of the clients and also a UI for the open source OpenVPN. In contrast to OpenVPN for Android it requires root and does not use the VPNService API. It does not depend on Android 4.0+ Differences between the OpenVPN Android clients Ignoring multicast route: %s + Android supports only CIDR routes to the VPN. Since non-CIDR routes are almost never used, OpenVPN for Android will use a /32 for routes that are not CIDR and issue a warning. + Tethering works while the VPN is active. The tethered connection will NOT use the VPN. + Early KitKat version set the wrong MSS value on TCP connections (#61948). Try to enable the mssfix option to workaround this bug. + Android will keep using your proxy settings specified for the mobile/Wi-Fi connection when no DNS servers are set. OpenVPN for Android will warn you about this in the log.

When a VPN sets a DNS server Android will not a proxy. There is no API to set a proxy for a VPN connection.

+ VPN apps may stop working when uninstalled and reinstalled again. For details see #80074 + The configured client IP and the IPs in its network mask are not routed to the VPN. OpenVPN works around this bug by explicitly adding a route that corrosponds to the client IP and its netmask + Opening a tun device while another tun device is active, which is used for persist-tun support, crashes the VPNServices on the device. A reboot is required to make VPN work again. OpenVPN for Android tries to avoid reopening the tun device and if really needed first closes the current TUN before opening the new TUN device to avoid to crash. This may lead to a short window where packets are sent over the non-VPN connection. Even with this workaround the VPNServices sometimes crashes and requires a reboot of the device. + VPN does not work at all for secondary users. + "Multiple users report that the mobile connection/mobile data connection is frequently dropped while using the VPN app. The behaviour seems to affect only some mobile provider/device combination and so far no cause/workaround for the bug could be identified. " + Only destination can be reached over the VPN that are reachable without VPN. IPv6 VPNs does not work at all. + Non CIDR Routes + Proxy behaviour for VPNs + Reinstalling VPN apps + %s and earlier + Copy of %s + Route to the configured IP address + Wrong MSS value for VPN connection + Secondary tablet users + Specify custom connection specific options. Use with care + Custom Options + Remove connection entry + Random disconnects from mobile network + Remote networks not reachable + Persist tun mode + %s and later + Connections fails with SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure + Newer OpenVPN for Android versions (0.6.29/March 2015) use a more secure default for the allowed cipher suites (tls-cipher \"DEFAULT:!EXP:!PSK:!SRP:!kRSA\"). Unfortunately, omitting the less secure cipher suites and export cipher suites, especially the omission of cipher suites that do not support Perfect Forward Secrecy (Diffie-Hellman) causes some problems. This usually caused by an well-intentioned but poorly executed attempts to strengthen TLS security by setting tls-cipher on the server or some embedded OSes with stripped down SSL (e.g. MikroTik).\nTo solve this problem the problem, set the tls-cipher settings on the server to reasonable default like tls-cipher \"DEFAULT:!EXP:!PSK:!SRP:!kRSA\". To work around the problem on the client add the custom option tls-cipher DEFAULT on the Android client. + This profile has been added from an external app (%s) and has been marked as not user editable. + Certificate Revocation List + Restarting OpenVPN Service (App crashed probably crashed or killed for memory pressure) + Importing the config yielded an error, cannot save it
diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index 3aa47129..a73cad33 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -4009,6 +4009,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3