From a22a22d8fffb312b0d6dfdf545ff6fe6f05dbcee Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 29 Jan 2018 16:10:15 +0100 Subject: #8818 test NavigationDrawer with espresso test and update sdk therefore --- app/src/androidTest/assets/riseup.net.json | 37 ++ app/src/androidTest/assets/riseup.net.pem | 32 ++ .../test/StartActivityDrawerTest.java | 127 ++++++ app/src/main/res/layout-sw600dp-port/f_log.xml | 29 +- app/src/main/res/layout-sw600dp/f_log.xml | 6 +- app/src/main/res/layout-xlarge/about.xml | 2 +- .../res/layout-xlarge/eip_service_fragment.xml | 4 +- app/src/main/res/layout/about.xml | 2 +- app/src/main/res/layout/drawer_main.xml | 5 - app/src/main/res/layout/eip_service_fragment.xml | 5 +- app/src/main/res/layout/f_log.xml | 4 +- .../testutils/TestSetupHelper.java | 43 ++ .../se/leap/bitmaskclient/ConfigHelperTest.java | 4 +- .../bitmaskclient/eip/ProviderApiManagerTest.java | 16 +- .../leap/bitmaskclient/testutils/MockHelper.java | 398 +++++++++++++++++++ .../bitmaskclient/testutils/TestSetupHelper.java | 434 --------------------- 16 files changed, 686 insertions(+), 462 deletions(-) create mode 100644 app/src/androidTest/assets/riseup.net.json create mode 100644 app/src/androidTest/assets/riseup.net.pem create mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java create mode 100644 app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java create mode 100644 app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java delete mode 100644 app/src/test/java/se/leap/bitmaskclient/testutils/TestSetupHelper.java (limited to 'app/src') diff --git a/app/src/androidTest/assets/riseup.net.json b/app/src/androidTest/assets/riseup.net.json new file mode 100644 index 00000000..9a5ec79e --- /dev/null +++ b/app/src/androidTest/assets/riseup.net.json @@ -0,0 +1,37 @@ +{ + "api_uri": "https://api.black.riseup.net:443", + "api_version": "1", + "ca_cert_fingerprint": "SHA256: a5244308a1374709a9afce95e3ae47c1b44bc2398c0a70ccbf8b3a8a97f29494", + "ca_cert_uri": "https://black.riseup.net/ca.crt", + "default_language": "en", + "description": { + "en": "Riseup is a non-profit collective in Seattle that provides online communication tools for people and groups working toward liberatory social change." + }, + "domain": "riseup.net", + "enrollment_policy": "open", + "languages": [ + "en" + ], + "name": { + "en": "Riseup Networks" + }, + "service": { + "allow_anonymous": false, + "allow_free": true, + "allow_limited_bandwidth": false, + "allow_paid": false, + "allow_registration": true, + "allow_unlimited_bandwidth": true, + "bandwidth_limit": 102400, + "default_service_level": 1, + "levels": { + "1": { + "description": "Please donate.", + "name": "free" + } + } + }, + "services": [ + "openvpn" + ] +} \ No newline at end of file diff --git a/app/src/androidTest/assets/riseup.net.pem b/app/src/androidTest/assets/riseup.net.pem new file mode 100644 index 00000000..c890aff4 --- /dev/null +++ b/app/src/androidTest/assets/riseup.net.pem @@ -0,0 +1,32 @@ +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl +dXAgTmV0d29ya3MxGzAZBgNVBAsMEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UE +AwwXUmlzZXVwIE5ldHdvcmtzIFJvb3QgQ0EwHhcNMTQwNDI4MDAwMDAwWhcNMjQw +NDI4MDAwMDAwWjBZMRgwFgYDVQQKDA9SaXNldXAgTmV0d29ya3MxGzAZBgNVBAsM +Emh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UEAwwXUmlzZXVwIE5ldHdvcmtzIFJv +b3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC76J4ciMJ8Sg0m +TP7DF2DT9zNe0Csk4myoMFC57rfJeqsAlJCv1XMzBmXrw8wq/9z7XHv6n/0sWU7a +7cF2hLR33ktjwODlx7vorU39/lXLndo492ZBhXQtG1INMShyv+nlmzO6GT7ESfNE +LliFitEzwIegpMqxCIHXFuobGSCWF4N0qLHkq/SYUMoOJ96O3hmPSl1kFDRMtWXY +iw1SEKjUvpyDJpVs3NGxeLCaA7bAWhDY5s5Yb2fA1o8ICAqhowurowJpW7n5ZuLK +5VNTlNy6nZpkjt1QycYvNycffyPOFm/Q/RKDlvnorJIrihPkyniV3YY5cGgP+Qkx +HUOT0uLA6LHtzfiyaOqkXwc4b0ZcQD5Vbf6Prd20Ppt6ei0zazkUPwxld3hgyw58 +m/4UIjG3PInWTNf293GngK2Bnz8Qx9e/6TueMSAn/3JBLem56E0WtmbLVjvko+LF +PM5xA+m0BmuSJtrD1MUCXMhqYTtiOvgLBlUm5zkNxALzG+cXB28k6XikXt6MRG7q +hzIPG38zwkooM55yy5i1YfcIi5NjMH6A+t4IJxxwb67MSb6UFOwg5kFokdONZcwj +shczHdG9gLKSBIvrKa03Nd3W2dF9hMbRu//STcQxOailDBQCnXXfAATj9pYzdY4k +ha8VCAREGAKTDAex9oXf1yRuktES4QIDAQABo2AwXjAdBgNVHQ4EFgQUC4tdmLVu +f9hwfK4AGliaet5KkcgwDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwQFMAMBAf8wHwYD +VR0jBBgwFoAUC4tdmLVuf9hwfK4AGliaet5KkcgwDQYJKoZIhvcNAQENBQADggIB +AGzL+GRnYu99zFoy0bXJKOGCF5XUXP/3gIXPRDqQf5g7Cu/jYMID9dB3No4Zmf7v +qHjiSXiS8jx1j/6/Luk6PpFbT7QYm4QLs1f4BlfZOti2KE8r7KRDPIecUsUXW6P/ +3GJAVYH/+7OjA39za9AieM7+H5BELGccGrM5wfl7JeEz8in+V2ZWDzHQO4hMkiTQ +4ZckuaL201F68YpiItBNnJ9N5nHr1MRiGyApHmLXY/wvlrOpclh95qn+lG6/2jk7 +3AmihLOKYMlPwPakJg4PYczm3icFLgTpjV5sq2md9bRyAg3oPGfAuWHmKj2Ikqch +Td5CHKGxEEWbGUWEMP0s1A/JHWiCbDigc4Cfxhy56CWG4q0tYtnc2GMw8OAUO6Wf +Xu5pYKNkzKSEtT/MrNJt44tTZWbKV/Pi/N2Fx36my7TgTUj7g3xcE9eF4JV2H/sg +tsK3pwE0FEqGnT4qMFbixQmc8bGyuakr23wjMvfO7eZUxBuWYR2SkcP26sozF9PF +tGhbZHQVGZUTVPyvwahMUEhbPGVerOW0IYpxkm0x/eaWdTc4vPpf/rIlgbAjarnJ +UN9SaWRlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp +0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO +-----END CERTIFICATE----- \ No newline at end of file diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java new file mode 100644 index 00000000..c7c6a86f --- /dev/null +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java @@ -0,0 +1,127 @@ +package se.leap.bitmaskclient.test; + +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.support.test.InstrumentationRegistry; +import android.support.test.espresso.contrib.DrawerActions; +import android.support.test.rule.ActivityTestRule; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import java.io.IOException; + +import se.leap.bitmaskclient.MainActivity; +import se.leap.bitmaskclient.Provider; +import se.leap.bitmaskclient.testutils.TestSetupHelper; + +import static android.support.test.InstrumentationRegistry.getInstrumentation; +import static android.support.test.espresso.Espresso.onData; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.contrib.DrawerMatchers.isClosed; +import static android.support.test.espresso.contrib.DrawerMatchers.isOpen; +import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; +import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static org.hamcrest.Matchers.anything; +import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES; +import static se.leap.bitmaskclient.MainActivity.ACTION_SHOW_VPN_FRAGMENT; +import static se.leap.bitmaskclient.R.id.aboutLayout; +import static se.leap.bitmaskclient.R.id.accountList; +import static se.leap.bitmaskclient.R.id.configuration_wizard_layout; +import static se.leap.bitmaskclient.R.id.drawer_layout; +import static se.leap.bitmaskclient.R.id.eipServiceFragment; +import static se.leap.bitmaskclient.R.id.log_layout; +import static se.leap.bitmaskclient.R.id.settingsList; + +/** + * Created by cyberta on 19.01.18. + */ + +@RunWith(AndroidJUnit4.class) +public class StartActivityDrawerTest { + + Intent intent; + SharedPreferences preferences; + SharedPreferences.Editor preferencesEditor; + + @Rule + public ActivityTestRule mActivityRule = new ActivityTestRule<>( + MainActivity.class, + true, + false); // Activity is not launched immediately + + @Before + public void setUp() throws IOException { + intent = new Intent(ACTION_SHOW_VPN_FRAGMENT); + Context context = getInstrumentation().getTargetContext(); + + preferences = context.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE); + preferencesEditor = preferences.edit(); + preferencesEditor.putString(Provider.KEY, TestSetupHelper.getInputAsString(InstrumentationRegistry.getContext().getAssets().open("riseup.net.json"))) + .putString(Provider.CA_CERT, TestSetupHelper.getInputAsString(InstrumentationRegistry.getContext().getAssets().open("riseup.net.pem"))) + .commit(); + + } + + + @Test + public void testDisplayDrawer_isOpenUntilUserManuallyOpendDrawerOnce() { + preferencesEditor.putBoolean("navigation_drawer_learned", false).commit(); + mActivityRule.launchActivity(intent); + onView(withId(drawer_layout)).check(matches(isOpen())); + onView(withId(drawer_layout)).perform(DrawerActions.close()); + mActivityRule.finishActivity(); + + mActivityRule.launchActivity(intent); + onView(withId(drawer_layout)).check(matches(isOpen())); + onView(withId(drawer_layout)).perform(DrawerActions.close()); + onView(withId(drawer_layout)).perform(DrawerActions.open()); + mActivityRule.finishActivity(); + + mActivityRule.launchActivity(intent); + onView(withId(drawer_layout)).check(matches(isClosed())); + } + + @Test + public void testClickProviderName_closeDrawerAndShowEipFragment() { + preferencesEditor.putBoolean("navigation_drawer_learned", false).commit(); + mActivityRule.launchActivity(intent); + + onData(anything()).inAdapterView(withId(accountList)).atPosition(0).perform(click()); + onView(withId(drawer_layout)).check(matches(isClosed())); + onView(withId(eipServiceFragment)).check(matches(isDisplayed())); + } + + @Test + public void testClickSwitchProvider_closeDrawerAndShowProviderListView() { + preferencesEditor.putBoolean("navigation_drawer_learned", false).commit(); + mActivityRule.launchActivity(intent); + + onData(anything()).inAdapterView(withId(settingsList)).atPosition(0).perform(click()); + onView(withId(configuration_wizard_layout)).check(matches(isDisplayed())); + } + + @Test + public void testClickLog_closeDrawerAndShowLogFragment() { + preferencesEditor.putBoolean("navigation_drawer_learned", false).commit(); + mActivityRule.launchActivity(intent); + + onData(anything()).inAdapterView(withId(settingsList)).atPosition(1).perform(click()); + onView(withId(log_layout)).check(matches(isDisplayed())); + } + + @Test + public void testClickAbout_closeDrawerAndShowAboutFragment() { + preferencesEditor.putBoolean("navigation_drawer_learned", false).commit(); + mActivityRule.launchActivity(intent); + + onData(anything()).inAdapterView(withId(settingsList)).atPosition(2).perform(click()); + onView(withId(aboutLayout)).check(matches(isDisplayed())); + } +} diff --git a/app/src/main/res/layout-sw600dp-port/f_log.xml b/app/src/main/res/layout-sw600dp-port/f_log.xml index da46450c..4ee64811 100644 --- a/app/src/main/res/layout-sw600dp-port/f_log.xml +++ b/app/src/main/res/layout-sw600dp-port/f_log.xml @@ -5,9 +5,30 @@ --> + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical" + android:padding="@dimen/activity_margin" + android:id="@+id/log_layout"> + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp/f_log.xml b/app/src/main/res/layout-sw600dp/f_log.xml index 9ad30208..ec66af07 100644 --- a/app/src/main/res/layout-sw600dp/f_log.xml +++ b/app/src/main/res/layout-sw600dp/f_log.xml @@ -5,12 +5,12 @@ --> - + android:padding="20dp" + android:id="@+id/log_layout" + > + android:layout_marginStart="20dp" + android:id="@+id/eipServiceFragment" + > - - + android:layout_height="match_parent" + android:id="@+id/eipServiceFragment" + > + android:padding="16dp" + android:id="@+id/log_layout" + > . + */ + +package se.leap.bitmaskclient.testutils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +/** + * Created by cyberta on 08.10.17. + */ + +public class TestSetupHelper { + + public static String getInputAsString(InputStream fileAsInputStream) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(fileAsInputStream)); + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + while (line != null) { + sb.append(line); + line = br.readLine(); + } + + return sb.toString(); + } + +} diff --git a/app/src/test/java/se/leap/bitmaskclient/ConfigHelperTest.java b/app/src/test/java/se/leap/bitmaskclient/ConfigHelperTest.java index a9a5733d..84f38086 100644 --- a/app/src/test/java/se/leap/bitmaskclient/ConfigHelperTest.java +++ b/app/src/test/java/se/leap/bitmaskclient/ConfigHelperTest.java @@ -6,9 +6,9 @@ import org.junit.Before; import org.junit.Test; import se.leap.bitmaskclient.testutils.MockSharedPreferences; -import se.leap.bitmaskclient.testutils.TestSetupHelper; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static se.leap.bitmaskclient.Constants.PROVIDER_CONFIGURED; import static se.leap.bitmaskclient.testutils.TestSetupHelper.getInputAsString; diff --git a/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java b/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java index f04ec0eb..c23e4f49 100644 --- a/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java +++ b/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java @@ -52,14 +52,14 @@ import static se.leap.bitmaskclient.ProviderAPI.RESULT_KEY; import static se.leap.bitmaskclient.testutils.BackendMockResponses.BackendMockProvider.TestBackendErrorCase.ERROR_CASE_UPDATED_CERTIFICATE; import static se.leap.bitmaskclient.testutils.BackendMockResponses.BackendMockProvider.TestBackendErrorCase.NO_ERROR; import static se.leap.bitmaskclient.testutils.TestSetupHelper.getInputAsString; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockBundle; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockClientGenerator; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockFingerprintForCertificate; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockIntent; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockProviderApiConnector; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockResources; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockResultReceiver; -import static se.leap.bitmaskclient.testutils.TestSetupHelper.mockTextUtils; +import static se.leap.bitmaskclient.testutils.MockHelper.mockBundle; +import static se.leap.bitmaskclient.testutils.MockHelper.mockClientGenerator; +import static se.leap.bitmaskclient.testutils.MockHelper.mockFingerprintForCertificate; +import static se.leap.bitmaskclient.testutils.MockHelper.mockIntent; +import static se.leap.bitmaskclient.testutils.MockHelper.mockProviderApiConnector; +import static se.leap.bitmaskclient.testutils.MockHelper.mockResources; +import static se.leap.bitmaskclient.testutils.MockHelper.mockResultReceiver; +import static se.leap.bitmaskclient.testutils.MockHelper.mockTextUtils; /** diff --git a/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java b/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java new file mode 100644 index 00000000..8372c9bc --- /dev/null +++ b/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java @@ -0,0 +1,398 @@ +package se.leap.bitmaskclient.testutils; + +import android.content.Intent; +import android.content.res.Resources; +import android.os.Bundle; +import android.os.Parcelable; +import android.os.ResultReceiver; +import android.support.annotation.NonNull; +import android.text.TextUtils; + +import org.json.JSONException; +import org.json.JSONObject; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + +import java.io.IOException; +import java.io.InputStream; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateEncodingException; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import okhttp3.OkHttpClient; +import se.leap.bitmaskclient.ConfigHelper; +import se.leap.bitmaskclient.OkHttpClientGenerator; +import se.leap.bitmaskclient.R; +import se.leap.bitmaskclient.testutils.BackendMockResponses.BackendMockProvider; +import se.leap.bitmaskclient.testutils.matchers.BundleMatcher; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; +import static org.powermock.api.mockito.PowerMockito.mockStatic; + +/** + * Created by cyberta on 29.01.18. + */ + +public class MockHelper { + @NonNull + public static Bundle mockBundle() { + final Map fakeBooleanBundle = new HashMap<>(); + final Map fakeStringBundle = new HashMap<>(); + final Map fakeIntBundle = new HashMap<>(); + final Map fakeParcelableBundle = new HashMap<>(); + + Bundle bundle = mock(Bundle.class); + + //mock String values in Bundle + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + String value = ((String) arguments[1]); + fakeStringBundle.put(key, value); + return null; + } + }).when(bundle).putString(anyString(), anyString()); + when(bundle.getString(anyString())).thenAnswer(new Answer() { + @Override + public String answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + return fakeStringBundle.get(key); + } + }); + + //mock Boolean values in Bundle + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + Boolean value = ((boolean) arguments[1]); + fakeBooleanBundle.put(key, value); + return null; + } + }).when(bundle).putBoolean(anyString(), anyBoolean()); + when(bundle.getBoolean(anyString())).thenAnswer(new Answer() { + @Override + public Boolean answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + return fakeBooleanBundle.get(key); + } + }); + + //mock Integer values in Bundle + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + Integer value = ((int) arguments[1]); + fakeIntBundle.put(key, value); + return null; + } + }).when(bundle).putInt(anyString(), anyInt()); + when(bundle.getInt(anyString())).thenAnswer(new Answer() { + @Override + public Integer answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + return fakeIntBundle.get(key); + } + }); + + //mock Parcelable values in Bundle + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + Parcelable value = ((Parcelable) arguments[1]); + fakeParcelableBundle.put(key, value); + return null; + } + }).when(bundle).putParcelable(anyString(), any(Parcelable.class)); + when(bundle.getParcelable(anyString())).thenAnswer(new Answer() { + @Override + public Parcelable answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + return fakeParcelableBundle.get(key); + } + }); + + //mock get + when(bundle.get(anyString())).thenAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + if (fakeBooleanBundle.containsKey(key)) { + return fakeBooleanBundle.get(key); + } else if (fakeIntBundle.containsKey(key)) { + return fakeIntBundle.get(key); + } else if (fakeStringBundle.containsKey(key)) { + return fakeStringBundle.get(key); + } else { + return fakeParcelableBundle.get(key); + } + } + }); + + //mock getKeySet + when(bundle.keySet()).thenAnswer(new Answer>() { + @Override + public Set answer(InvocationOnMock invocation) throws Throwable { + //this whole approach as a drawback: + //you should not add the same keys for values of different types + HashSet keys = new HashSet(); + keys.addAll(fakeBooleanBundle.keySet()); + keys.addAll(fakeIntBundle.keySet()); + keys.addAll(fakeStringBundle.keySet()); + keys.addAll(fakeParcelableBundle.keySet()); + return keys; + } + }); + + //mock containsKey + when(bundle.containsKey(anyString())).thenAnswer(new Answer() { + @Override + public Boolean answer(InvocationOnMock invocation) throws Throwable { + String key = (String) invocation.getArguments()[0]; + return fakeBooleanBundle.containsKey(key) || + fakeStringBundle.containsKey(key) || + fakeIntBundle.containsKey(key) || + fakeParcelableBundle.containsKey(key); + } + }); + + return bundle; + } + + public static Intent mockIntent() { + Intent intent = mock(Intent.class); + final String[] action = new String[1]; + final Map fakeExtras = new HashMap<>(); + final List categories = new ArrayList<>(); + + + //mock Action in intent + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + action[0] = ((String) arguments[0]); + return null; + } + }).when(intent).setAction(anyString()); + when(intent.getAction()).thenAnswer(new Answer() { + @Override + public String answer(InvocationOnMock invocation) throws Throwable { + return action[0]; + } + }); + + //mock Bundle in intent extras + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + Bundle value = ((Bundle) arguments[1]); + fakeExtras.put(key, value); + return null; + } + }).when(intent).putExtra(anyString(), any(Bundle.class)); + when(intent.getBundleExtra(anyString())).thenAnswer(new Answer() { + @Override + public Bundle answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + return (Bundle) fakeExtras.get(key); + } + }); + + //mock Parcelable in intent extras + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + Parcelable value = ((Parcelable) arguments[1]); + fakeExtras.put(key, value); + return null; + } + }).when(intent).putExtra(anyString(), any(Parcelable.class)); + when(intent.getParcelableExtra(anyString())).thenAnswer(new Answer() { + @Override + public Parcelable answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + String key = ((String) arguments[0]); + return (Parcelable) fakeExtras.get(key); + } + }); + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + categories.add(((String) arguments[0])); + return null; + } + }).when(intent).addCategory(anyString()); + + when(intent.getCategories()).thenAnswer(new Answer>() { + @Override + public Set answer(InvocationOnMock invocation) throws Throwable { + return new HashSet<>(categories); + } + }); + + return intent; + } + + public static void mockTextUtils() { + mockStatic(TextUtils.class); + + when(TextUtils.equals(any(CharSequence.class), any(CharSequence.class))).thenAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + CharSequence a = (CharSequence) invocation.getArguments()[0]; + CharSequence b = (CharSequence) invocation.getArguments()[1]; + if (a == b) return true; + int length; + if (a != null && b != null && (length = a.length()) == b.length()) { + if (a instanceof String && b instanceof String) { + return a.equals(b); + } else { + for (int i = 0; i < length; i++) { + if (a.charAt(i) != b.charAt(i)) return false; + } + return true; + } + } + return false; + } + }); + + when(TextUtils.isEmpty(any(CharSequence.class))).thenAnswer(new Answer() { + @Override + public Boolean answer(InvocationOnMock invocation) throws Throwable { + CharSequence param = (CharSequence) invocation.getArguments()[0]; + return param == null || param.length() == 0; + } + }); + } + + public static ResultReceiver mockResultReceiver(final int expectedResultCode, final Bundle expectedBundle) { + ResultReceiver resultReceiver = mock(ResultReceiver.class); + + doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] arguments = invocation.getArguments(); + int resultCode = (int) arguments[0]; + Bundle bundle = (Bundle) arguments[1]; + Set keys = expectedBundle.keySet(); + Iterator iterator = keys.iterator(); + HashMap expectedIntegers = new HashMap<>(); + HashMap expectedStrings = new HashMap<>(); + HashMap expectedBooleans = new HashMap<>(); + HashMap expectedParcelables = new HashMap<>(); + while (iterator.hasNext()) { + String key = iterator.next(); + Object value = expectedBundle.get(key); + + if (value instanceof Boolean) { + expectedBooleans.put(key, (Boolean) value); + } else if (value instanceof Integer) { + expectedIntegers.put(key, (Integer) value); + } else if (value instanceof String) { + expectedStrings.put(key, (String) value); + } else if (value instanceof Parcelable) { + expectedParcelables.put(key, (Parcelable) value); + } + } + assertThat("expected bundle: ", bundle, new BundleMatcher(expectedIntegers, expectedStrings, expectedBooleans, expectedParcelables)); + assertEquals("expected resultCode: ", expectedResultCode, resultCode); + return null; + } + }).when(resultReceiver).send(anyInt(), any(Bundle.class)); + return resultReceiver; + } + + public static void mockFingerprintForCertificate(String mockedFingerprint) throws CertificateEncodingException, NoSuchAlgorithmException { + mockStatic(ConfigHelper.class); + when(ConfigHelper.getFingerprintFromCertificate(any(X509Certificate.class), anyString())).thenReturn(mockedFingerprint); + when(ConfigHelper.checkErroneousDownload(anyString())).thenCallRealMethod(); + when(ConfigHelper.parseX509CertificateFromString(anyString())).thenCallRealMethod(); + } + + public static void mockProviderApiConnector(final BackendMockProvider.TestBackendErrorCase errorCase) throws IOException { + BackendMockProvider.provideBackendResponsesFor(errorCase); + } + + public static OkHttpClientGenerator mockClientGenerator() { + OkHttpClientGenerator mockClientGenerator = mock(OkHttpClientGenerator.class); + OkHttpClient mockedOkHttpClient = mock(OkHttpClient.class); + when(mockClientGenerator.initCommercialCAHttpClient(any(JSONObject.class))).thenReturn(mockedOkHttpClient); + when(mockClientGenerator.initSelfSignedCAHttpClient(any(JSONObject.class))).thenReturn(mockedOkHttpClient); + when(mockClientGenerator.initSelfSignedCAHttpClient(any(JSONObject.class), anyString())).thenReturn(mockedOkHttpClient); + return mockClientGenerator; + } + + public static Resources mockResources(InputStream inputStream) throws IOException, JSONException { + Resources mockedResources = mock(Resources.class, RETURNS_DEEP_STUBS); + JSONObject errorMessages = new JSONObject(TestSetupHelper.getInputAsString(inputStream)); + + + when(mockedResources.getString(R.string.warning_corrupted_provider_details)). + thenReturn(errorMessages.getString("warning_corrupted_provider_details")); + when(mockedResources.getString(R.string.server_unreachable_message)). + thenReturn(errorMessages.getString("server_unreachable_message")); + when(mockedResources.getString(R.string.error_security_pinnedcertificate)). + thenReturn(errorMessages.getString("error.security.pinnedcertificate")); + when(mockedResources.getString(R.string.malformed_url)). + thenReturn(errorMessages.getString("malformed_url")); + when(mockedResources.getString(R.string.certificate_error)). + thenReturn(errorMessages.getString("certificate_error")); + when(mockedResources.getString(R.string.error_srp_math_error_user_message)). + thenReturn(errorMessages.getString("error_srp_math_error_user_message")); + when(mockedResources.getString(R.string.error_bad_user_password_user_message)). + thenReturn(errorMessages.getString("error_bad_user_password_user_message")); + when(mockedResources.getString(R.string.error_not_valid_password_user_message)). + thenReturn(errorMessages.getString("error_not_valid_password_user_message")); + when(mockedResources.getString(R.string.error_client_http_user_message)). + thenReturn(errorMessages.getString("error_client_http_user_message")); + when(mockedResources.getString(R.string.error_io_exception_user_message)). + thenReturn(errorMessages.getString("error_io_exception_user_message")); + when(mockedResources.getString(R.string.error_json_exception_user_message)). + thenReturn(errorMessages.getString("error_json_exception_user_message")); + when(mockedResources.getString(R.string.error_no_such_algorithm_exception_user_message)). + thenReturn(errorMessages.getString("error_no_such_algorithm_exception_user_message")); + when(mockedResources.getString(R.string.warning_corrupted_provider_details)). + thenReturn(errorMessages.getString("warning_corrupted_provider_details")); + when(mockedResources.getString(R.string.warning_corrupted_provider_cert)). + thenReturn(errorMessages.getString("warning_corrupted_provider_cert")); + when(mockedResources.getString(R.string.warning_expired_provider_cert)). + thenReturn(errorMessages.getString("warning_expired_provider_cert")); + return mockedResources; + } +} diff --git a/app/src/test/java/se/leap/bitmaskclient/testutils/TestSetupHelper.java b/app/src/test/java/se/leap/bitmaskclient/testutils/TestSetupHelper.java deleted file mode 100644 index f8f70eaf..00000000 --- a/app/src/test/java/se/leap/bitmaskclient/testutils/TestSetupHelper.java +++ /dev/null @@ -1,434 +0,0 @@ -/** - * Copyright (c) 2018 LEAP Encryption Access Project and contributers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package se.leap.bitmaskclient.testutils; - -import android.content.Intent; -import android.content.res.Resources; -import android.os.Bundle; -import android.os.Parcelable; -import android.os.ResultReceiver; -import android.support.annotation.NonNull; -import android.text.TextUtils; - -import org.json.JSONException; -import org.json.JSONObject; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import okhttp3.OkHttpClient; -import se.leap.bitmaskclient.ConfigHelper; -import se.leap.bitmaskclient.OkHttpClientGenerator; -import se.leap.bitmaskclient.R; -import se.leap.bitmaskclient.testutils.BackendMockResponses.BackendMockProvider; -import se.leap.bitmaskclient.testutils.matchers.BundleMatcher; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyBoolean; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.RETURNS_DEEP_STUBS; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.powermock.api.mockito.PowerMockito.mockStatic; - -/** - * Created by cyberta on 08.10.17. - */ - -public class TestSetupHelper { - - - - public static String getInputAsString(InputStream fileAsInputStream) throws IOException { - BufferedReader br = new BufferedReader(new InputStreamReader(fileAsInputStream)); - StringBuilder sb = new StringBuilder(); - String line = br.readLine(); - while (line != null) { - sb.append(line); - line = br.readLine(); - } - - return sb.toString(); - } - - @NonNull - public static Bundle mockBundle() { - final Map fakeBooleanBundle = new HashMap<>(); - final Map fakeStringBundle = new HashMap<>(); - final Map fakeIntBundle = new HashMap<>(); - final Map fakeParcelableBundle = new HashMap<>(); - - Bundle bundle = mock(Bundle.class); - - //mock String values in Bundle - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - String value = ((String) arguments[1]); - fakeStringBundle.put(key, value); - return null; - } - }).when(bundle).putString(anyString(), anyString()); - when(bundle.getString(anyString())).thenAnswer(new Answer() { - @Override - public String answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - return fakeStringBundle.get(key); - } - }); - - //mock Boolean values in Bundle - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - Boolean value = ((boolean) arguments[1]); - fakeBooleanBundle.put(key, value); - return null; - } - }).when(bundle).putBoolean(anyString(), anyBoolean()); - when(bundle.getBoolean(anyString())).thenAnswer(new Answer() { - @Override - public Boolean answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - return fakeBooleanBundle.get(key); - } - }); - - //mock Integer values in Bundle - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - Integer value = ((int) arguments[1]); - fakeIntBundle.put(key, value); - return null; - } - }).when(bundle).putInt(anyString(), anyInt()); - when(bundle.getInt(anyString())).thenAnswer(new Answer() { - @Override - public Integer answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - return fakeIntBundle.get(key); - } - }); - - //mock Parcelable values in Bundle - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - Parcelable value = ((Parcelable) arguments[1]); - fakeParcelableBundle.put(key, value); - return null; - } - }).when(bundle).putParcelable(anyString(), any(Parcelable.class)); - when(bundle.getParcelable(anyString())).thenAnswer(new Answer() { - @Override - public Parcelable answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - return fakeParcelableBundle.get(key); - } - }); - - //mock get - when(bundle.get(anyString())).thenAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - if (fakeBooleanBundle.containsKey(key)) { - return fakeBooleanBundle.get(key); - } else if (fakeIntBundle.containsKey(key)) { - return fakeIntBundle.get(key); - } else if (fakeStringBundle.containsKey(key)) { - return fakeStringBundle.get(key); - } else { - return fakeParcelableBundle.get(key); - } - } - }); - - //mock getKeySet - when(bundle.keySet()).thenAnswer(new Answer>() { - @Override - public Set answer(InvocationOnMock invocation) throws Throwable { - //this whole approach as a drawback: - //you should not add the same keys for values of different types - HashSet keys = new HashSet(); - keys.addAll(fakeBooleanBundle.keySet()); - keys.addAll(fakeIntBundle.keySet()); - keys.addAll(fakeStringBundle.keySet()); - keys.addAll(fakeParcelableBundle.keySet()); - return keys; - } - }); - - //mock containsKey - when(bundle.containsKey(anyString())).thenAnswer(new Answer() { - @Override - public Boolean answer(InvocationOnMock invocation) throws Throwable { - String key = (String) invocation.getArguments()[0]; - return fakeBooleanBundle.containsKey(key) || - fakeStringBundle.containsKey(key) || - fakeIntBundle.containsKey(key) || - fakeParcelableBundle.containsKey(key); - } - }); - - return bundle; - } - - public static Intent mockIntent() { - Intent intent = mock(Intent.class); - final String[] action = new String[1]; - final Map fakeExtras = new HashMap<>(); - final List categories = new ArrayList<>(); - - - //mock Action in intent - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - action[0] = ((String) arguments[0]); - return null; - } - }).when(intent).setAction(anyString()); - when(intent.getAction()).thenAnswer(new Answer() { - @Override - public String answer(InvocationOnMock invocation) throws Throwable { - return action[0]; - } - }); - - //mock Bundle in intent extras - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - Bundle value = ((Bundle) arguments[1]); - fakeExtras.put(key, value); - return null; - } - }).when(intent).putExtra(anyString(), any(Bundle.class)); - when(intent.getBundleExtra(anyString())).thenAnswer(new Answer() { - @Override - public Bundle answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - return (Bundle) fakeExtras.get(key); - } - }); - - //mock Parcelable in intent extras - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - Parcelable value = ((Parcelable) arguments[1]); - fakeExtras.put(key, value); - return null; - } - }).when(intent).putExtra(anyString(), any(Parcelable.class)); - when(intent.getParcelableExtra(anyString())).thenAnswer(new Answer() { - @Override - public Parcelable answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - String key = ((String) arguments[0]); - return (Parcelable) fakeExtras.get(key); - } - }); - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - categories.add(((String) arguments[0])); - return null; - } - }).when(intent).addCategory(anyString()); - - when(intent.getCategories()).thenAnswer(new Answer>() { - @Override - public Set answer(InvocationOnMock invocation) throws Throwable { - return new HashSet<>(categories); - } - }); - - return intent; - } - - public static void mockTextUtils() { - mockStatic(TextUtils.class); - - when(TextUtils.equals(any(CharSequence.class), any(CharSequence.class))).thenAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - CharSequence a = (CharSequence) invocation.getArguments()[0]; - CharSequence b = (CharSequence) invocation.getArguments()[1]; - if (a == b) return true; - int length; - if (a != null && b != null && (length = a.length()) == b.length()) { - if (a instanceof String && b instanceof String) { - return a.equals(b); - } else { - for (int i = 0; i < length; i++) { - if (a.charAt(i) != b.charAt(i)) return false; - } - return true; - } - } - return false; - } - }); - - when(TextUtils.isEmpty(any(CharSequence.class))).thenAnswer(new Answer() { - @Override - public Boolean answer(InvocationOnMock invocation) throws Throwable { - CharSequence param = (CharSequence) invocation.getArguments()[0]; - return param == null || param.length() == 0; - } - }); - } - - - public static ResultReceiver mockResultReceiver(final int expectedResultCode, final Bundle expectedBundle) { - ResultReceiver resultReceiver = mock(ResultReceiver.class); - - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - Object[] arguments = invocation.getArguments(); - int resultCode = (int) arguments[0]; - Bundle bundle = (Bundle) arguments[1]; - Set keys = expectedBundle.keySet(); - Iterator iterator = keys.iterator(); - HashMap expectedIntegers = new HashMap<>(); - HashMap expectedStrings = new HashMap<>(); - HashMap expectedBooleans = new HashMap<>(); - HashMap expectedParcelables = new HashMap<>(); - while (iterator.hasNext()) { - String key = iterator.next(); - Object value = expectedBundle.get(key); - - if (value instanceof Boolean) { - expectedBooleans.put(key, (Boolean) value); - } else if (value instanceof Integer) { - expectedIntegers.put(key, (Integer) value); - } else if (value instanceof String) { - expectedStrings.put(key, (String) value); - } else if (value instanceof Parcelable) { - expectedParcelables.put(key, (Parcelable) value); - } - } - assertThat("expected bundle: ", bundle, new BundleMatcher(expectedIntegers, expectedStrings, expectedBooleans, expectedParcelables)); - assertEquals("expected resultCode: ", expectedResultCode, resultCode); - return null; - } - }).when(resultReceiver).send(anyInt(), any(Bundle.class)); - return resultReceiver; - } - - public static void mockFingerprintForCertificate(String mockedFingerprint) throws CertificateEncodingException, NoSuchAlgorithmException { - mockStatic(ConfigHelper.class); - when(ConfigHelper.getFingerprintFromCertificate(any(X509Certificate.class), anyString())).thenReturn(mockedFingerprint); - when(ConfigHelper.checkErroneousDownload(anyString())).thenCallRealMethod(); - when(ConfigHelper.parseX509CertificateFromString(anyString())).thenCallRealMethod(); - } - - public static void mockProviderApiConnector(final BackendMockProvider.TestBackendErrorCase errorCase) throws IOException { - BackendMockProvider.provideBackendResponsesFor(errorCase); - } - - public static OkHttpClientGenerator mockClientGenerator() { - OkHttpClientGenerator mockClientGenerator = mock(OkHttpClientGenerator.class); - OkHttpClient mockedOkHttpClient = mock(OkHttpClient.class); - when(mockClientGenerator.initCommercialCAHttpClient(any(JSONObject.class))).thenReturn(mockedOkHttpClient); - when(mockClientGenerator.initSelfSignedCAHttpClient(any(JSONObject.class))).thenReturn(mockedOkHttpClient); - when(mockClientGenerator.initSelfSignedCAHttpClient(any(JSONObject.class), anyString())).thenReturn(mockedOkHttpClient); - return mockClientGenerator; - } - - public static Resources mockResources(InputStream inputStream) throws IOException, JSONException { - Resources mockedResources = mock(Resources.class, RETURNS_DEEP_STUBS); - JSONObject errorMessages = new JSONObject(getInputAsString(inputStream)); - - - when(mockedResources.getString(R.string.warning_corrupted_provider_details)). - thenReturn(errorMessages.getString("warning_corrupted_provider_details")); - when(mockedResources.getString(R.string.server_unreachable_message)). - thenReturn(errorMessages.getString("server_unreachable_message")); - when(mockedResources.getString(R.string.error_security_pinnedcertificate)). - thenReturn(errorMessages.getString("error.security.pinnedcertificate")); - when(mockedResources.getString(R.string.malformed_url)). - thenReturn(errorMessages.getString("malformed_url")); - when(mockedResources.getString(R.string.certificate_error)). - thenReturn(errorMessages.getString("certificate_error")); - when(mockedResources.getString(R.string.error_srp_math_error_user_message)). - thenReturn(errorMessages.getString("error_srp_math_error_user_message")); - when(mockedResources.getString(R.string.error_bad_user_password_user_message)). - thenReturn(errorMessages.getString("error_bad_user_password_user_message")); - when(mockedResources.getString(R.string.error_not_valid_password_user_message)). - thenReturn(errorMessages.getString("error_not_valid_password_user_message")); - when(mockedResources.getString(R.string.error_client_http_user_message)). - thenReturn(errorMessages.getString("error_client_http_user_message")); - when(mockedResources.getString(R.string.error_io_exception_user_message)). - thenReturn(errorMessages.getString("error_io_exception_user_message")); - when(mockedResources.getString(R.string.error_json_exception_user_message)). - thenReturn(errorMessages.getString("error_json_exception_user_message")); - when(mockedResources.getString(R.string.error_no_such_algorithm_exception_user_message)). - thenReturn(errorMessages.getString("error_no_such_algorithm_exception_user_message")); - when(mockedResources.getString(R.string.warning_corrupted_provider_details)). - thenReturn(errorMessages.getString("warning_corrupted_provider_details")); - when(mockedResources.getString(R.string.warning_corrupted_provider_cert)). - thenReturn(errorMessages.getString("warning_corrupted_provider_cert")); - when(mockedResources.getString(R.string.warning_expired_provider_cert)). - thenReturn(errorMessages.getString("warning_expired_provider_cert")); - return mockedResources; - } - -} -- cgit v1.2.3 From 5c158ea0b57c116744b33392fcd5ebcac21f8fe0 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 29 Jan 2018 16:12:02 +0100 Subject: #8818 keep legacy ui tests in seperate foler until tests are reimplemented --- .../test/BaseTestDashboardFragment.java | 94 --- .../leap/bitmaskclient/test/ConnectionManager.java | 31 - .../se/leap/bitmaskclient/test/FromAssets.java | 26 - .../se/leap/bitmaskclient/test/Screenshot.java | 54 -- .../bitmaskclient/test/TestCalendarProvider.java | 26 - .../se/leap/bitmaskclient/test/TestConstants.java | 26 - .../test/TestDashboardIntegration.java | 60 -- .../java/se/leap/bitmaskclient/test/TestEIP.java | 81 --- .../leap/bitmaskclient/test/TestEipFragment.java | 73 --- .../bitmaskclient/test/TestGatewaysManager.java | 161 ------ .../bitmaskclient/test/TestLeapSRPSession.java | 629 --------------------- .../test/TestProviderListActivity.java | 114 ---- .../bitmaskclient/test/TestUserStatusFragment.java | 34 -- .../test/TestVpnCertificateValidator.java | 86 --- .../test/UserStatusTestController.java | 83 --- .../leap/bitmaskclient/test/VpnTestController.java | 136 ----- .../legacy/BaseTestDashboardFragment.java | 94 +++ app/src/androidTest/legacy/ConnectionManager.java | 31 + app/src/androidTest/legacy/FromAssets.java | 26 + app/src/androidTest/legacy/Screenshot.java | 54 ++ .../androidTest/legacy/TestCalendarProvider.java | 26 + app/src/androidTest/legacy/TestConstants.java | 26 + .../legacy/TestDashboardIntegration.java | 60 ++ app/src/androidTest/legacy/TestEipFragment.java | 73 +++ .../androidTest/legacy/TestGatewaysManager.java | 161 ++++++ app/src/androidTest/legacy/TestLeapSRPSession.java | 629 +++++++++++++++++++++ .../legacy/TestProviderListActivity.java | 114 ++++ .../androidTest/legacy/TestUserStatusFragment.java | 34 ++ .../legacy/TestVpnCertificateValidator.java | 86 +++ .../legacy/UserStatusTestController.java | 83 +++ app/src/androidTest/legacy/VpnTestController.java | 137 +++++ 31 files changed, 1634 insertions(+), 1714 deletions(-) delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboardFragment.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/Screenshot.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestCalendarProvider.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestConstants.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestEipFragment.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestProviderListActivity.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/UserStatusTestController.java delete mode 100644 app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java create mode 100644 app/src/androidTest/legacy/BaseTestDashboardFragment.java create mode 100644 app/src/androidTest/legacy/ConnectionManager.java create mode 100644 app/src/androidTest/legacy/FromAssets.java create mode 100644 app/src/androidTest/legacy/Screenshot.java create mode 100644 app/src/androidTest/legacy/TestCalendarProvider.java create mode 100644 app/src/androidTest/legacy/TestConstants.java create mode 100644 app/src/androidTest/legacy/TestDashboardIntegration.java create mode 100644 app/src/androidTest/legacy/TestEipFragment.java create mode 100644 app/src/androidTest/legacy/TestGatewaysManager.java create mode 100644 app/src/androidTest/legacy/TestLeapSRPSession.java create mode 100644 app/src/androidTest/legacy/TestProviderListActivity.java create mode 100644 app/src/androidTest/legacy/TestUserStatusFragment.java create mode 100644 app/src/androidTest/legacy/TestVpnCertificateValidator.java create mode 100644 app/src/androidTest/legacy/UserStatusTestController.java create mode 100644 app/src/androidTest/legacy/VpnTestController.java (limited to 'app/src') diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboardFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboardFragment.java deleted file mode 100644 index e187d424..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboardFragment.java +++ /dev/null @@ -1,94 +0,0 @@ -package se.leap.bitmaskclient.test; - -import android.content.Context; -import android.graphics.Rect; -import android.test.ActivityInstrumentationTestCase2; -import android.view.View; - -import com.robotium.solo.Solo; - -import se.leap.bitmaskclient.ProviderListActivity; -import se.leap.bitmaskclient.Dashboard; -import se.leap.bitmaskclient.R; - -public abstract class BaseTestDashboardFragment extends ActivityInstrumentationTestCase2 { - - Solo solo; - Context context; - UserStatusTestController user_status_controller; - VpnTestController vpn_controller; - - public BaseTestDashboardFragment() { super(Dashboard.class); } - - @Override - protected void setUp() throws Exception { - super.setUp(); - context = getInstrumentation().getContext(); - solo = new Solo(getInstrumentation(), getActivity()); - Screenshot.initialize(solo); - user_status_controller = new UserStatusTestController(solo); - vpn_controller = new VpnTestController(solo); - ConnectionManager.setMobileDataEnabled(true, context); - solo.unlockScreen(); - if (solo.searchText(solo.getString(R.string.configuration_wizard_title))) { - toDashboardAnonymously("demo.bitmask.net"); - } - } - - void changeProviderAndLogIn(String provider) { - tapSwitchProvider(); - solo.clickOnText(provider); - useRegistered(); - } - - void tapSwitchProvider() { - solo.clickOnMenuItem(solo.getString(R.string.switch_provider_menu_option)); - solo.waitForActivity(ProviderListActivity.class); - } - - private void useRegistered() { - solo.waitForFragmentById(R.id.provider_detail_fragment); - String text = solo.getString(R.string.signup_or_login_button); - clickAndWaitForDashboard(text); - user_status_controller.logIn("parmegvtest10", "holahola2"); - } - - private void clickAndWaitForDashboard(String click_text) { - solo.clickOnButton(click_text); - assertTrue(solo.waitForActivity(Dashboard.class, 80 * 1000)); - } - - static boolean isShownWithinConfinesOfVisibleScreen(View view) { - Rect scrollBounds = new Rect(); - view.getHitRect(scrollBounds); - return view.getLocalVisibleRect(scrollBounds); - } - - - private void toDashboardAnonymously(String provider) { - selectProvider(provider); - useAnonymously(); - } - - private void useAnonymously() { - String text = solo.getString(R.string.use_anonymously_button); - clickAndWaitForDashboard(text); - } - - - private void selectProvider(String provider) { - solo.clickOnText(provider); - Screenshot.setTimeToSleep(1); - Screenshot.take("Configuring provider"); - waitForProviderDetails(); - } - - private void waitForProviderDetails() { - String text = solo.getString(R.string.provider_details_title); - assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); - Screenshot.take("Provider details"); - } - - - -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java deleted file mode 100644 index 6fb7d8a9..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java +++ /dev/null @@ -1,31 +0,0 @@ -package se.leap.bitmaskclient.test; - -import android.content.*; -import android.net.*; -import android.net.wifi.*; - -import java.lang.reflect.*; - -public class ConnectionManager { - static void setMobileDataEnabled(boolean enabled, Context context) { - final ConnectivityManager conman = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); - Method[] methods = conman.getClass().getMethods(); - for (Method method : methods) { - if (method.getName().equals("setMobileDataEnabled")) { - method.setAccessible(true); - try { - method.invoke(conman, enabled); - } catch (InvocationTargetException e) { - //e.printStackTrace(); - } catch (IllegalAccessException e) { - //e.printStackTrace(); - } - } - } - } - - static void setWifiEnabled(boolean enabled, Context context) { - WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); - wifiManager.setWifiEnabled(enabled); - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java deleted file mode 100644 index 6a4c1ee2..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java +++ /dev/null @@ -1,26 +0,0 @@ -package se.leap.bitmaskclient.test; - -import android.content.*; - -import org.json.*; - -import java.io.*; - -public class FromAssets { - - Context context; - - public FromAssets(Context context) { - this.context = context; - } - - public String toString(String filename) throws IOException, JSONException { - String result = ""; - InputStream is = context.getAssets().open(filename); - byte[] bytes = new byte[is.available()]; - if (is.read(bytes) > 0) { - result = new String(bytes); - } - return result; - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/Screenshot.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/Screenshot.java deleted file mode 100644 index ade28b73..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/Screenshot.java +++ /dev/null @@ -1,54 +0,0 @@ -package se.leap.bitmaskclient.test; - -import com.robotium.solo.*; - -import java.text.*; -import java.util.*; - -public class Screenshot { - private static String default_name = Screenshot.class.getPackage().getName(); - private static DateFormat date_format = DateFormat.getDateTimeInstance(); - private static int DEFAULT_MILLISECONDS_TO_SLEEP = 500; - private static int milliseconds_to_sleep = 0; - private static Solo solo; - - public static void initialize(Solo solo) { - Screenshot.solo = solo; - } - - public static void take(String name) { - solo.takeScreenshot(name.replace(" ", "_") + " " + getTimeStamp()); - } - - public static void takeWithSleep(String name) { - sleepBefore(); - take(name); - } - - public static void take() { - take(default_name + "_" + getTimeStamp()); - } - - public static void takeWithSleep() { - sleepBefore(); - take(); - } - - private static String getTimeStamp() { - return date_format.format(Calendar.getInstance().getTime()).replace(" ", "_").replace("/", "_").replace(":", "_"); - } - - public static void setTimeToSleep(double seconds) { - long milliseconds_to_sleep = Math.round(seconds * 1000); - Screenshot.milliseconds_to_sleep = Math.round(milliseconds_to_sleep); - } - - private static void sleepBefore() { - if(milliseconds_to_sleep == 0) - solo.sleep(DEFAULT_MILLISECONDS_TO_SLEEP); - else - solo.sleep(milliseconds_to_sleep); - milliseconds_to_sleep = 0; - } -} - diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestCalendarProvider.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestCalendarProvider.java deleted file mode 100644 index 82ea8b59..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestCalendarProvider.java +++ /dev/null @@ -1,26 +0,0 @@ -package se.leap.bitmaskclient.test; - -import java.util.Calendar; - -import se.leap.bitmaskclient.eip.CalendarProviderInterface; - -/** - * Created by cyberta on 13.09.17. - */ - -class TestCalendarProvider implements CalendarProviderInterface { - - private long currentTimeInMillis = 0; - - public TestCalendarProvider(long currentTimeInMillis) { - this.currentTimeInMillis = currentTimeInMillis; - } - - @Override - public Calendar getCalendar() { - Calendar calendar = Calendar.getInstance(); - calendar.setTimeInMillis(currentTimeInMillis); - return calendar; - } - -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestConstants.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestConstants.java deleted file mode 100644 index 6b4cdfb1..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package se.leap.bitmaskclient.test; - -/** - * @author parmegv - */ -public class TestConstants { - public final static String EIP_DEFINITION_FILE = "eip-service-test.json"; - public final static String SECRETS_FILE = "secrets.json"; - public final static String GATEWAY_FILE = "gateway.json"; -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java deleted file mode 100644 index ad2b4a00..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java +++ /dev/null @@ -1,60 +0,0 @@ -package se.leap.bitmaskclient.test; - -import java.io.*; - -import se.leap.bitmaskclient.R; - -public class TestDashboardIntegration extends BaseTestDashboardFragment { - - @Override - protected void tearDown() throws Exception { - solo.finishOpenedActivities(); - } - - public void testSwitchProvider() { - tapSwitchProvider(); - solo.goBack(); - } - - public void testShowAbout() { - showAbout(); - solo.goBack(); - showAbout(); - solo.goBack(); - } - - private void showAbout() { - clickAbout(); - String text_unique_to_about = solo.getString(R.string.repository_url_text); - solo.waitForText(text_unique_to_about); - } - - private void clickAbout() { - String menu_item = solo.getString(R.string.about); - solo.clickOnMenuItem(menu_item); - } - - private void turnNetworkOff() { - ConnectionManager.setMobileDataEnabled(false, context); - if (!solo.waitForText(getActivity().getString(R.string.eip_state_not_connected), 1, 15 * 1000)) - fail(); - } - - private void restartAdbServer() { - runAdbCommand("kill-server"); - runAdbCommand("start-server"); - } - - /*public void testReboot() { - runAdbCommand("shell am broadcast -a android.intent.action.BOOT_COMPLETED"); - }*/ - - private void runAdbCommand(String adb_command) { - try { - String command = "adb " + adb_command; - Runtime.getRuntime().exec(command).waitFor(); - } catch (IOException | InterruptedException e) { - e.printStackTrace(); - } - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java deleted file mode 100644 index 4c215360..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package se.leap.bitmaskclient.test; - - -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.test.ServiceTestCase; -import android.test.suitebuilder.annotation.MediumTest; - -import se.leap.bitmaskclient.eip.EIP; - -import static se.leap.bitmaskclient.Constants.EIP_ACTION_CHECK_CERT_VALIDITY; -import static se.leap.bitmaskclient.Constants.PROVIDER_VPN_CERTIFICATE; -import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES; - -/** - * @author parmegv - */ -public class TestEIP extends ServiceTestCase { - - private Context context; - private Intent intent; - private SharedPreferences preferences; - - public TestEIP(Class activityClass) { - super(activityClass); - context = getSystemContext(); - intent = new Intent(context, EIP.class); - preferences = context.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - - @MediumTest - private void testCheckCertValidity() { - testEmptyCertificate(); - testExpiredCertificate(); - // Wait for the service to start - // Check result is OK. - } - - private void testEmptyCertificate() { - preferences.edit().putString(PROVIDER_VPN_CERTIFICATE, "").apply(); - startService(EIP_ACTION_CHECK_CERT_VALIDITY); - } - - private void testExpiredCertificate() { - String expired_certificate = "expired certificate"; - preferences.edit().putString(PROVIDER_VPN_CERTIFICATE, expired_certificate).apply(); - startService(EIP_ACTION_CHECK_CERT_VALIDITY); - } - - private void startService(String action) { - intent.setAction(action); - startService(intent); - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEipFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEipFragment.java deleted file mode 100644 index 4227f19a..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEipFragment.java +++ /dev/null @@ -1,73 +0,0 @@ -package se.leap.bitmaskclient.test; - -public class TestEipFragment extends BaseTestDashboardFragment { - - /** - * This test will fail if Android does not trust VPN connection. - * I cannot automate that dialog. - */ - public void testOnOffOpenVpn() { - vpn_controller.clickVpnButton(); - Screenshot.setTimeToSleep(2); - Screenshot.takeWithSleep("Turning VPN on"); - vpn_controller.turningEipOn(); - Screenshot.setTimeToSleep(0.5); - Screenshot.takeWithSleep("VPN turned on"); - - vpn_controller.clickVpnButton(); - vpn_controller.turningEipOff(); - Screenshot.take("VPN turned off"); - - vpn_controller.clickVpnButton(); - vpn_controller.turningEipOn(); - - vpn_controller.clickVpnButton(); - vpn_controller.turningEipOff(); - - } - - /** - * Run only if the trust this app dialog has not been checked. - * You must pay attention to the screen, because you need to cancel de dialog twice (block vpn and normal vpn) - */ - public void testOnFailed() { - /* TODO Do not rely on the Android's vpn trust dialog - vpn_controller.clickVpnButton(); - assertTrue("Have you checked the trust vpn dialog?", solo.waitForActivity(LogWindow.class)); - solo.goBack(); - assertTrue(vpn_controller.iconShowsDisconnected()); - */ - } - - public void testVpnEveryProvider() { - checkDemoBitmaskNet(); - checkRiseupNet(); - checkCalyxNet(); - } - - private void checkDemoBitmaskNet() { - checkProvider("demo.bitmask.net"); - } - - private void checkRiseupNet() { - checkProvider("riseup.net"); - } - - private void checkCalyxNet() { - checkProvider("calyx.net"); - } - - private void checkProvider(String provider) { - changeProviderAndLogIn(provider); - vpn_controller.sleepSeconds(1); - vpn_controller.turnVpnOnAndOff(); - vpn_controller.sleepSeconds(1); - } - - public void testVpnIconIsDisplayed() { - assertTrue(isShownWithinConfinesOfVisibleScreen(vpn_controller.getVpnWholeIcon())); - } - public void testVpnButtonIsDisplayed() { - assertTrue(isShownWithinConfinesOfVisibleScreen(vpn_controller.getVpnButton())); - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java deleted file mode 100644 index 02c521be..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package se.leap.bitmaskclient.test; - -import android.app.*; -import android.content.*; -import android.test.*; - -import org.json.*; - -import java.io.IOException; -import java.util.Arrays; - -import se.leap.bitmaskclient.eip.*; - -import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES; - -/** - * @author parmegv - */ -public class TestGatewaysManager extends InstrumentationTestCase { - - GatewaysManager gateways_manager; - Gateway gateway; - JSONObject eip_definition; - - FromAssets assets; - - Context context; - SharedPreferences preferences; - - @Override - protected void setUp() throws Exception { - super.setUp(); - context = getInstrumentation().getContext(); - assets = new FromAssets(context); - mockGatewaysManager(); - mockRealGateway(); - } - - public void testFromEipServiceJson() { - gateways_manager.fromEipServiceJson(eip_definition); - assertEquals(2, gateways_manager.size()); - gateways_manager.addFromString(gateway.toString()); - assertEquals(2, gateways_manager.size()); - } - - public void testOrderOfGateways_UDP_TCP() { - String[] protocolsInOrder = {"udp", "tcp"}; - manipulateSupportedProtocols(protocolsInOrder); - gateways_manager.fromEipServiceJson(eip_definition); - gateways_manager.addFromString(gateway.toString()); - assertTrue(gateways_manager.select().toString().contains("[\"udp\",\"tcp\"]")); - assertFalse(gateways_manager.select().toString().contains("[\"tcp\",\"udp\"]")); - } - - public void testOrderOfGateways_TCP_UDP() { - String[] protocolsInOrder = {"tcp", "udp"}; - manipulateSupportedProtocols(protocolsInOrder); - gateways_manager.fromEipServiceJson(eip_definition); - gateways_manager.addFromString(gateway.toString()); - assertFalse(gateways_manager.select().toString().contains("[\"udp\",\"tcp\"]")); - assertTrue(gateways_manager.select().toString().contains("[\"tcp\",\"udp\"]")); - } - - public void testAddFromString() { - gateways_manager.addFromString(""); - assertEquals(0, gateways_manager.size()); - gateways_manager.addFromString(gateway.toString()); - assertEquals(1, gateways_manager.size()); - } - - public void testRemoveDuplicate() { - gateways_manager.addFromString(gateway.toString()); - assertEquals(1, gateways_manager.size()); - - mockArtificialGateway(); - gateways_manager.addFromString(gateway.toString()); - assertEquals(1, gateways_manager.size()); - } - - public void testToString() { - assertEquals("[]", gateways_manager.toString()); - - gateways_manager.addFromString(gateway.toString()); - assertEquals("[" + gateway.toString() + "]", gateways_manager.toString()); - } - - public void testIsEmpty() { - assertTrue(gateways_manager.isEmpty()); - gateways_manager.addFromString(""); - assertTrue(gateways_manager.isEmpty()); - gateways_manager.addFromString(gateway.toString()); - assertFalse(gateways_manager.isEmpty()); - } - - private void mockGatewaysManager() { - context = getInstrumentation().getContext(); - preferences = context.getSharedPreferences(SHARED_PREFERENCES, Activity.MODE_PRIVATE); - gateways_manager = new GatewaysManager(context, preferences); - } - - private void mockRealGateway() { - try { - eip_definition = new JSONObject(assets.toString(TestConstants.EIP_DEFINITION_FILE)); - JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE)); - JSONObject gateway = new JSONObject(assets.toString(TestConstants.GATEWAY_FILE)); - this.gateway = new Gateway(eip_definition, secrets, gateway); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void manipulateSupportedProtocols(String[] protocols) { - try { - eip_definition = new JSONObject(assets.toString(TestConstants.EIP_DEFINITION_FILE)); - JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE)); - JSONArray protocolJsonArray = new JSONArray(Arrays.asList(protocols)); - JSONArray gateways = eip_definition.getJSONArray("gateways"); - for (int i = 0; i < gateways.length(); i++) { - JSONObject gatewayJson = gateways.getJSONObject(i); - JSONObject capabilitiesJson = gatewayJson.getJSONObject("capabilities"); - capabilitiesJson.put("protocols", protocolJsonArray); - gatewayJson.put("protocols", protocolJsonArray); - } - this.gateway = new Gateway(eip_definition, secrets, gateways.getJSONObject(0)); - } catch (JSONException e) { - e.printStackTrace(); - assertFalse(true); - } catch (IOException e) { - e.printStackTrace(); - assertFalse(true); - } - - } - - private void mockArtificialGateway() { - try { - eip_definition = new JSONObject(assets.toString(TestConstants.EIP_DEFINITION_FILE)); - JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE).replace("6u6", "7u7")); - JSONObject gateway = new JSONObject(assets.toString(TestConstants.GATEWAY_FILE)); - this.gateway = new Gateway(eip_definition, secrets, gateway); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java deleted file mode 100644 index 8d0df59b..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java +++ /dev/null @@ -1,629 +0,0 @@ -package se.leap.bitmaskclient.test; - -import java.io.*; -import java.math.*; -import java.security.*; -import java.util.*; - -import android.test.suitebuilder.annotation.*; - -import se.leap.bitmaskclient.*; - -import junit.framework.*; - -public class TestLeapSRPSession extends TestCase { - - public TestLeapSRPSession(String name) { - super(name); - } - - protected void setUp() throws Exception { - super.setUp(); - } - - protected void tearDown() throws Exception { - super.tearDown(); - } - - public void testExponential() { - byte[] expected_A; - byte[] a_byte; - LeapSRPSession client; - - /* Test 1: abytes = 4 */ - expected_A = new BigInteger("44eba0239ddfcc5a488d208df32a89eb00e93e6576b22ba2e4410085a413cf64e9c2f08ebc36a788a0761391150ad4a0507ca43f9ca659e2734f0457a85358c0bb39fa87183c9d3f9f8a3b148dab6303a4e796294f3e956472ba0e2ea5697382acd93c8b8f1b3a7a9d8517eebffd6301bfc8de7f7b701f0878a71faae1e25ad4", 16).toByteArray(); - String username = "username", - password = "password", - salt = "64c3289d04a6ecad", - a = "3565fdc2"; - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - byte[] A = client.exponential(); - - assertTrue(Arrays.equals(A, expected_A)); - - /* Test 1: abytes = 5 */ - a = "67c152a3"; - expected_A = new BigInteger("11acfacc08178d48f95c0e69adb11f6d144dd0980ee6e44b391347592e3bd5e9cb841d243b3d9ac2adb25b367a2558e8829b22dcef96c0934378412383ccf95141c3cb5f17ada20f53a0225f56a07f2b0c0469ed6bbad3646f7b71bdd4bedf5cc6fac244b26d3195d8f55877ff94a925b0c0c8f7273eca733c0355b38360442e", 16).toByteArray(); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - A = client.exponential(); - - assertTrue(Arrays.equals(A, expected_A)); - } - - public void testResponse() throws NoSuchAlgorithmException { - /* Test 1: with intermediate checks */ - byte[] expected_A = trim(new BigInteger("884380f70a62193bbe3589c4e1dbdc4467b6b5a1b4486e4b779023506fc1f885ae26fa4a5d817b3f38a35f3487b147b82d4bd0069faa64fdc845f7494a78251709e212698e42ced44b0f3849adc73f467afcb26983bd13bdc38906b178003373ddd0ac1d38ce8a39ffa3a7795787207a129a784f4b65ce0b302eb1bcf4045883", 16).toByteArray()); - byte[] expected_x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16).toByteArray(); - byte[] expected_M1 = trim(new BigInteger("e6a8efca2c07ef24e0b69be2d4d4a7e74742a4db7a92228218fec0008f7cc94b", 16).toByteArray()); - String username = "username", - password = "password", - salt = "64c3289d04a6ecad", - a = "8c911355"; - byte[] a_byte = new BigInteger(a, 16).toByteArray(); - LeapSRPSession client = new LeapSRPSession(username, password, a_byte); - - byte[] x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); - assertTrue(Arrays.equals(x, expected_x)); - - byte[] A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - String B = "bc745ba25564fc312f44ea09fb663aa6d95867772e412a6a23f1bc24183e54b32f134372c560f4b3fda19ba7a56b0f84fdcdecc22be6fd256639e918e019691c40a39aa5c9631820e42b28da61b8c75b45afae9d77d63ac8f4dda093762be4a890fbd86061dbd7e5e7c03c4dacde769e0f564df00403e449c0535537f1ba7263"; - - byte[] M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - assertTrue(Arrays.equals(M1, expected_M1)); - - /* Test 2: no intermediate checks */ - expected_A = trim(new BigInteger("9ffc407afd7e7ecd32a8ea68aa782b0254a7e2197a955b5aa646fc1fc43ff6ef2239f01b7d5b82f152c870d3e69f3321878ca2acda06dd8fb6ce02f41c7ed48061c78697b01cf353f4222311334c707358b6ec067e317527316bfa85b5ec74537e38b5b14c1100d14c96320f385e5b1dcccde07e728c7ef624353167a29ae461", 16).toByteArray()); - expected_M1 = trim(new BigInteger("c3203ec1dd55c96038276456c18c447fb4d2a2f896c73c31d56da1781cae79a8", 16).toByteArray()); - a = "38d5b211"; - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); - A = client.exponential(); - - B = "b8ca7d93dbe2478966ffe025a9f2fb43b9995ce04af9523ea9a3fa4b132136076aa66ead1597c3da23f477ce1cfaf68b5dcc94e146db06cf8391d14a76ce53aab86067b13c93b135d7be6275669b3f51afec6cc41f19e0afca7c3ad5c4d6ee4c09d4b11bcd12e26c727ee56d173b92eea6926e72cc73deebe12dd6f30f44db8a"; - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - /* Test 3: With intermediate values */ - expected_M1 = new BigInteger("4c01f65a9bb00f95e435593083040ae1e59e59800c598b42de821c21f3a35223", 16).toByteArray(); - expected_A = new BigInteger("1bceab3047a6f84495fdd5b4dbe891f0b30f870d7d4e38eaef728f6a7d4e9342d8dae8502fdae4f16b718d2e916a38b16b6def45559a5ebae417a1b115ba6b6a0451c7ff174c3e2507d7d1f18ef646fd065bc9ba165a2a0ae4d6da54f060427178b95b0eff745f5c3f8c4f19ea35addc3ce0daf2aca3328c98bafcf98286d115", 16).toByteArray(); - B = "41a7b384f2f52312fa79b9dc650ae894f543aea49800cf9477fbcf63e39cbfe6d422f7126777d645cdf749276a3ae9eb6dfcfdb887f8f60ac4094a343013fcebbd40e95b3153f403ab7bb21ea1315aa018bab6ab84017fcb084b3870a8bf1cb717b39c9a28177c61ce7d1738379be9d192dd9793b50ebc3afabe5e78b0a4b017"; - a = "36ee80ec"; - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); - A = client.exponential(); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - } - - public void testCalculateV() throws NoSuchAlgorithmException { - String expected_v = "502f3ffddc78b866330550c2c60ebd68427c1793237d770e6390d1f794abd47b6786fa5025728d1ca4ec24cfc7a89808278330099ad66456a7c9c88be570b928f9825ac2ecdee31792335f7fa5fc9a78b692c487aa400c7d5cc5c1f2a3a74634c4afa0159600bbf22bf6dfb1e0d85061e55ce8df6243758066503bcf51c83848cf7184209731f89a90d888934c75798828859babe73c17009bf827723fc1bcd0"; - - BigInteger k = new BigInteger("bf66c44a428916cad64aa7c679f3fd897ad4c375e9bbb4cbf2f5de241d618ef0", 16); - BigInteger g = new BigInteger("2", 16); - BigInteger N = new BigInteger(ConfigHelper.NG_1024, 16); - BigInteger x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16); - - BigInteger v = k.multiply(g.modPow(x, N)); // g^x % N - - assertEquals(v.toString(16), expected_v); - assertTrue(Arrays.equals(v.toByteArray(), new BigInteger(expected_v, 16).toByteArray())); - } - - public void testGetU() throws NoSuchAlgorithmException { - /* Test 1 */ - String Astr = "46b1d1fe038a617966821bd5bb6af967be1bcd6f54c2db5a474cb80b625870e4616953271501a82198d0c14e72b95cdcfc9ec867027b0389aacb313319d4e81604ccf09ce7841dc333be2e03610ae46ec0c8e06b8e86975e0984cae4d0b61c51f1fe5499a4d4d42460261a3e134f841f2cef4d68a583130ee8d730e0b51a858f"; - String Bstr = "5e1a9ac84b1d9212a0d8f8fe444a34e7da4556a1ef5aebc043ae7276099ccdb305fd7e1c179729e24b484a35c0e33b6a898477590b93e9a4044fc1b8d6bc73db8ac7778f546b25ec3f22e92ab7144e5b974dc58e82a333262063062b6944a2e4393d2a087e4906e6a8cfa0fdfd8a5e5930b7cdb45435cbee7c49dfa1d1216881"; - String ustr = "759c3cfb6bfaccf07eeb8e46fe6ea290291d4d32faca0681830a372983ab0a61"; - - byte[] Abytes = new BigInteger(Astr, 16).toByteArray(); - byte[] Bbytes = new BigInteger(Bstr, 16).toByteArray(); - byte[] expected_u = new BigInteger(ustr, 16).toByteArray(); - - MessageDigest u_digest = MessageDigest.getInstance("SHA256"); - u_digest.update(trim(Abytes)); - u_digest.update(trim(Bbytes)); - byte[] u = new BigInteger(1, u_digest.digest()).toByteArray(); - - assertTrue(Arrays.equals(expected_u, u)); - - /* Test 2 */ - Astr = "c4013381bdb2fdd901944b9d823360f367c52635b576b9a50d2db77141d357ed391c3ac5fa452c2bbdc35f96bfed21df61627b40aed8f67f21ebf81e5621333f44049d6c9f6ad36464041438350e1f86000a8e3bfb63d4128c18322d2517b0d3ead63fd504a9c8f2156d46e64268110cec5f3ccab54a21559c7ab3ad67fedf90"; - Bstr = "e5d988752e8f265f01b98a1dcdecc4b685bd512e7cd9507f3c29f206c27dac91e027641eed1765c4603bbd7a9aa7fac300ef67dafe611ba2dbe29a32d83d486296f328d38b44c0c211d01d3fe422aac168b6850c87782338969c54594fc87804d4db34910ad4b5452a81027842ac8d8d8288fd44872e4c719ac8fb971d0a33e1"; - ustr = "6510328f913b81ba662e564ee5afb7c395ea27c3c0276fc5ca51f0edecd4baf1"; - - Abytes = new BigInteger(Astr, 16).toByteArray(); - Bbytes = new BigInteger(Bstr, 16).toByteArray(); - expected_u = new BigInteger(ustr, 16).toByteArray(); - expected_u = trim(expected_u); - - u_digest = MessageDigest.getInstance("SHA-256"); - u_digest.update(trim(Abytes)); - u_digest.update(trim(Bbytes)); - u = new BigInteger(1, u_digest.digest()).toByteArray(); - u = trim(u); - - assertTrue(Arrays.equals(expected_u, u)); - - /* Test 3 */ - Astr = "d13973fe4e0e13423cd036caf0912e23a1f9b0c23966f5a5897c8ff17c5cbac8bab7f07d9ac4ee47396a7c68e80ce854c84f243148521277900aaa132a7b93b61e54d742d7f36edb4cdef54bc78cca69ac72653a7ae0fc47ec1e9a84024ea9487a61357e28eddc185e4fe01388e64e6b8f688dd74471d56dd244204522e08483"; - Bstr = "a6701686d9d987a43f06e8497330c8add8febd191a7a975bced0d058eb03ccc6805263349363b2d54ac435b01155dc41c6067287d9b93e3637ab3b7e8bc7d9cf38d9fdbb2ca9ee8ba1946a46cb555cb7dafcc177fcf7a4b0eb1e5db2249949c1fd15e0b7c1b3616f9e2649bdf074ed841efbdc9f29ee8c8bfcedeaed3dc49378"; - ustr = "78414ec80cf44225e7ed386dcf2ceb89837327ccae11b761fc77d48c0307977"; - - Abytes = new BigInteger(Astr, 16).toByteArray(); - Bbytes = new BigInteger(Bstr, 16).toByteArray(); - expected_u = new BigInteger(ustr, 16).toByteArray(); - expected_u = trim(expected_u); - - u_digest = MessageDigest.getInstance("SHA-256"); - u_digest.update(trim(Abytes)); - u_digest.update(trim(Bbytes)); - u = new BigInteger(1, u_digest.digest()).toByteArray(); - u = trim(u); - - assertTrue(Arrays.equals(expected_u, u)); - - /* Test 4 */ - Astr = "ee8bc0cb97dd9c9937759658ff9d791df1dd57b48c5febc2e98af028d0e36eaddf1a3fc555f2bcd6456827e8c7b07ec02a1f365457843bda226bfc1a55c4776879f9df6c916810131ec65a3a4cf473c6a34299d64c91cf26542ea0fc059d24422fc783460c3fafe26bf6f7c24904ae1c5a6421e2f5315030ab007ce8f2c2fd97"; - Bstr = "95ecbd13b28c7f38318fd664ee97d9e853b0d6e9cbff9a3775a3cc5d5077ffc146aec70d9439e75c19a34b67368b8bd7035ba6254e0a260d99b1e253aae2e0d8f4a13e1ed472f3ef0e3086300cd15d059f6be7d7141ee09071b1c5e5d1c83b250a3c8f1a587f8fe59d49aaeb2cfc7e13a5a58bc76cc8baf7f6a647982c67ee49"; - ustr = "e28737c7307c84e4d0866b7cf882f22852a764b109634f77a5eb986a96ffcf9a"; - - Abytes = new BigInteger(Astr, 16).toByteArray(); - Bbytes = new BigInteger(Bstr, 16).toByteArray(); - expected_u = new BigInteger(ustr, 16).toByteArray(); - expected_u = trim(expected_u); - assertEquals(new BigInteger(1, expected_u).toString(16), ustr); - - u_digest = MessageDigest.getInstance("SHA-256"); - u_digest.update(trim(Abytes)); - u_digest.update(trim(Bbytes)); - u = new BigInteger(1, u_digest.digest()).toByteArray(); - u = trim(u); - - assertTrue(Arrays.equals(expected_u, u)); - } - - @SmallTest - public void testCalculatePasswordHash() throws UnsupportedEncodingException, NoSuchAlgorithmException { - String salt_str = "", username_str = "", password_str = ""; - String expected_inner = "cfb9ae3ec5433076889c4fe5663926e20bf570cc7950a51c889a314fab2f5ed716bde9c1cc91be14", - expected_x = "9736a5e386a18f35bb08cac0f7c70bdbe120f2efe019874d0eb23b85b1955858"; - - /* Test 1 */ - salt_str = "cfb9ae3ec5433076"; - username_str = "nostradamus"; - password_str = "$[[//jjiilajfewahug43a89y¿"; - password_str = password_str.replaceAll("\\\\", "\\\\\\\\"); - // Calculate x = H(s | H(U | ':' | password)) - MessageDigest x_digest = MessageDigest.getInstance("SHA-256"); - - // Try to convert the username to a byte[] using UTF-8 - byte[] user = null; - byte[] password_bytes = null; - byte[] colon = {}; - - String encoding = "UTF-8"; - encoding = "ISO-8859-1"; - user = ConfigHelper.trim(username_str.getBytes(encoding)); - colon = ConfigHelper.trim(":".getBytes(encoding)); - password_bytes = ConfigHelper.trim(password_str.getBytes(encoding)); - - // Build the hash - x_digest.update(user); - x_digest.update(colon); - x_digest.update(password_bytes); - byte[] h = x_digest.digest(); - byte[] salt_bytes = ConfigHelper.trim(new BigInteger(salt_str, 16).toByteArray()); - - x_digest.reset(); - x_digest.update(salt_bytes); - x_digest.update(h); - byte[] x_digest_bytes = x_digest.digest(); - assertTrue(new BigInteger(1, x_digest_bytes).toString(16).equalsIgnoreCase(expected_x)); - } - - public void testCalculateS() throws NoSuchAlgorithmException { - String expected_S = "34d71467d0a30c5787e6b4384c7176a724df28f6c1d3b0b7738238621be19080942ca5d4454ab3e5664d42970ea2d42d1188ab246afb1475c481111f30886c79cc99ddd1d711034bc4ac57a0c134fef40470e1ac3386f39abcd1bf9d0cc758a1f38a87b2f7261018cdc6191cd941292c77c320b3c664a9bb1325dd7a2bf62db4"; - - String B_string = "d390da0991b84e20918764aed9bccf36fc70863f08a1d3fa0aecd9610d8c40d1895afaf3aa9b4582fb5bc673037dfc1bf0ca7d3d190a807dec563fe57d596b3551ec8a6461e0621b77fabfaa29234187063e715e2706522c65f35d89f3914a7cdf40ddd240ef3d22b5534469cf6b3b31e158f817dcf5b6b44b0914d4787d027e"; - String A_string = "c6385e56b9cb8987df3c58ffe6c47bfcd9f9d52f02b68048d72135a8522a0919b41683e3c732a0874e0555b8f288fa067842b1c40a56f1a7d910ad125e71238cb14ba47838f881cabf735d5414f4fcdd6855943621c271c5f013753d439fb124674c79e30d849e9178c780f7c25aded12f053ae41be68289787caf7c3cbb07a4"; - String a_string = "fc1c2d8d"; - - BigInteger A = new BigInteger(A_string, 16); - byte[] Bbytes = new BigInteger(B_string, 16).toByteArray(); - BigInteger a = new BigInteger(a_string, 16); - BigInteger g = ConfigHelper.G; - BigInteger N = new BigInteger(ConfigHelper.NG_1024, 16); - BigInteger k = new BigInteger("bf66c44a428916cad64aa7c679f3fd897ad4c375e9bbb4cbf2f5de241d618ef0", 16); - BigInteger x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16); - - /* GetU */ - MessageDigest u_digest = MessageDigest.getInstance("SHA256"); - u_digest.update(trim(A.toByteArray())); - u_digest.update(trim(Bbytes)); - byte[] ub = new BigInteger(1, u_digest.digest()).toByteArray(); - - BigInteger v = k.multiply(g.modPow(x, N)); // g^x % N - String expected_v = "502f3ffddc78b866330550c2c60ebd68427c1793237d770e6390d1f794abd47b6786fa5025728d1ca4ec24cfc7a89808278330099ad66456a7c9c88be570b928f9825ac2ecdee31792335f7fa5fc9a78b692c487aa400c7d5cc5c1f2a3a74634c4afa0159600bbf22bf6dfb1e0d85061e55ce8df6243758066503bcf51c83848cf7184209731f89a90d888934c75798828859babe73c17009bf827723fc1bcd0"; - String v_string = v.toString(16); - - BigInteger B = new BigInteger(1, Bbytes); - BigInteger u = new BigInteger(1, ub); - String expected_u_string = "2d36f816df24da7b904c904a7e2a2500511df118ced26bda92a63aca792c93b"; - String u_string = u.toString(16); - - BigInteger B_v = B.subtract(v); - BigInteger a_ux = a.add(u.multiply(x)); - byte[] a_ux_byte = a_ux.toByteArray(); - String expected_a_aux_string = "d8d0843a60d471ab46a761b775f8fd28bbbd8affbc704424c79b822ac36b1177925404db910072737df3c5083cf20ebd2f08e1381d80d91e4f6fc99f592203"; - byte[] expected_a_aux_byte = new BigInteger(expected_a_aux_string, 16).toByteArray(); - - BigInteger S = B_v.modPow(a_ux, N); - - byte[] expected_S_bytes = new BigInteger(expected_S, 16).toByteArray(); - byte[] S_bytes = S.toByteArray(); - assertTrue(Arrays.equals(S_bytes, expected_S_bytes)); - assertEquals(S.toString(16), expected_S); - } - - public void testXor() throws Exception { - String expected_xor_string = "928ade491bc87bba9eb578701d44d30ed9080e60e542ba0d3b9c20ded9f592bf"; - byte[] expected_xor = new BigInteger(expected_xor_string, 16).toByteArray(); - - byte[] nbytes = trim(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray()); - byte[] gbytes = trim(ConfigHelper.G.toByteArray()); - - byte[] ndigest = trim(MessageDigest.getInstance("SHA-256").digest(nbytes)); - byte[] gdigest = MessageDigest.getInstance("SHA-256").digest(gbytes); - - BigInteger ndigest_bigInteger = new BigInteger(1, ndigest); - String expected_ndigest_string = "494b6a801b379f37c9ee25d5db7cd70ffcfe53d01b7c9e4470eaca46bda24b39"; - String ndigest_string = ndigest_bigInteger.toString(16); - assertEquals(ndigest_string, expected_ndigest_string); - - BigInteger gdigest_bigInteger = new BigInteger(1, gdigest); - String xor_string = ndigest_bigInteger.xor(gdigest_bigInteger).toString(16); - - byte[] xor = new BigInteger(xor_string, 16).toByteArray(); - - assertTrue(Arrays.equals(expected_xor, xor)); - } - - public void testVerify() throws NoSuchAlgorithmException { - byte[] expected_A = trim(new BigInteger("884380f70a62193bbe3589c4e1dbdc4467b6b5a1b4486e4b779023506fc1f885ae26fa4a5d817b3f38a35f3487b147b82d4bd0069faa64fdc845f7494a78251709e212698e42ced44b0f3849adc73f467afcb26983bd13bdc38906b178003373ddd0ac1d38ce8a39ffa3a7795787207a129a784f4b65ce0b302eb1bcf4045883", 16).toByteArray()); - byte[] expected_x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16).toByteArray(); - byte[] expected_M1 = trim(new BigInteger("e6a8efca2c07ef24e0b69be2d4d4a7e74742a4db7a92228218fec0008f7cc94b", 16).toByteArray()); - byte[] expected_M2 = trim(new BigInteger("6402e108415ab4a7cd223ec435570614c8aacc09fcf081ade2dc00275e90ceee", 16).toByteArray()); - String username = "username", - password = "password", - salt = "64c3289d04a6ecad", - a = "8c911355"; - byte[] a_byte = new BigInteger(a, 16).toByteArray(); - LeapSRPSession client = new LeapSRPSession(username, password, a_byte); - - byte[] x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); - assertTrue(Arrays.equals(x, expected_x)); - - byte[] A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - String B = "bc745ba25564fc312f44ea09fb663aa6d95867772e412a6a23f1bc24183e54b32f134372c560f4b3fda19ba7a56b0f84fdcdecc22be6fd256639e918e019691c40a39aa5c9631820e42b28da61b8c75b45afae9d77d63ac8f4dda093762be4a890fbd86061dbd7e5e7c03c4dacde769e0f564df00403e449c0535537f1ba7263"; - - byte[] M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - assertTrue(Arrays.equals(M1, expected_M1)); - - boolean verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 2 */ - expected_A = trim(new BigInteger("180a1caf84efe93610a56772edea7b2d20ef3e9f34e578147b5402a898982f33131708233f9ddd2946246703c5db705f0859cca9cfc5b72ad5a05ec0c748545aa083d5b7b1bf06efe6737e9e0fd81b832b5cba983f1b9717041df8114385b93c8c669db06d62c5773b8e8a8f07e98a840a33d04d3448d4bcd2c042387c316750", 16).toByteArray()); - expected_M1 = trim(new BigInteger("a47782f23057a7e06704ea94389589b3c70971a63268acef2aefd74e234dd3c2", 16).toByteArray()); - a = "d89f0e33"; - expected_M2 = trim(new BigInteger("517278a03a0320a52dcb391caf5264d76149d7d9b71ed2b65536233344c550cf", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); - A = client.exponential(); - - B = "5f86fe2f7b7455e877e1760db8d3da1fcd4df0d10ec2a40298f87287bdb2f22c0ea54ff9b1f660cc1666459a7e2fd5501970b317490c3dfd3ba2e18f7be7526b72ea4d01e8f064754b935b107ced0892ce86112cbe32282f929907985fcb29f42c5d4dc32adeb29d12a611cac49cca3fefd2227efadc3989c2e72dd64a003141"; - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 3 */ - expected_A = trim(new BigInteger("a9c556c30bf4c1b1fdc1bc9e672ab4751806acc8581042b3779faaf25f85f47dfc58828742e2d2a06c51acbbb9f3fae0e01f64df0775a269f5ee4a6e71bc37b8a368e04b9053d399bc5b809ffd6ecab775a577804f2a5ed2e829f15e6af13bf0b78b6b108cf591bc9960992904fd1433698a51e0d05ee954cf98cbfe7995621e", 16).toByteArray()); - expected_M1 = trim(new BigInteger("0afca3583c4146990ec7312f9f4b4d9cceebc43a19f96709bf3d0a17b11dcc1e", 16).toByteArray()); - a = "50e662d6"; - expected_M2 = trim(new BigInteger("3bfb91c7d04b6da6381fe3d2648d992cdc6bc67b8ee16d1cfa733f786d492261", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); - A = client.exponential(); - - B = "6fe41e8262f4f8bc4ed9f4e1b4802ae3adac9c348e6efc07f16c6f5704b95a1f12325097489372c3936584a37301ebab400a32ac6699f4556da84f076489060527bd50578a317a3ec8b814bf2f4dd9c4adad368610eb638aa81663a205ba26d8f0b9654bf3940357b867cd42725e8532b97a2410a557d291aa55c0b44f249361"; - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 4: user abc, password abcdefghi */ - username = "abc"; - password = "abcdefghi"; - salt = "be26aac449a093e5"; - expected_A = trim(new BigInteger("c4013381bdb2fdd901944b9d823360f367c52635b576b9a50d2db77141d357ed391c3ac5fa452c2bbdc35f96bfed21df61627b40aed8f67f21ebf81e5621333f44049d6c9f6ad36464041438350e1f86000a8e3bfb63d4128c18322d2517b0d3ead63fd504a9c8f2156d46e64268110cec5f3ccab54a21559c7ab3ad67fedf90", 16).toByteArray()); - expected_x = trim(new BigInteger("6325967f1a161efd4e2d6e6fabbfccc32be05139cf82b08fb59c0a0db3f34bcf", 16).toByteArray()); - a = "5d4cde29"; - B = "e5d988752e8f265f01b98a1dcdecc4b685bd512e7cd9507f3c29f206c27dac91e027641eed1765c4603bbd7a9aa7fac300ef67dafe611ba2dbe29a32d83d486296f328d38b44c0c211d01d3fe422aac168b6850c87782338969c54594fc87804d4db34910ad4b5452a81027842ac8d8d8288fd44872e4c719ac8fb971d0a33e1"; - expected_M1 = trim(new BigInteger("e5972ddc53e6190735fc79cd823053a65ffb6041d69480adcba2f6a2dc2f2e86", 16).toByteArray()); - expected_M2 = trim(new BigInteger("8f4552b1021a4de621d8f50f0921c4d20651e702d9d71276f8f6c15b838de018", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(trim(new BigInteger(salt, 16).toByteArray()), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 5: user abc, password abcdefghi */ - username = "abc"; - password = "abcdefghi"; - salt = "be26aac449a093e5"; - expected_A = trim(new BigInteger("d13973fe4e0e13423cd036caf0912e23a1f9b0c23966f5a5897c8ff17c5cbac8bab7f07d9ac4ee47396a7c68e80ce854c84f243148521277900aaa132a7b93b61e54d742d7f36edb4cdef54bc78cca69ac72653a7ae0fc47ec1e9a84024ea9487a61357e28eddc185e4fe01388e64e6b8f688dd74471d56dd244204522e08483", 16).toByteArray()); - expected_x = trim(new BigInteger("6325967f1a161efd4e2d6e6fabbfccc32be05139cf82b08fb59c0a0db3f34bcf", 16).toByteArray()); - a = "fc57e4b1"; - B = "a6701686d9d987a43f06e8497330c8add8febd191a7a975bced0d058eb03ccc6805263349363b2d54ac435b01155dc41c6067287d9b93e3637ab3b7e8bc7d9cf38d9fdbb2ca9ee8ba1946a46cb555cb7dafcc177fcf7a4b0eb1e5db2249949c1fd15e0b7c1b3616f9e2649bdf074ed841efbdc9f29ee8c8bfcedeaed3dc49378"; - expected_M1 = trim(new BigInteger("0b590fde631566d0d3420a898a9b469656e64bfaff165c146b78964eee7920b8", 16).toByteArray()); - expected_M2 = trim(new BigInteger("04cf3ab3b75dbc4b116ca2fec949bf3deca1e360e016d7ab2b8a49904c534a27", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(trim(new BigInteger(salt, 16).toByteArray()), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 6: user and password of real use */ - username = "parmegv"; - password = "wR\"P}x@_,:k$`YYd*s T`-n."; - salt = "40c3f47b99ce8dc9"; - expected_A = trim(new BigInteger("490b5de7a287c59cefe267441a186ec24f63210fbf28877305f5896eaec5a7245d304ecb2b09d91066e627d7b2c8bf9e5271d882361a435355d1c2d1ac9d3069877189a01d64b2dd73a569e9e96b9a99767dbc02e04c839b09444f48430b113c1827c20b684ae33f5018051169f5acf4913ebd76a205c6f1aa2cc75747687d56", 16).toByteArray()); - String x_string = "9665839759b4fb9684e7438daecbd6e7129b4ebd3e4a107916e9a64bbbf399c9"; - expected_x = trim(new BigInteger(x_string, 16).toByteArray()); - assertEquals(new BigInteger(1, expected_x).toString(16), x_string); - a = "a72111a2"; - B = "6574ddce3e33c44a77198fa8b3656627e4a24c8786948e79f0c2588febaa485c94b1deb5e420bd3b46f9a34c7862525452ca7a0542c52f939d9f277a013aeceef7353a7741440f6dd2f6c2f1dc07fa5ca003e305c89c876a3035bd04f546b711d44da06a3ba827bc8affbf9ed46de1bfbc670ef9ed7c0bb8cdc588285d13849e"; - expected_M1 = trim(new BigInteger("03bbcf57aeaec89a3a254bb9650a924ea86aa0fdd83fd7274a75b7083f221cf0", 16).toByteArray()); - expected_M2 = trim(new BigInteger("082cf49ad5a34cc5ca571e3d063aec4bd96e7b96a6d951295180631650a84587", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 7: password with ! */ - username = "parmegvtest3"; - password = "holahola!"; - salt = "1bf48d42b9a7ed32"; - expected_A = trim(new BigInteger("4e2fbe8db5d07f33ff1f4303959b5396dcffc1460b6ce8866fd388415f27fe10f9042986ab8682cdcf9a033e651bca89173688989adad854c91bc1918f98d5c82525fb6f328a8cf74ce1436b23821cba5337aaa20a3e5631e4b957053d542f2b5fc456e888371c9d6b94360b37adb2793eca8db100c24887c459e36d729a98e1", 16).toByteArray()); - x_string = "363d1d62dda07b2d987a9739ddb5ec32fcad9c7322fb64e87937f2da86c45d9f"; - expected_x = trim(new BigInteger(x_string, 16).toByteArray()); - assertEquals(new BigInteger(1, expected_x).toString(16), x_string); - a = "16dd0cf5"; - B = "dd5c9c5e13eb5daa6e7303928b3c826cec520ccef429c0dcb785be34c330d5bb89c99d7d94842b6b5c19cac600f884c50b26989b105f397115df7f3d13c5c7c2f6327cc547fc854ae40f09f1f6a104968bd510243feb104eb559e085fe1d720770be2887a1f424c534a3ab962d82e92458f652328bcf9878f95fdcf463d06193"; - expected_M1 = trim(new BigInteger("a7ffbff753a547b877f8944339b707b3ce1998da27badf253d56bf39f35308a6", 16).toByteArray()); - expected_M2 = trim(new BigInteger("5cc3d7f0077e978c83acdef14a725af01488c1728f0cf32cd7013d24faf5d901", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 8: username and password *was* failing in localhost testProviderAPI*/ - username = "gg"; - password = "password"; - a = "bc925bfb"; - salt = "ff9ebb44e947cf59"; - expected_A = trim(new BigInteger("8f434633414faeaf035a0dea8c1cb7876bb1f8ee80d6fee8ea43ae60c4f9658550d825c25f1ed5c6a5543358bbcb559b76958c8047a2e7e5fe0072bc1f16401bcfa77b57651ff50dd665c6f28c302b37c98495eff397a56befead2e5ceffaace45f2ec200520258adb66df751e815e464656d869454e360d98cbc70f9c64fd4c", 16).toByteArray()); - x_string = "9cad2eca264380dd0b48e3b405e109c1be0615ee6ec92e7105eff5bc3a309fd9"; - expected_x = trim(new BigInteger(x_string, 16).toByteArray()); - assertEquals(new BigInteger(1, expected_x).toString(16), x_string); - B = "9ca2cd50b4c41047e4aa9e4fac9078ae21175e51e04a23877d6c2044765e39959e9a6a3ede99d08a556c196f51a2be12117681b1ef9d0b0498fb2fa4e88649ab9403e743504e3aaefbce8c5cb474eef8f4724ccd076fd33857de510d8509b67f166d986443bc262d776ec20985f617a7aa86e490290ce5d66332c8b45742a527"; - expected_M1 = trim(new BigInteger("7a2f768791abaeb954eb7f001bb60d91e6f61e959c8fcdefb58de857af9edaac", 16).toByteArray()); - expected_M2 = trim(new BigInteger("d78da7e0a23c9b87a2f09cdee05c510c105b4a8d471b47402c38f4cdfa49fe6d", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 9: username and password *was* failing in localhost testProviderAPI*/ - username = "oo"; - password = "password"; - a = "1322ec50"; - salt = "a93c74934dcadd90"; - expected_A = trim(new BigInteger("c8e9f30a2f67977ee7e61e9ca5af8bd854b6cc98fe01dbe1b1a4cf002c1e2523b7e49f373a600ff85a84867817ec60fec532857812a07f5c6189f6172f133023af75ca4cb98b758bb84620d0aa3cfc74dc69e0507114c0aeab5a75c3ae3f07a919c5729420f03266c26ed41d1846e07de023ec68dd6830e9ebf129cf51abb571", 16).toByteArray()); - x_string = "20470538560c4beb4908e6bfe5b0e00da94223e361302a25c898cbdd3724020"; - expected_x = trim(new BigInteger(x_string, 16).toByteArray()); - assertEquals(new BigInteger(1, expected_x).toString(16), x_string); - B = "24f98ede155212bea8b1d8bacf8153735ee8114faa824c57c84df55f8d6072ab87f5ae885ce1062939dbaa68ca6e63147c1d2dc1f751e8be20d8a6f87287a2a83fcb1dc9b85dd406d438aeee5ccbc873603cb399627e26e6444e94b3d5d26764e866776c8960fe206bd33febeca9f55f6291dd2cb832eab69e5373f548adeefb"; - expected_M1 = trim(new BigInteger("1b35c705e563bd5239cdccc6627aa877c3023286f49b4b7c21341d2949ca2d15", 16).toByteArray()); - expected_M2 = trim(new BigInteger("a382025452bad8a6ccd0f703253fda90e7ea7bd0c2d466a389455080a4bd015d", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 10: derived from test 11, discovered that password bytes should be in ISO-8859-1*/ - username = "nostradamus"; - password = "$[[//jjiilajfewahug43a89y¿"; - a = "800f0819"; - salt = "cfb9ae3ec5433076"; - expected_A = trim(new BigInteger("2ab09ee2fa01058f2f72fd2142b129f2ec26313801052889bcc4af57ee2e4d5b92c90cdfd6ecd660e82c635b2a091ba1b164e5b371c911ce0c4e69686baa120c58e2e0af84b2adc10da6cdfb0b579a1685032c57fd6ed1306d9713a562eddf5c833725042e825fa1abc7017f74760cb53d8c755ffe628c510022c296d1cd3584", 16).toByteArray()); - x_string = "9736a5e386a18f35bb08cac0f7c70bdbe120f2efe019874d0eb23b85b1955858"; - expected_x = trim(new BigInteger(x_string, 16).toByteArray()); - assertEquals(new BigInteger(1, expected_x).toString(16), x_string); - B = "2d19fe17dca1bda01044a0f406547895c32a10df2b0e69676de911273a8685d294763c4d16b3663f722b8980126e2c659efd33ffc6435a9594a2539e726c48e365893b3374670bd1958c13f55c2defa8ea9c0f9ba1345a5dca0e78debba434c8b755353d066d42bc5dfe0403fdcacfe5efd25c685f883ee6766c710b775c50f2"; - expected_M1 = trim(new BigInteger("a33feada1771c6f53e9343f5b9e69d51d4f15043c95fb663b6dd5b1c7af6f66b", 16).toByteArray()); - expected_M2 = trim(new BigInteger("9e99f9adfbfaa7add3626ed6e6aea94c9fa60dab6b8d56ad0cc950548f577d32", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - - /* Test 11: username and password failing in localhost testProviderAPI*/ - username = "nostradamus"; - password = "$[['//\"jjiilajfewahug43a89y¿"; - a = "5bfbc968"; - salt = "1bcae1065951bbf5"; - expected_A = trim(new BigInteger("7a74c254d46dd6010a7090e574817a03f32ba13f98ed3c695d96f09c9d334e591771541400e68b6d27a19e734baccf3965ca79c0294ffbf553716b41fbca627c7cd3ea4a0d1c640c22411881696f59ad7ed8ce6ef7010e43f57fb3858aa4c3479dd41e4073afadb6a516c41f649b8cf30dea6366efa711c5106c83ea71b00da4", 16).toByteArray()); - x_string = "9834210874c883db35785ee6648079e13d22450c472d6469192ea775ff50c646"; - expected_x = trim(new BigInteger(x_string, 16).toByteArray()); - assertEquals(new BigInteger(1, expected_x).toString(16), x_string); - B = "285b00c034da5676dd8938ce6a7b717968fef2e5f479ecca6d95828a6ce809dd37893752c956245b5d13315987c50e57cc68aa4f770ff9ce977ddfd65052f278b90545286cf32b3d18307140514e0fe2269fc0437fb16104358f6fa127dc97281a017582759644862d736f48025f2b35cb1662067c11f2fcf0753e2f72c9e028"; - expected_M1 = trim(new BigInteger("fedbaff9d9a19efc4eea949b045297a6a3121cf371e2acdda85a2a1ca61c929d", 16).toByteArray()); - expected_M2 = trim(new BigInteger("ffccafa0febc1771a428082b30b7ce409856de4581c7d7d986f5b80015aba0d3", 16).toByteArray()); - - a_byte = new BigInteger(a, 16).toByteArray(); - client = new LeapSRPSession(username, password, a_byte); - - x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); - assertTrue(Arrays.equals(x, expected_x)); - assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); - - A = client.exponential(); - assertTrue(Arrays.equals(A, expected_A)); - - M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); - - assertTrue(Arrays.equals(M1, expected_M1)); - - verified = client.verify(expected_M2); - assertTrue(verified); - } - - public void testSignUpMath() throws NoSuchAlgorithmException { - String username = "parmegvtest29"; - String password = "holahola2"; - byte[] salt = new BigInteger("67e8348d1500d26c", 16).toByteArray(); - - LeapSRPSession client = new LeapSRPSession(username, password); - - String expected_v = "12bea84e588ffa2f8fc5ae47cb5e751a8f2d9e8125268ad9ab483eff83f98cb08484350eb478bee582b8b72363ff8e7b12e9f332e86f7a0bd77689927c609d275471c6ad2cff8b1e7bbfc3664169c3b7bccb0b974154c1f1656b64274568015ca1b849c9d9890ae4437ed686341b432340809b81c30727ed2aadea8bdec6d101"; - - assertEquals(expected_v, client.calculateV(username, password, salt).toString(16)); - } - - public byte[] trim(byte[] in) { - if (in.length == 0 || in[0] != 0) - return in; - - int len = in.length; - int i = 1; - while (in[i] == 0 && i < len) - ++i; - byte[] ret = new byte[len - i]; - System.arraycopy(in, i, ret, 0, len - i); - return ret; - } - -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestProviderListActivity.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestProviderListActivity.java deleted file mode 100644 index 4ab705e7..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestProviderListActivity.java +++ /dev/null @@ -1,114 +0,0 @@ -package se.leap.bitmaskclient.test; - -import android.test.ActivityInstrumentationTestCase2; -import android.widget.ListView; - -import com.robotium.solo.Solo; - -import java.io.IOException; - -import se.leap.bitmaskclient.ProviderListActivity; -import se.leap.bitmaskclient.R; - -public class TestProviderListActivity extends ActivityInstrumentationTestCase2 { - - private Solo solo; - - public TestProviderListActivity() { - super(ProviderListActivity.class); - } - - - @Override - protected void setUp() throws Exception { - super.setUp(); - solo = new Solo(getInstrumentation(), getActivity()); - Screenshot.initialize(solo); - } - - @Override - protected void tearDown() throws Exception { - solo.finishOpenedActivities(); - super.tearDown(); - } - - /** - * Tests should run independently from each other. We need a better approach to test the amount of providers added - */ - /*public void testListProviders() { - assertEquals(solo.getCurrentViews(ListView.class).size(), 1); - - assertEquals("Number of available providers differ", predefinedProviders() + added_providers, shownProviders()); - }*/ - - private int shownProviders() { - return solo.getCurrentViews(ListView.class).get(0).getCount(); - } - - private int predefinedProviders() { - int predefined_providers = 0; - try { - predefined_providers = solo.getCurrentActivity().getAssets().list("urls").length; - } catch (IOException e) { - e.printStackTrace(); - return predefined_providers; - } - - return predefined_providers; - } - - public void testSelectProvider() { - Screenshot.take("Initial CW"); - selectProvider("demo.bitmask.net"); - } - - private void selectProvider(String provider) { - solo.clickOnText(provider); - Screenshot.setTimeToSleep(1); - Screenshot.take("Configuring provider"); - waitForProviderDetails(); - } - - private void waitForProviderDetails() { - String text = solo.getString(R.string.provider_details_title); - assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); - Screenshot.take("Provider details"); - } - - public void testAddNewProvider() { - //addProvider("calyx.net"); - addProvider("riseup.net", true); - } - - public void testAddFalseProviderReturning404() { - //addProvider("calyx.net"); - addProvider("startpage.com", false); - } - - public void testAddFalseProviderReturning200() { - //addProvider("calyx.net"); - addProvider("test.com", false); - } - - private void addProvider(String url, boolean expectSuccess) { - - solo.clickOnActionBarItem(R.id.new_provider); - solo.enterText(0, url); - if ( BuildConfig.FLAVOR.equals("insecure")) { - solo.clickOnCheckBox(0); - } - solo.clickOnText(solo.getString(R.string.save)); - if (expectSuccess) { - waitForProviderDetails(); - } else { - waitForNoValidProviderError(); - } - solo.goBack(); - } - - private void waitForNoValidProviderError() { - String text = solo.getString(R.string.malformed_url); - assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); - } - -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java deleted file mode 100644 index d77b9796..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java +++ /dev/null @@ -1,34 +0,0 @@ -package se.leap.bitmaskclient.test; - -public class TestUserStatusFragment extends BaseTestDashboardFragment { - - public final String TAG = TestUserStatusFragment.class.getName(); - - private final String provider = "demo.bitmask.net"; - private final String test_username = "parmegvtest1"; - private final String test_password = " S_Zw3'-"; - - @Override - protected void setUp() throws Exception { - super.setUp(); - changeProviderAndLogIn(provider); - user_status_controller.clickUserSessionButton(); - user_status_controller.assertLoggedOut(); - } - - public void testLogInAndOut() { - user_status_controller.clickUserSessionButton(); - Screenshot.take("Login dialog"); - user_status_controller.logIn(test_username, test_password); - Screenshot.setTimeToSleep(2); - Screenshot.takeWithSleep("Logging in"); - user_status_controller.logOut(); - } - - public void testFailedLogIn() { - user_status_controller.clickUserSessionButton(); - user_status_controller.logIn(test_username, TAG, false); - if(!user_status_controller.assertErrorLogInDialogAppears()) - throw new IllegalStateException(); - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java deleted file mode 100644 index 70596c10..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package se.leap.bitmaskclient.test; - -import android.content.Context; -import android.test.InstrumentationTestCase; - -import org.json.JSONObject; - -import java.util.Calendar; - -import se.leap.bitmaskclient.Provider; -import se.leap.bitmaskclient.eip.VpnCertificateValidator; - -/** - * @author parmegv - * //FIXME: The class VpnCertificateValidator should be tested with unit tests! - */ -public class TestVpnCertificateValidator extends InstrumentationTestCase { - - String certificate_valid_from_nov2012_to_nov2022 = ""; - - Context context; - FromAssets assets; - - @Override - protected void setUp() throws Exception { - context = getInstrumentation().getContext(); - assets = new FromAssets(context); - JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE)); - certificate_valid_from_nov2012_to_nov2022 = secrets.getString(Provider.CA_CERT); - super.setUp(); - } - - - public void testIsValid() { - VpnCertificateValidator validator = new VpnCertificateValidator(certificate_valid_from_nov2012_to_nov2022); - Calendar calendar = Calendar.getInstance(); - - calendar.set(Calendar.YEAR, 2006); - calendar.set(Calendar.MONTH, Calendar.NOVEMBER); - calendar.set(Calendar.DAY_OF_MONTH, 6); calendar.set(Calendar.YEAR, 2006); - validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); - assertFalse(validator.isValid()); - - calendar.set(Calendar.YEAR, 2011); - calendar.set(Calendar.MONTH, Calendar.NOVEMBER); - calendar.set(Calendar.DAY_OF_MONTH, 6); - validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); - assertFalse(validator.isValid()); - - calendar.set(Calendar.YEAR, 2012); - calendar.set(Calendar.MONTH, Calendar.NOVEMBER); - calendar.set(Calendar.DAY_OF_MONTH, 7); - validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); - assertTrue(validator.isValid()); - - calendar.set(Calendar.YEAR, 2022); - calendar.set(Calendar.MONTH, Calendar.OCTOBER); - calendar.set(Calendar.DAY_OF_MONTH, 21); - validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); - assertTrue(validator.isValid()); - - calendar.set(Calendar.YEAR, 2022); - calendar.set(Calendar.MONTH, Calendar.OCTOBER); - calendar.set(Calendar.DAY_OF_MONTH, 23); - validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); - assertFalse(validator.isValid()); - - } - -} \ No newline at end of file diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/UserStatusTestController.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/UserStatusTestController.java deleted file mode 100644 index 3b0daf9a..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/UserStatusTestController.java +++ /dev/null @@ -1,83 +0,0 @@ -package se.leap.bitmaskclient.test; - -import android.view.*; - -import com.robotium.solo.*; - -import se.leap.bitmaskclient.R; - -import static junit.framework.Assert.assertTrue; - -public class UserStatusTestController { - private final Solo solo; - - public UserStatusTestController(Solo solo) { - this.solo = solo; - } - - void clickUserSessionButton() { - solo.clickOnView(getUserSessionButton()); - } - - View getUserSessionButton() throws IllegalStateException { - View view = solo.getView(R.id.user_status_button); - if(view == null) - throw new IllegalStateException(); - - return view; - } - - void logIn(String username, String password, boolean expectSuccess) { - solo.enterText(0, username); - solo.enterText(1, password); - // https://stackoverflow.com/questions/33560746/how-to-test-alertdialog-item-click-in-robotium-for-android-studio - solo.clickOnView(solo.getView(android.R.id.button1)); - assertTrue(solo.waitForDialogToClose()); - - if (expectSuccess) { - assertLoggedIn(); - } else { - solo.waitForText(solo.getString(R.string.cancel)); - assertTrue(solo.waitForText(solo.getString(R.string.login_button))); - } - } - - void logIn(String username, String password) { - logIn(username, password, true); - } - - private void assertLoggedIn() { - String log_out = solo.getString(R.string.logout_button); - assertTrue(solo.waitForText(log_out)); - } - - void assertLoggedOut() { - String log_in = solo.getString(R.string.login_button); - assertTrue(solo.waitForText(log_in)); - } - - void logOut() { - assertLoggedIn(); - clickUserSessionButton(); - - solo.clickOnActionBarItem(R.string.logout_button); - solo.waitForDialogToClose(); - assertLoggedOut(); - } - - boolean assertErrorLogInDialogAppears() { - assertTrue(solo.waitForDialogToOpen()); - - String username_hint = solo.getEditText(0).getHint().toString(); - String correct_username_hint = solo.getString(R.string.username_hint); - String password_hint = solo.getEditText(1).getHint().toString(); - String correct_password_hint = solo.getString(R.string.password_hint); - String user_message = solo.getText(0).toString(); - String riseup_user_message = solo.getString(R.string.login_riseup_warning); - - return username_hint.equalsIgnoreCase(correct_username_hint) - && password_hint.equalsIgnoreCase(correct_password_hint) - && !user_message.equalsIgnoreCase(riseup_user_message) - && !user_message.isEmpty(); - } -} diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java deleted file mode 100644 index f6760161..00000000 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java +++ /dev/null @@ -1,136 +0,0 @@ -package se.leap.bitmaskclient.test; - -import android.view.View; -import android.widget.Button; - -import com.robotium.solo.Condition; -import com.robotium.solo.Solo; - -import mbanje.kurt.fabbutton.ProgressRingView; -import se.leap.bitmaskclient.Dashboard; -import se.leap.bitmaskclient.R; -import se.leap.bitmaskclient.userstatus.FabButton; - -import static junit.framework.Assert.assertTrue; - -public class VpnTestController { - - private final Solo solo; - - public VpnTestController(Solo solo) { - this.solo = solo; - } - - protected void turnVpnOnAndOff() { - clickVpnButton(); - turningEipOn(); - clickVpnButton(); - turningEipOff(); - } - - protected void clickVpnButton() throws IllegalStateException { - Button button = getVpnButton(); - if(!isVpnButton(button)) - throw new IllegalStateException(); - solo.clickOnButton(String.valueOf(button.getText())); - } - - protected Button getVpnButton() { - View button_view = solo.getView(R.id.vpn_main_button); - if (button_view != null) - return (Button) button_view; - else - return null; - } - - private boolean isVpnButton(Button button) { - return button != null && !button.getText().toString().isEmpty(); - } - - protected FabButton getVpnWholeIcon() { - assertTrue(solo.waitForActivity(Dashboard.class, 5 * 1000)); - - View view = solo.getView(R.id.vpn_status_image); - if (view != null) - return (FabButton) view; - else - return null; - } - - protected void turningEipOn() { - assertInProgress(); - int max_seconds_until_connected = 120; - - Condition condition = new Condition() { - @Override - public boolean isSatisfied() { - return iconShowsConnected(); - } - }; - assertTrue("condition iconShowsConnected not fulfilled within " + max_seconds_until_connected + " seconds." , solo.waitForCondition(condition, max_seconds_until_connected * 1000)); - sleepSeconds(2); - } - - private void assertInProgress() { - FabButton whole_icon = getVpnWholeIcon(); - ProgressRingView a; - a = whole_icon != null ? - (ProgressRingView) getVpnWholeIcon().findViewById(R.id.fabbutton_ring) : - new ProgressRingView(solo.getCurrentActivity()); - BaseTestDashboardFragment.isShownWithinConfinesOfVisibleScreen(a); - } - - private boolean iconShowsConnected() { - View vpnIconView = getVpnWholeIcon(); - return vpnIconView.getTag().equals(R.drawable.ic_stat_vpn); - } - - protected boolean iconShowsDisconnected() { - View vpnIconView = getVpnWholeIcon(); - return vpnIconView.getTag().equals(R.drawable.ic_stat_vpn_offline); - } - - protected void turningEipOff() { - okToBrowserWarning(); - int max_seconds_until_connected = 120; - - Condition condition = new Condition() { - @Override - public boolean isSatisfied() { - return iconShowsDisconnected(); - } - }; - assertTrue(solo.waitForCondition(condition, max_seconds_until_connected * 1000)); - sleepSeconds(2); - } - - private void okToBrowserWarning() { - assertTrue(solo.waitForDialogToOpen()); - clickYes(); - solo.waitForDialogToClose(); - } - - private void clickYes() { - String yes = solo.getString(android.R.string.yes); - solo.clickOnButton(yes); - } - - private void clickDisconnect() { - String disconnect = solo.getString(R.string.cancel_connection); - solo.clickOnButton(disconnect); - } - - @SuppressWarnings("unused") - private void sayOkToDisconnect() throws IllegalStateException { - boolean disconnect_vpn_appeared = solo.waitForActivity(DisconnectVPN.class); - if(disconnect_vpn_appeared){ - clickDisconnect(); - solo.waitForDialogToClose(); - } - else throw new IllegalStateException(); - } - - void sleepSeconds(int seconds) { - solo.sleep(seconds * 1000); - } -} diff --git a/app/src/androidTest/legacy/BaseTestDashboardFragment.java b/app/src/androidTest/legacy/BaseTestDashboardFragment.java new file mode 100644 index 00000000..e187d424 --- /dev/null +++ b/app/src/androidTest/legacy/BaseTestDashboardFragment.java @@ -0,0 +1,94 @@ +package se.leap.bitmaskclient.test; + +import android.content.Context; +import android.graphics.Rect; +import android.test.ActivityInstrumentationTestCase2; +import android.view.View; + +import com.robotium.solo.Solo; + +import se.leap.bitmaskclient.ProviderListActivity; +import se.leap.bitmaskclient.Dashboard; +import se.leap.bitmaskclient.R; + +public abstract class BaseTestDashboardFragment extends ActivityInstrumentationTestCase2 { + + Solo solo; + Context context; + UserStatusTestController user_status_controller; + VpnTestController vpn_controller; + + public BaseTestDashboardFragment() { super(Dashboard.class); } + + @Override + protected void setUp() throws Exception { + super.setUp(); + context = getInstrumentation().getContext(); + solo = new Solo(getInstrumentation(), getActivity()); + Screenshot.initialize(solo); + user_status_controller = new UserStatusTestController(solo); + vpn_controller = new VpnTestController(solo); + ConnectionManager.setMobileDataEnabled(true, context); + solo.unlockScreen(); + if (solo.searchText(solo.getString(R.string.configuration_wizard_title))) { + toDashboardAnonymously("demo.bitmask.net"); + } + } + + void changeProviderAndLogIn(String provider) { + tapSwitchProvider(); + solo.clickOnText(provider); + useRegistered(); + } + + void tapSwitchProvider() { + solo.clickOnMenuItem(solo.getString(R.string.switch_provider_menu_option)); + solo.waitForActivity(ProviderListActivity.class); + } + + private void useRegistered() { + solo.waitForFragmentById(R.id.provider_detail_fragment); + String text = solo.getString(R.string.signup_or_login_button); + clickAndWaitForDashboard(text); + user_status_controller.logIn("parmegvtest10", "holahola2"); + } + + private void clickAndWaitForDashboard(String click_text) { + solo.clickOnButton(click_text); + assertTrue(solo.waitForActivity(Dashboard.class, 80 * 1000)); + } + + static boolean isShownWithinConfinesOfVisibleScreen(View view) { + Rect scrollBounds = new Rect(); + view.getHitRect(scrollBounds); + return view.getLocalVisibleRect(scrollBounds); + } + + + private void toDashboardAnonymously(String provider) { + selectProvider(provider); + useAnonymously(); + } + + private void useAnonymously() { + String text = solo.getString(R.string.use_anonymously_button); + clickAndWaitForDashboard(text); + } + + + private void selectProvider(String provider) { + solo.clickOnText(provider); + Screenshot.setTimeToSleep(1); + Screenshot.take("Configuring provider"); + waitForProviderDetails(); + } + + private void waitForProviderDetails() { + String text = solo.getString(R.string.provider_details_title); + assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); + Screenshot.take("Provider details"); + } + + + +} diff --git a/app/src/androidTest/legacy/ConnectionManager.java b/app/src/androidTest/legacy/ConnectionManager.java new file mode 100644 index 00000000..6fb7d8a9 --- /dev/null +++ b/app/src/androidTest/legacy/ConnectionManager.java @@ -0,0 +1,31 @@ +package se.leap.bitmaskclient.test; + +import android.content.*; +import android.net.*; +import android.net.wifi.*; + +import java.lang.reflect.*; + +public class ConnectionManager { + static void setMobileDataEnabled(boolean enabled, Context context) { + final ConnectivityManager conman = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); + Method[] methods = conman.getClass().getMethods(); + for (Method method : methods) { + if (method.getName().equals("setMobileDataEnabled")) { + method.setAccessible(true); + try { + method.invoke(conman, enabled); + } catch (InvocationTargetException e) { + //e.printStackTrace(); + } catch (IllegalAccessException e) { + //e.printStackTrace(); + } + } + } + } + + static void setWifiEnabled(boolean enabled, Context context) { + WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); + wifiManager.setWifiEnabled(enabled); + } +} diff --git a/app/src/androidTest/legacy/FromAssets.java b/app/src/androidTest/legacy/FromAssets.java new file mode 100644 index 00000000..6a4c1ee2 --- /dev/null +++ b/app/src/androidTest/legacy/FromAssets.java @@ -0,0 +1,26 @@ +package se.leap.bitmaskclient.test; + +import android.content.*; + +import org.json.*; + +import java.io.*; + +public class FromAssets { + + Context context; + + public FromAssets(Context context) { + this.context = context; + } + + public String toString(String filename) throws IOException, JSONException { + String result = ""; + InputStream is = context.getAssets().open(filename); + byte[] bytes = new byte[is.available()]; + if (is.read(bytes) > 0) { + result = new String(bytes); + } + return result; + } +} diff --git a/app/src/androidTest/legacy/Screenshot.java b/app/src/androidTest/legacy/Screenshot.java new file mode 100644 index 00000000..ade28b73 --- /dev/null +++ b/app/src/androidTest/legacy/Screenshot.java @@ -0,0 +1,54 @@ +package se.leap.bitmaskclient.test; + +import com.robotium.solo.*; + +import java.text.*; +import java.util.*; + +public class Screenshot { + private static String default_name = Screenshot.class.getPackage().getName(); + private static DateFormat date_format = DateFormat.getDateTimeInstance(); + private static int DEFAULT_MILLISECONDS_TO_SLEEP = 500; + private static int milliseconds_to_sleep = 0; + private static Solo solo; + + public static void initialize(Solo solo) { + Screenshot.solo = solo; + } + + public static void take(String name) { + solo.takeScreenshot(name.replace(" ", "_") + " " + getTimeStamp()); + } + + public static void takeWithSleep(String name) { + sleepBefore(); + take(name); + } + + public static void take() { + take(default_name + "_" + getTimeStamp()); + } + + public static void takeWithSleep() { + sleepBefore(); + take(); + } + + private static String getTimeStamp() { + return date_format.format(Calendar.getInstance().getTime()).replace(" ", "_").replace("/", "_").replace(":", "_"); + } + + public static void setTimeToSleep(double seconds) { + long milliseconds_to_sleep = Math.round(seconds * 1000); + Screenshot.milliseconds_to_sleep = Math.round(milliseconds_to_sleep); + } + + private static void sleepBefore() { + if(milliseconds_to_sleep == 0) + solo.sleep(DEFAULT_MILLISECONDS_TO_SLEEP); + else + solo.sleep(milliseconds_to_sleep); + milliseconds_to_sleep = 0; + } +} + diff --git a/app/src/androidTest/legacy/TestCalendarProvider.java b/app/src/androidTest/legacy/TestCalendarProvider.java new file mode 100644 index 00000000..82ea8b59 --- /dev/null +++ b/app/src/androidTest/legacy/TestCalendarProvider.java @@ -0,0 +1,26 @@ +package se.leap.bitmaskclient.test; + +import java.util.Calendar; + +import se.leap.bitmaskclient.eip.CalendarProviderInterface; + +/** + * Created by cyberta on 13.09.17. + */ + +class TestCalendarProvider implements CalendarProviderInterface { + + private long currentTimeInMillis = 0; + + public TestCalendarProvider(long currentTimeInMillis) { + this.currentTimeInMillis = currentTimeInMillis; + } + + @Override + public Calendar getCalendar() { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(currentTimeInMillis); + return calendar; + } + +} diff --git a/app/src/androidTest/legacy/TestConstants.java b/app/src/androidTest/legacy/TestConstants.java new file mode 100644 index 00000000..6b4cdfb1 --- /dev/null +++ b/app/src/androidTest/legacy/TestConstants.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package se.leap.bitmaskclient.test; + +/** + * @author parmegv + */ +public class TestConstants { + public final static String EIP_DEFINITION_FILE = "eip-service-test.json"; + public final static String SECRETS_FILE = "secrets.json"; + public final static String GATEWAY_FILE = "gateway.json"; +} diff --git a/app/src/androidTest/legacy/TestDashboardIntegration.java b/app/src/androidTest/legacy/TestDashboardIntegration.java new file mode 100644 index 00000000..ad2b4a00 --- /dev/null +++ b/app/src/androidTest/legacy/TestDashboardIntegration.java @@ -0,0 +1,60 @@ +package se.leap.bitmaskclient.test; + +import java.io.*; + +import se.leap.bitmaskclient.R; + +public class TestDashboardIntegration extends BaseTestDashboardFragment { + + @Override + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + public void testSwitchProvider() { + tapSwitchProvider(); + solo.goBack(); + } + + public void testShowAbout() { + showAbout(); + solo.goBack(); + showAbout(); + solo.goBack(); + } + + private void showAbout() { + clickAbout(); + String text_unique_to_about = solo.getString(R.string.repository_url_text); + solo.waitForText(text_unique_to_about); + } + + private void clickAbout() { + String menu_item = solo.getString(R.string.about); + solo.clickOnMenuItem(menu_item); + } + + private void turnNetworkOff() { + ConnectionManager.setMobileDataEnabled(false, context); + if (!solo.waitForText(getActivity().getString(R.string.eip_state_not_connected), 1, 15 * 1000)) + fail(); + } + + private void restartAdbServer() { + runAdbCommand("kill-server"); + runAdbCommand("start-server"); + } + + /*public void testReboot() { + runAdbCommand("shell am broadcast -a android.intent.action.BOOT_COMPLETED"); + }*/ + + private void runAdbCommand(String adb_command) { + try { + String command = "adb " + adb_command; + Runtime.getRuntime().exec(command).waitFor(); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/app/src/androidTest/legacy/TestEipFragment.java b/app/src/androidTest/legacy/TestEipFragment.java new file mode 100644 index 00000000..4227f19a --- /dev/null +++ b/app/src/androidTest/legacy/TestEipFragment.java @@ -0,0 +1,73 @@ +package se.leap.bitmaskclient.test; + +public class TestEipFragment extends BaseTestDashboardFragment { + + /** + * This test will fail if Android does not trust VPN connection. + * I cannot automate that dialog. + */ + public void testOnOffOpenVpn() { + vpn_controller.clickVpnButton(); + Screenshot.setTimeToSleep(2); + Screenshot.takeWithSleep("Turning VPN on"); + vpn_controller.turningEipOn(); + Screenshot.setTimeToSleep(0.5); + Screenshot.takeWithSleep("VPN turned on"); + + vpn_controller.clickVpnButton(); + vpn_controller.turningEipOff(); + Screenshot.take("VPN turned off"); + + vpn_controller.clickVpnButton(); + vpn_controller.turningEipOn(); + + vpn_controller.clickVpnButton(); + vpn_controller.turningEipOff(); + + } + + /** + * Run only if the trust this app dialog has not been checked. + * You must pay attention to the screen, because you need to cancel de dialog twice (block vpn and normal vpn) + */ + public void testOnFailed() { + /* TODO Do not rely on the Android's vpn trust dialog + vpn_controller.clickVpnButton(); + assertTrue("Have you checked the trust vpn dialog?", solo.waitForActivity(LogWindow.class)); + solo.goBack(); + assertTrue(vpn_controller.iconShowsDisconnected()); + */ + } + + public void testVpnEveryProvider() { + checkDemoBitmaskNet(); + checkRiseupNet(); + checkCalyxNet(); + } + + private void checkDemoBitmaskNet() { + checkProvider("demo.bitmask.net"); + } + + private void checkRiseupNet() { + checkProvider("riseup.net"); + } + + private void checkCalyxNet() { + checkProvider("calyx.net"); + } + + private void checkProvider(String provider) { + changeProviderAndLogIn(provider); + vpn_controller.sleepSeconds(1); + vpn_controller.turnVpnOnAndOff(); + vpn_controller.sleepSeconds(1); + } + + public void testVpnIconIsDisplayed() { + assertTrue(isShownWithinConfinesOfVisibleScreen(vpn_controller.getVpnWholeIcon())); + } + public void testVpnButtonIsDisplayed() { + assertTrue(isShownWithinConfinesOfVisibleScreen(vpn_controller.getVpnButton())); + } +} diff --git a/app/src/androidTest/legacy/TestGatewaysManager.java b/app/src/androidTest/legacy/TestGatewaysManager.java new file mode 100644 index 00000000..02c521be --- /dev/null +++ b/app/src/androidTest/legacy/TestGatewaysManager.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package se.leap.bitmaskclient.test; + +import android.app.*; +import android.content.*; +import android.test.*; + +import org.json.*; + +import java.io.IOException; +import java.util.Arrays; + +import se.leap.bitmaskclient.eip.*; + +import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES; + +/** + * @author parmegv + */ +public class TestGatewaysManager extends InstrumentationTestCase { + + GatewaysManager gateways_manager; + Gateway gateway; + JSONObject eip_definition; + + FromAssets assets; + + Context context; + SharedPreferences preferences; + + @Override + protected void setUp() throws Exception { + super.setUp(); + context = getInstrumentation().getContext(); + assets = new FromAssets(context); + mockGatewaysManager(); + mockRealGateway(); + } + + public void testFromEipServiceJson() { + gateways_manager.fromEipServiceJson(eip_definition); + assertEquals(2, gateways_manager.size()); + gateways_manager.addFromString(gateway.toString()); + assertEquals(2, gateways_manager.size()); + } + + public void testOrderOfGateways_UDP_TCP() { + String[] protocolsInOrder = {"udp", "tcp"}; + manipulateSupportedProtocols(protocolsInOrder); + gateways_manager.fromEipServiceJson(eip_definition); + gateways_manager.addFromString(gateway.toString()); + assertTrue(gateways_manager.select().toString().contains("[\"udp\",\"tcp\"]")); + assertFalse(gateways_manager.select().toString().contains("[\"tcp\",\"udp\"]")); + } + + public void testOrderOfGateways_TCP_UDP() { + String[] protocolsInOrder = {"tcp", "udp"}; + manipulateSupportedProtocols(protocolsInOrder); + gateways_manager.fromEipServiceJson(eip_definition); + gateways_manager.addFromString(gateway.toString()); + assertFalse(gateways_manager.select().toString().contains("[\"udp\",\"tcp\"]")); + assertTrue(gateways_manager.select().toString().contains("[\"tcp\",\"udp\"]")); + } + + public void testAddFromString() { + gateways_manager.addFromString(""); + assertEquals(0, gateways_manager.size()); + gateways_manager.addFromString(gateway.toString()); + assertEquals(1, gateways_manager.size()); + } + + public void testRemoveDuplicate() { + gateways_manager.addFromString(gateway.toString()); + assertEquals(1, gateways_manager.size()); + + mockArtificialGateway(); + gateways_manager.addFromString(gateway.toString()); + assertEquals(1, gateways_manager.size()); + } + + public void testToString() { + assertEquals("[]", gateways_manager.toString()); + + gateways_manager.addFromString(gateway.toString()); + assertEquals("[" + gateway.toString() + "]", gateways_manager.toString()); + } + + public void testIsEmpty() { + assertTrue(gateways_manager.isEmpty()); + gateways_manager.addFromString(""); + assertTrue(gateways_manager.isEmpty()); + gateways_manager.addFromString(gateway.toString()); + assertFalse(gateways_manager.isEmpty()); + } + + private void mockGatewaysManager() { + context = getInstrumentation().getContext(); + preferences = context.getSharedPreferences(SHARED_PREFERENCES, Activity.MODE_PRIVATE); + gateways_manager = new GatewaysManager(context, preferences); + } + + private void mockRealGateway() { + try { + eip_definition = new JSONObject(assets.toString(TestConstants.EIP_DEFINITION_FILE)); + JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE)); + JSONObject gateway = new JSONObject(assets.toString(TestConstants.GATEWAY_FILE)); + this.gateway = new Gateway(eip_definition, secrets, gateway); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void manipulateSupportedProtocols(String[] protocols) { + try { + eip_definition = new JSONObject(assets.toString(TestConstants.EIP_DEFINITION_FILE)); + JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE)); + JSONArray protocolJsonArray = new JSONArray(Arrays.asList(protocols)); + JSONArray gateways = eip_definition.getJSONArray("gateways"); + for (int i = 0; i < gateways.length(); i++) { + JSONObject gatewayJson = gateways.getJSONObject(i); + JSONObject capabilitiesJson = gatewayJson.getJSONObject("capabilities"); + capabilitiesJson.put("protocols", protocolJsonArray); + gatewayJson.put("protocols", protocolJsonArray); + } + this.gateway = new Gateway(eip_definition, secrets, gateways.getJSONObject(0)); + } catch (JSONException e) { + e.printStackTrace(); + assertFalse(true); + } catch (IOException e) { + e.printStackTrace(); + assertFalse(true); + } + + } + + private void mockArtificialGateway() { + try { + eip_definition = new JSONObject(assets.toString(TestConstants.EIP_DEFINITION_FILE)); + JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE).replace("6u6", "7u7")); + JSONObject gateway = new JSONObject(assets.toString(TestConstants.GATEWAY_FILE)); + this.gateway = new Gateway(eip_definition, secrets, gateway); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/app/src/androidTest/legacy/TestLeapSRPSession.java b/app/src/androidTest/legacy/TestLeapSRPSession.java new file mode 100644 index 00000000..8d0df59b --- /dev/null +++ b/app/src/androidTest/legacy/TestLeapSRPSession.java @@ -0,0 +1,629 @@ +package se.leap.bitmaskclient.test; + +import java.io.*; +import java.math.*; +import java.security.*; +import java.util.*; + +import android.test.suitebuilder.annotation.*; + +import se.leap.bitmaskclient.*; + +import junit.framework.*; + +public class TestLeapSRPSession extends TestCase { + + public TestLeapSRPSession(String name) { + super(name); + } + + protected void setUp() throws Exception { + super.setUp(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + public void testExponential() { + byte[] expected_A; + byte[] a_byte; + LeapSRPSession client; + + /* Test 1: abytes = 4 */ + expected_A = new BigInteger("44eba0239ddfcc5a488d208df32a89eb00e93e6576b22ba2e4410085a413cf64e9c2f08ebc36a788a0761391150ad4a0507ca43f9ca659e2734f0457a85358c0bb39fa87183c9d3f9f8a3b148dab6303a4e796294f3e956472ba0e2ea5697382acd93c8b8f1b3a7a9d8517eebffd6301bfc8de7f7b701f0878a71faae1e25ad4", 16).toByteArray(); + String username = "username", + password = "password", + salt = "64c3289d04a6ecad", + a = "3565fdc2"; + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + byte[] A = client.exponential(); + + assertTrue(Arrays.equals(A, expected_A)); + + /* Test 1: abytes = 5 */ + a = "67c152a3"; + expected_A = new BigInteger("11acfacc08178d48f95c0e69adb11f6d144dd0980ee6e44b391347592e3bd5e9cb841d243b3d9ac2adb25b367a2558e8829b22dcef96c0934378412383ccf95141c3cb5f17ada20f53a0225f56a07f2b0c0469ed6bbad3646f7b71bdd4bedf5cc6fac244b26d3195d8f55877ff94a925b0c0c8f7273eca733c0355b38360442e", 16).toByteArray(); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + A = client.exponential(); + + assertTrue(Arrays.equals(A, expected_A)); + } + + public void testResponse() throws NoSuchAlgorithmException { + /* Test 1: with intermediate checks */ + byte[] expected_A = trim(new BigInteger("884380f70a62193bbe3589c4e1dbdc4467b6b5a1b4486e4b779023506fc1f885ae26fa4a5d817b3f38a35f3487b147b82d4bd0069faa64fdc845f7494a78251709e212698e42ced44b0f3849adc73f467afcb26983bd13bdc38906b178003373ddd0ac1d38ce8a39ffa3a7795787207a129a784f4b65ce0b302eb1bcf4045883", 16).toByteArray()); + byte[] expected_x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16).toByteArray(); + byte[] expected_M1 = trim(new BigInteger("e6a8efca2c07ef24e0b69be2d4d4a7e74742a4db7a92228218fec0008f7cc94b", 16).toByteArray()); + String username = "username", + password = "password", + salt = "64c3289d04a6ecad", + a = "8c911355"; + byte[] a_byte = new BigInteger(a, 16).toByteArray(); + LeapSRPSession client = new LeapSRPSession(username, password, a_byte); + + byte[] x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); + assertTrue(Arrays.equals(x, expected_x)); + + byte[] A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + String B = "bc745ba25564fc312f44ea09fb663aa6d95867772e412a6a23f1bc24183e54b32f134372c560f4b3fda19ba7a56b0f84fdcdecc22be6fd256639e918e019691c40a39aa5c9631820e42b28da61b8c75b45afae9d77d63ac8f4dda093762be4a890fbd86061dbd7e5e7c03c4dacde769e0f564df00403e449c0535537f1ba7263"; + + byte[] M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + assertTrue(Arrays.equals(M1, expected_M1)); + + /* Test 2: no intermediate checks */ + expected_A = trim(new BigInteger("9ffc407afd7e7ecd32a8ea68aa782b0254a7e2197a955b5aa646fc1fc43ff6ef2239f01b7d5b82f152c870d3e69f3321878ca2acda06dd8fb6ce02f41c7ed48061c78697b01cf353f4222311334c707358b6ec067e317527316bfa85b5ec74537e38b5b14c1100d14c96320f385e5b1dcccde07e728c7ef624353167a29ae461", 16).toByteArray()); + expected_M1 = trim(new BigInteger("c3203ec1dd55c96038276456c18c447fb4d2a2f896c73c31d56da1781cae79a8", 16).toByteArray()); + a = "38d5b211"; + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); + A = client.exponential(); + + B = "b8ca7d93dbe2478966ffe025a9f2fb43b9995ce04af9523ea9a3fa4b132136076aa66ead1597c3da23f477ce1cfaf68b5dcc94e146db06cf8391d14a76ce53aab86067b13c93b135d7be6275669b3f51afec6cc41f19e0afca7c3ad5c4d6ee4c09d4b11bcd12e26c727ee56d173b92eea6926e72cc73deebe12dd6f30f44db8a"; + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + /* Test 3: With intermediate values */ + expected_M1 = new BigInteger("4c01f65a9bb00f95e435593083040ae1e59e59800c598b42de821c21f3a35223", 16).toByteArray(); + expected_A = new BigInteger("1bceab3047a6f84495fdd5b4dbe891f0b30f870d7d4e38eaef728f6a7d4e9342d8dae8502fdae4f16b718d2e916a38b16b6def45559a5ebae417a1b115ba6b6a0451c7ff174c3e2507d7d1f18ef646fd065bc9ba165a2a0ae4d6da54f060427178b95b0eff745f5c3f8c4f19ea35addc3ce0daf2aca3328c98bafcf98286d115", 16).toByteArray(); + B = "41a7b384f2f52312fa79b9dc650ae894f543aea49800cf9477fbcf63e39cbfe6d422f7126777d645cdf749276a3ae9eb6dfcfdb887f8f60ac4094a343013fcebbd40e95b3153f403ab7bb21ea1315aa018bab6ab84017fcb084b3870a8bf1cb717b39c9a28177c61ce7d1738379be9d192dd9793b50ebc3afabe5e78b0a4b017"; + a = "36ee80ec"; + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); + A = client.exponential(); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + } + + public void testCalculateV() throws NoSuchAlgorithmException { + String expected_v = "502f3ffddc78b866330550c2c60ebd68427c1793237d770e6390d1f794abd47b6786fa5025728d1ca4ec24cfc7a89808278330099ad66456a7c9c88be570b928f9825ac2ecdee31792335f7fa5fc9a78b692c487aa400c7d5cc5c1f2a3a74634c4afa0159600bbf22bf6dfb1e0d85061e55ce8df6243758066503bcf51c83848cf7184209731f89a90d888934c75798828859babe73c17009bf827723fc1bcd0"; + + BigInteger k = new BigInteger("bf66c44a428916cad64aa7c679f3fd897ad4c375e9bbb4cbf2f5de241d618ef0", 16); + BigInteger g = new BigInteger("2", 16); + BigInteger N = new BigInteger(ConfigHelper.NG_1024, 16); + BigInteger x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16); + + BigInteger v = k.multiply(g.modPow(x, N)); // g^x % N + + assertEquals(v.toString(16), expected_v); + assertTrue(Arrays.equals(v.toByteArray(), new BigInteger(expected_v, 16).toByteArray())); + } + + public void testGetU() throws NoSuchAlgorithmException { + /* Test 1 */ + String Astr = "46b1d1fe038a617966821bd5bb6af967be1bcd6f54c2db5a474cb80b625870e4616953271501a82198d0c14e72b95cdcfc9ec867027b0389aacb313319d4e81604ccf09ce7841dc333be2e03610ae46ec0c8e06b8e86975e0984cae4d0b61c51f1fe5499a4d4d42460261a3e134f841f2cef4d68a583130ee8d730e0b51a858f"; + String Bstr = "5e1a9ac84b1d9212a0d8f8fe444a34e7da4556a1ef5aebc043ae7276099ccdb305fd7e1c179729e24b484a35c0e33b6a898477590b93e9a4044fc1b8d6bc73db8ac7778f546b25ec3f22e92ab7144e5b974dc58e82a333262063062b6944a2e4393d2a087e4906e6a8cfa0fdfd8a5e5930b7cdb45435cbee7c49dfa1d1216881"; + String ustr = "759c3cfb6bfaccf07eeb8e46fe6ea290291d4d32faca0681830a372983ab0a61"; + + byte[] Abytes = new BigInteger(Astr, 16).toByteArray(); + byte[] Bbytes = new BigInteger(Bstr, 16).toByteArray(); + byte[] expected_u = new BigInteger(ustr, 16).toByteArray(); + + MessageDigest u_digest = MessageDigest.getInstance("SHA256"); + u_digest.update(trim(Abytes)); + u_digest.update(trim(Bbytes)); + byte[] u = new BigInteger(1, u_digest.digest()).toByteArray(); + + assertTrue(Arrays.equals(expected_u, u)); + + /* Test 2 */ + Astr = "c4013381bdb2fdd901944b9d823360f367c52635b576b9a50d2db77141d357ed391c3ac5fa452c2bbdc35f96bfed21df61627b40aed8f67f21ebf81e5621333f44049d6c9f6ad36464041438350e1f86000a8e3bfb63d4128c18322d2517b0d3ead63fd504a9c8f2156d46e64268110cec5f3ccab54a21559c7ab3ad67fedf90"; + Bstr = "e5d988752e8f265f01b98a1dcdecc4b685bd512e7cd9507f3c29f206c27dac91e027641eed1765c4603bbd7a9aa7fac300ef67dafe611ba2dbe29a32d83d486296f328d38b44c0c211d01d3fe422aac168b6850c87782338969c54594fc87804d4db34910ad4b5452a81027842ac8d8d8288fd44872e4c719ac8fb971d0a33e1"; + ustr = "6510328f913b81ba662e564ee5afb7c395ea27c3c0276fc5ca51f0edecd4baf1"; + + Abytes = new BigInteger(Astr, 16).toByteArray(); + Bbytes = new BigInteger(Bstr, 16).toByteArray(); + expected_u = new BigInteger(ustr, 16).toByteArray(); + expected_u = trim(expected_u); + + u_digest = MessageDigest.getInstance("SHA-256"); + u_digest.update(trim(Abytes)); + u_digest.update(trim(Bbytes)); + u = new BigInteger(1, u_digest.digest()).toByteArray(); + u = trim(u); + + assertTrue(Arrays.equals(expected_u, u)); + + /* Test 3 */ + Astr = "d13973fe4e0e13423cd036caf0912e23a1f9b0c23966f5a5897c8ff17c5cbac8bab7f07d9ac4ee47396a7c68e80ce854c84f243148521277900aaa132a7b93b61e54d742d7f36edb4cdef54bc78cca69ac72653a7ae0fc47ec1e9a84024ea9487a61357e28eddc185e4fe01388e64e6b8f688dd74471d56dd244204522e08483"; + Bstr = "a6701686d9d987a43f06e8497330c8add8febd191a7a975bced0d058eb03ccc6805263349363b2d54ac435b01155dc41c6067287d9b93e3637ab3b7e8bc7d9cf38d9fdbb2ca9ee8ba1946a46cb555cb7dafcc177fcf7a4b0eb1e5db2249949c1fd15e0b7c1b3616f9e2649bdf074ed841efbdc9f29ee8c8bfcedeaed3dc49378"; + ustr = "78414ec80cf44225e7ed386dcf2ceb89837327ccae11b761fc77d48c0307977"; + + Abytes = new BigInteger(Astr, 16).toByteArray(); + Bbytes = new BigInteger(Bstr, 16).toByteArray(); + expected_u = new BigInteger(ustr, 16).toByteArray(); + expected_u = trim(expected_u); + + u_digest = MessageDigest.getInstance("SHA-256"); + u_digest.update(trim(Abytes)); + u_digest.update(trim(Bbytes)); + u = new BigInteger(1, u_digest.digest()).toByteArray(); + u = trim(u); + + assertTrue(Arrays.equals(expected_u, u)); + + /* Test 4 */ + Astr = "ee8bc0cb97dd9c9937759658ff9d791df1dd57b48c5febc2e98af028d0e36eaddf1a3fc555f2bcd6456827e8c7b07ec02a1f365457843bda226bfc1a55c4776879f9df6c916810131ec65a3a4cf473c6a34299d64c91cf26542ea0fc059d24422fc783460c3fafe26bf6f7c24904ae1c5a6421e2f5315030ab007ce8f2c2fd97"; + Bstr = "95ecbd13b28c7f38318fd664ee97d9e853b0d6e9cbff9a3775a3cc5d5077ffc146aec70d9439e75c19a34b67368b8bd7035ba6254e0a260d99b1e253aae2e0d8f4a13e1ed472f3ef0e3086300cd15d059f6be7d7141ee09071b1c5e5d1c83b250a3c8f1a587f8fe59d49aaeb2cfc7e13a5a58bc76cc8baf7f6a647982c67ee49"; + ustr = "e28737c7307c84e4d0866b7cf882f22852a764b109634f77a5eb986a96ffcf9a"; + + Abytes = new BigInteger(Astr, 16).toByteArray(); + Bbytes = new BigInteger(Bstr, 16).toByteArray(); + expected_u = new BigInteger(ustr, 16).toByteArray(); + expected_u = trim(expected_u); + assertEquals(new BigInteger(1, expected_u).toString(16), ustr); + + u_digest = MessageDigest.getInstance("SHA-256"); + u_digest.update(trim(Abytes)); + u_digest.update(trim(Bbytes)); + u = new BigInteger(1, u_digest.digest()).toByteArray(); + u = trim(u); + + assertTrue(Arrays.equals(expected_u, u)); + } + + @SmallTest + public void testCalculatePasswordHash() throws UnsupportedEncodingException, NoSuchAlgorithmException { + String salt_str = "", username_str = "", password_str = ""; + String expected_inner = "cfb9ae3ec5433076889c4fe5663926e20bf570cc7950a51c889a314fab2f5ed716bde9c1cc91be14", + expected_x = "9736a5e386a18f35bb08cac0f7c70bdbe120f2efe019874d0eb23b85b1955858"; + + /* Test 1 */ + salt_str = "cfb9ae3ec5433076"; + username_str = "nostradamus"; + password_str = "$[[//jjiilajfewahug43a89y¿"; + password_str = password_str.replaceAll("\\\\", "\\\\\\\\"); + // Calculate x = H(s | H(U | ':' | password)) + MessageDigest x_digest = MessageDigest.getInstance("SHA-256"); + + // Try to convert the username to a byte[] using UTF-8 + byte[] user = null; + byte[] password_bytes = null; + byte[] colon = {}; + + String encoding = "UTF-8"; + encoding = "ISO-8859-1"; + user = ConfigHelper.trim(username_str.getBytes(encoding)); + colon = ConfigHelper.trim(":".getBytes(encoding)); + password_bytes = ConfigHelper.trim(password_str.getBytes(encoding)); + + // Build the hash + x_digest.update(user); + x_digest.update(colon); + x_digest.update(password_bytes); + byte[] h = x_digest.digest(); + byte[] salt_bytes = ConfigHelper.trim(new BigInteger(salt_str, 16).toByteArray()); + + x_digest.reset(); + x_digest.update(salt_bytes); + x_digest.update(h); + byte[] x_digest_bytes = x_digest.digest(); + assertTrue(new BigInteger(1, x_digest_bytes).toString(16).equalsIgnoreCase(expected_x)); + } + + public void testCalculateS() throws NoSuchAlgorithmException { + String expected_S = "34d71467d0a30c5787e6b4384c7176a724df28f6c1d3b0b7738238621be19080942ca5d4454ab3e5664d42970ea2d42d1188ab246afb1475c481111f30886c79cc99ddd1d711034bc4ac57a0c134fef40470e1ac3386f39abcd1bf9d0cc758a1f38a87b2f7261018cdc6191cd941292c77c320b3c664a9bb1325dd7a2bf62db4"; + + String B_string = "d390da0991b84e20918764aed9bccf36fc70863f08a1d3fa0aecd9610d8c40d1895afaf3aa9b4582fb5bc673037dfc1bf0ca7d3d190a807dec563fe57d596b3551ec8a6461e0621b77fabfaa29234187063e715e2706522c65f35d89f3914a7cdf40ddd240ef3d22b5534469cf6b3b31e158f817dcf5b6b44b0914d4787d027e"; + String A_string = "c6385e56b9cb8987df3c58ffe6c47bfcd9f9d52f02b68048d72135a8522a0919b41683e3c732a0874e0555b8f288fa067842b1c40a56f1a7d910ad125e71238cb14ba47838f881cabf735d5414f4fcdd6855943621c271c5f013753d439fb124674c79e30d849e9178c780f7c25aded12f053ae41be68289787caf7c3cbb07a4"; + String a_string = "fc1c2d8d"; + + BigInteger A = new BigInteger(A_string, 16); + byte[] Bbytes = new BigInteger(B_string, 16).toByteArray(); + BigInteger a = new BigInteger(a_string, 16); + BigInteger g = ConfigHelper.G; + BigInteger N = new BigInteger(ConfigHelper.NG_1024, 16); + BigInteger k = new BigInteger("bf66c44a428916cad64aa7c679f3fd897ad4c375e9bbb4cbf2f5de241d618ef0", 16); + BigInteger x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16); + + /* GetU */ + MessageDigest u_digest = MessageDigest.getInstance("SHA256"); + u_digest.update(trim(A.toByteArray())); + u_digest.update(trim(Bbytes)); + byte[] ub = new BigInteger(1, u_digest.digest()).toByteArray(); + + BigInteger v = k.multiply(g.modPow(x, N)); // g^x % N + String expected_v = "502f3ffddc78b866330550c2c60ebd68427c1793237d770e6390d1f794abd47b6786fa5025728d1ca4ec24cfc7a89808278330099ad66456a7c9c88be570b928f9825ac2ecdee31792335f7fa5fc9a78b692c487aa400c7d5cc5c1f2a3a74634c4afa0159600bbf22bf6dfb1e0d85061e55ce8df6243758066503bcf51c83848cf7184209731f89a90d888934c75798828859babe73c17009bf827723fc1bcd0"; + String v_string = v.toString(16); + + BigInteger B = new BigInteger(1, Bbytes); + BigInteger u = new BigInteger(1, ub); + String expected_u_string = "2d36f816df24da7b904c904a7e2a2500511df118ced26bda92a63aca792c93b"; + String u_string = u.toString(16); + + BigInteger B_v = B.subtract(v); + BigInteger a_ux = a.add(u.multiply(x)); + byte[] a_ux_byte = a_ux.toByteArray(); + String expected_a_aux_string = "d8d0843a60d471ab46a761b775f8fd28bbbd8affbc704424c79b822ac36b1177925404db910072737df3c5083cf20ebd2f08e1381d80d91e4f6fc99f592203"; + byte[] expected_a_aux_byte = new BigInteger(expected_a_aux_string, 16).toByteArray(); + + BigInteger S = B_v.modPow(a_ux, N); + + byte[] expected_S_bytes = new BigInteger(expected_S, 16).toByteArray(); + byte[] S_bytes = S.toByteArray(); + assertTrue(Arrays.equals(S_bytes, expected_S_bytes)); + assertEquals(S.toString(16), expected_S); + } + + public void testXor() throws Exception { + String expected_xor_string = "928ade491bc87bba9eb578701d44d30ed9080e60e542ba0d3b9c20ded9f592bf"; + byte[] expected_xor = new BigInteger(expected_xor_string, 16).toByteArray(); + + byte[] nbytes = trim(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray()); + byte[] gbytes = trim(ConfigHelper.G.toByteArray()); + + byte[] ndigest = trim(MessageDigest.getInstance("SHA-256").digest(nbytes)); + byte[] gdigest = MessageDigest.getInstance("SHA-256").digest(gbytes); + + BigInteger ndigest_bigInteger = new BigInteger(1, ndigest); + String expected_ndigest_string = "494b6a801b379f37c9ee25d5db7cd70ffcfe53d01b7c9e4470eaca46bda24b39"; + String ndigest_string = ndigest_bigInteger.toString(16); + assertEquals(ndigest_string, expected_ndigest_string); + + BigInteger gdigest_bigInteger = new BigInteger(1, gdigest); + String xor_string = ndigest_bigInteger.xor(gdigest_bigInteger).toString(16); + + byte[] xor = new BigInteger(xor_string, 16).toByteArray(); + + assertTrue(Arrays.equals(expected_xor, xor)); + } + + public void testVerify() throws NoSuchAlgorithmException { + byte[] expected_A = trim(new BigInteger("884380f70a62193bbe3589c4e1dbdc4467b6b5a1b4486e4b779023506fc1f885ae26fa4a5d817b3f38a35f3487b147b82d4bd0069faa64fdc845f7494a78251709e212698e42ced44b0f3849adc73f467afcb26983bd13bdc38906b178003373ddd0ac1d38ce8a39ffa3a7795787207a129a784f4b65ce0b302eb1bcf4045883", 16).toByteArray()); + byte[] expected_x = new BigInteger("4cb937fd74ee3bb53b79a3174d0c07c14131de9c825897cbca52154e74200602", 16).toByteArray(); + byte[] expected_M1 = trim(new BigInteger("e6a8efca2c07ef24e0b69be2d4d4a7e74742a4db7a92228218fec0008f7cc94b", 16).toByteArray()); + byte[] expected_M2 = trim(new BigInteger("6402e108415ab4a7cd223ec435570614c8aacc09fcf081ade2dc00275e90ceee", 16).toByteArray()); + String username = "username", + password = "password", + salt = "64c3289d04a6ecad", + a = "8c911355"; + byte[] a_byte = new BigInteger(a, 16).toByteArray(); + LeapSRPSession client = new LeapSRPSession(username, password, a_byte); + + byte[] x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); + assertTrue(Arrays.equals(x, expected_x)); + + byte[] A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + String B = "bc745ba25564fc312f44ea09fb663aa6d95867772e412a6a23f1bc24183e54b32f134372c560f4b3fda19ba7a56b0f84fdcdecc22be6fd256639e918e019691c40a39aa5c9631820e42b28da61b8c75b45afae9d77d63ac8f4dda093762be4a890fbd86061dbd7e5e7c03c4dacde769e0f564df00403e449c0535537f1ba7263"; + + byte[] M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + assertTrue(Arrays.equals(M1, expected_M1)); + + boolean verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 2 */ + expected_A = trim(new BigInteger("180a1caf84efe93610a56772edea7b2d20ef3e9f34e578147b5402a898982f33131708233f9ddd2946246703c5db705f0859cca9cfc5b72ad5a05ec0c748545aa083d5b7b1bf06efe6737e9e0fd81b832b5cba983f1b9717041df8114385b93c8c669db06d62c5773b8e8a8f07e98a840a33d04d3448d4bcd2c042387c316750", 16).toByteArray()); + expected_M1 = trim(new BigInteger("a47782f23057a7e06704ea94389589b3c70971a63268acef2aefd74e234dd3c2", 16).toByteArray()); + a = "d89f0e33"; + expected_M2 = trim(new BigInteger("517278a03a0320a52dcb391caf5264d76149d7d9b71ed2b65536233344c550cf", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); + A = client.exponential(); + + B = "5f86fe2f7b7455e877e1760db8d3da1fcd4df0d10ec2a40298f87287bdb2f22c0ea54ff9b1f660cc1666459a7e2fd5501970b317490c3dfd3ba2e18f7be7526b72ea4d01e8f064754b935b107ced0892ce86112cbe32282f929907985fcb29f42c5d4dc32adeb29d12a611cac49cca3fefd2227efadc3989c2e72dd64a003141"; + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 3 */ + expected_A = trim(new BigInteger("a9c556c30bf4c1b1fdc1bc9e672ab4751806acc8581042b3779faaf25f85f47dfc58828742e2d2a06c51acbbb9f3fae0e01f64df0775a269f5ee4a6e71bc37b8a368e04b9053d399bc5b809ffd6ecab775a577804f2a5ed2e829f15e6af13bf0b78b6b108cf591bc9960992904fd1433698a51e0d05ee954cf98cbfe7995621e", 16).toByteArray()); + expected_M1 = trim(new BigInteger("0afca3583c4146990ec7312f9f4b4d9cceebc43a19f96709bf3d0a17b11dcc1e", 16).toByteArray()); + a = "50e662d6"; + expected_M2 = trim(new BigInteger("3bfb91c7d04b6da6381fe3d2648d992cdc6bc67b8ee16d1cfa733f786d492261", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray()); + A = client.exponential(); + + B = "6fe41e8262f4f8bc4ed9f4e1b4802ae3adac9c348e6efc07f16c6f5704b95a1f12325097489372c3936584a37301ebab400a32ac6699f4556da84f076489060527bd50578a317a3ec8b814bf2f4dd9c4adad368610eb638aa81663a205ba26d8f0b9654bf3940357b867cd42725e8532b97a2410a557d291aa55c0b44f249361"; + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 4: user abc, password abcdefghi */ + username = "abc"; + password = "abcdefghi"; + salt = "be26aac449a093e5"; + expected_A = trim(new BigInteger("c4013381bdb2fdd901944b9d823360f367c52635b576b9a50d2db77141d357ed391c3ac5fa452c2bbdc35f96bfed21df61627b40aed8f67f21ebf81e5621333f44049d6c9f6ad36464041438350e1f86000a8e3bfb63d4128c18322d2517b0d3ead63fd504a9c8f2156d46e64268110cec5f3ccab54a21559c7ab3ad67fedf90", 16).toByteArray()); + expected_x = trim(new BigInteger("6325967f1a161efd4e2d6e6fabbfccc32be05139cf82b08fb59c0a0db3f34bcf", 16).toByteArray()); + a = "5d4cde29"; + B = "e5d988752e8f265f01b98a1dcdecc4b685bd512e7cd9507f3c29f206c27dac91e027641eed1765c4603bbd7a9aa7fac300ef67dafe611ba2dbe29a32d83d486296f328d38b44c0c211d01d3fe422aac168b6850c87782338969c54594fc87804d4db34910ad4b5452a81027842ac8d8d8288fd44872e4c719ac8fb971d0a33e1"; + expected_M1 = trim(new BigInteger("e5972ddc53e6190735fc79cd823053a65ffb6041d69480adcba2f6a2dc2f2e86", 16).toByteArray()); + expected_M2 = trim(new BigInteger("8f4552b1021a4de621d8f50f0921c4d20651e702d9d71276f8f6c15b838de018", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(trim(new BigInteger(salt, 16).toByteArray()), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 5: user abc, password abcdefghi */ + username = "abc"; + password = "abcdefghi"; + salt = "be26aac449a093e5"; + expected_A = trim(new BigInteger("d13973fe4e0e13423cd036caf0912e23a1f9b0c23966f5a5897c8ff17c5cbac8bab7f07d9ac4ee47396a7c68e80ce854c84f243148521277900aaa132a7b93b61e54d742d7f36edb4cdef54bc78cca69ac72653a7ae0fc47ec1e9a84024ea9487a61357e28eddc185e4fe01388e64e6b8f688dd74471d56dd244204522e08483", 16).toByteArray()); + expected_x = trim(new BigInteger("6325967f1a161efd4e2d6e6fabbfccc32be05139cf82b08fb59c0a0db3f34bcf", 16).toByteArray()); + a = "fc57e4b1"; + B = "a6701686d9d987a43f06e8497330c8add8febd191a7a975bced0d058eb03ccc6805263349363b2d54ac435b01155dc41c6067287d9b93e3637ab3b7e8bc7d9cf38d9fdbb2ca9ee8ba1946a46cb555cb7dafcc177fcf7a4b0eb1e5db2249949c1fd15e0b7c1b3616f9e2649bdf074ed841efbdc9f29ee8c8bfcedeaed3dc49378"; + expected_M1 = trim(new BigInteger("0b590fde631566d0d3420a898a9b469656e64bfaff165c146b78964eee7920b8", 16).toByteArray()); + expected_M2 = trim(new BigInteger("04cf3ab3b75dbc4b116ca2fec949bf3deca1e360e016d7ab2b8a49904c534a27", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(trim(new BigInteger(salt, 16).toByteArray()), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 6: user and password of real use */ + username = "parmegv"; + password = "wR\"P}x@_,:k$`YYd*s T`-n."; + salt = "40c3f47b99ce8dc9"; + expected_A = trim(new BigInteger("490b5de7a287c59cefe267441a186ec24f63210fbf28877305f5896eaec5a7245d304ecb2b09d91066e627d7b2c8bf9e5271d882361a435355d1c2d1ac9d3069877189a01d64b2dd73a569e9e96b9a99767dbc02e04c839b09444f48430b113c1827c20b684ae33f5018051169f5acf4913ebd76a205c6f1aa2cc75747687d56", 16).toByteArray()); + String x_string = "9665839759b4fb9684e7438daecbd6e7129b4ebd3e4a107916e9a64bbbf399c9"; + expected_x = trim(new BigInteger(x_string, 16).toByteArray()); + assertEquals(new BigInteger(1, expected_x).toString(16), x_string); + a = "a72111a2"; + B = "6574ddce3e33c44a77198fa8b3656627e4a24c8786948e79f0c2588febaa485c94b1deb5e420bd3b46f9a34c7862525452ca7a0542c52f939d9f277a013aeceef7353a7741440f6dd2f6c2f1dc07fa5ca003e305c89c876a3035bd04f546b711d44da06a3ba827bc8affbf9ed46de1bfbc670ef9ed7c0bb8cdc588285d13849e"; + expected_M1 = trim(new BigInteger("03bbcf57aeaec89a3a254bb9650a924ea86aa0fdd83fd7274a75b7083f221cf0", 16).toByteArray()); + expected_M2 = trim(new BigInteger("082cf49ad5a34cc5ca571e3d063aec4bd96e7b96a6d951295180631650a84587", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 7: password with ! */ + username = "parmegvtest3"; + password = "holahola!"; + salt = "1bf48d42b9a7ed32"; + expected_A = trim(new BigInteger("4e2fbe8db5d07f33ff1f4303959b5396dcffc1460b6ce8866fd388415f27fe10f9042986ab8682cdcf9a033e651bca89173688989adad854c91bc1918f98d5c82525fb6f328a8cf74ce1436b23821cba5337aaa20a3e5631e4b957053d542f2b5fc456e888371c9d6b94360b37adb2793eca8db100c24887c459e36d729a98e1", 16).toByteArray()); + x_string = "363d1d62dda07b2d987a9739ddb5ec32fcad9c7322fb64e87937f2da86c45d9f"; + expected_x = trim(new BigInteger(x_string, 16).toByteArray()); + assertEquals(new BigInteger(1, expected_x).toString(16), x_string); + a = "16dd0cf5"; + B = "dd5c9c5e13eb5daa6e7303928b3c826cec520ccef429c0dcb785be34c330d5bb89c99d7d94842b6b5c19cac600f884c50b26989b105f397115df7f3d13c5c7c2f6327cc547fc854ae40f09f1f6a104968bd510243feb104eb559e085fe1d720770be2887a1f424c534a3ab962d82e92458f652328bcf9878f95fdcf463d06193"; + expected_M1 = trim(new BigInteger("a7ffbff753a547b877f8944339b707b3ce1998da27badf253d56bf39f35308a6", 16).toByteArray()); + expected_M2 = trim(new BigInteger("5cc3d7f0077e978c83acdef14a725af01488c1728f0cf32cd7013d24faf5d901", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 8: username and password *was* failing in localhost testProviderAPI*/ + username = "gg"; + password = "password"; + a = "bc925bfb"; + salt = "ff9ebb44e947cf59"; + expected_A = trim(new BigInteger("8f434633414faeaf035a0dea8c1cb7876bb1f8ee80d6fee8ea43ae60c4f9658550d825c25f1ed5c6a5543358bbcb559b76958c8047a2e7e5fe0072bc1f16401bcfa77b57651ff50dd665c6f28c302b37c98495eff397a56befead2e5ceffaace45f2ec200520258adb66df751e815e464656d869454e360d98cbc70f9c64fd4c", 16).toByteArray()); + x_string = "9cad2eca264380dd0b48e3b405e109c1be0615ee6ec92e7105eff5bc3a309fd9"; + expected_x = trim(new BigInteger(x_string, 16).toByteArray()); + assertEquals(new BigInteger(1, expected_x).toString(16), x_string); + B = "9ca2cd50b4c41047e4aa9e4fac9078ae21175e51e04a23877d6c2044765e39959e9a6a3ede99d08a556c196f51a2be12117681b1ef9d0b0498fb2fa4e88649ab9403e743504e3aaefbce8c5cb474eef8f4724ccd076fd33857de510d8509b67f166d986443bc262d776ec20985f617a7aa86e490290ce5d66332c8b45742a527"; + expected_M1 = trim(new BigInteger("7a2f768791abaeb954eb7f001bb60d91e6f61e959c8fcdefb58de857af9edaac", 16).toByteArray()); + expected_M2 = trim(new BigInteger("d78da7e0a23c9b87a2f09cdee05c510c105b4a8d471b47402c38f4cdfa49fe6d", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 9: username and password *was* failing in localhost testProviderAPI*/ + username = "oo"; + password = "password"; + a = "1322ec50"; + salt = "a93c74934dcadd90"; + expected_A = trim(new BigInteger("c8e9f30a2f67977ee7e61e9ca5af8bd854b6cc98fe01dbe1b1a4cf002c1e2523b7e49f373a600ff85a84867817ec60fec532857812a07f5c6189f6172f133023af75ca4cb98b758bb84620d0aa3cfc74dc69e0507114c0aeab5a75c3ae3f07a919c5729420f03266c26ed41d1846e07de023ec68dd6830e9ebf129cf51abb571", 16).toByteArray()); + x_string = "20470538560c4beb4908e6bfe5b0e00da94223e361302a25c898cbdd3724020"; + expected_x = trim(new BigInteger(x_string, 16).toByteArray()); + assertEquals(new BigInteger(1, expected_x).toString(16), x_string); + B = "24f98ede155212bea8b1d8bacf8153735ee8114faa824c57c84df55f8d6072ab87f5ae885ce1062939dbaa68ca6e63147c1d2dc1f751e8be20d8a6f87287a2a83fcb1dc9b85dd406d438aeee5ccbc873603cb399627e26e6444e94b3d5d26764e866776c8960fe206bd33febeca9f55f6291dd2cb832eab69e5373f548adeefb"; + expected_M1 = trim(new BigInteger("1b35c705e563bd5239cdccc6627aa877c3023286f49b4b7c21341d2949ca2d15", 16).toByteArray()); + expected_M2 = trim(new BigInteger("a382025452bad8a6ccd0f703253fda90e7ea7bd0c2d466a389455080a4bd015d", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 10: derived from test 11, discovered that password bytes should be in ISO-8859-1*/ + username = "nostradamus"; + password = "$[[//jjiilajfewahug43a89y¿"; + a = "800f0819"; + salt = "cfb9ae3ec5433076"; + expected_A = trim(new BigInteger("2ab09ee2fa01058f2f72fd2142b129f2ec26313801052889bcc4af57ee2e4d5b92c90cdfd6ecd660e82c635b2a091ba1b164e5b371c911ce0c4e69686baa120c58e2e0af84b2adc10da6cdfb0b579a1685032c57fd6ed1306d9713a562eddf5c833725042e825fa1abc7017f74760cb53d8c755ffe628c510022c296d1cd3584", 16).toByteArray()); + x_string = "9736a5e386a18f35bb08cac0f7c70bdbe120f2efe019874d0eb23b85b1955858"; + expected_x = trim(new BigInteger(x_string, 16).toByteArray()); + assertEquals(new BigInteger(1, expected_x).toString(16), x_string); + B = "2d19fe17dca1bda01044a0f406547895c32a10df2b0e69676de911273a8685d294763c4d16b3663f722b8980126e2c659efd33ffc6435a9594a2539e726c48e365893b3374670bd1958c13f55c2defa8ea9c0f9ba1345a5dca0e78debba434c8b755353d066d42bc5dfe0403fdcacfe5efd25c685f883ee6766c710b775c50f2"; + expected_M1 = trim(new BigInteger("a33feada1771c6f53e9343f5b9e69d51d4f15043c95fb663b6dd5b1c7af6f66b", 16).toByteArray()); + expected_M2 = trim(new BigInteger("9e99f9adfbfaa7add3626ed6e6aea94c9fa60dab6b8d56ad0cc950548f577d32", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + + /* Test 11: username and password failing in localhost testProviderAPI*/ + username = "nostradamus"; + password = "$[['//\"jjiilajfewahug43a89y¿"; + a = "5bfbc968"; + salt = "1bcae1065951bbf5"; + expected_A = trim(new BigInteger("7a74c254d46dd6010a7090e574817a03f32ba13f98ed3c695d96f09c9d334e591771541400e68b6d27a19e734baccf3965ca79c0294ffbf553716b41fbca627c7cd3ea4a0d1c640c22411881696f59ad7ed8ce6ef7010e43f57fb3858aa4c3479dd41e4073afadb6a516c41f649b8cf30dea6366efa711c5106c83ea71b00da4", 16).toByteArray()); + x_string = "9834210874c883db35785ee6648079e13d22450c472d6469192ea775ff50c646"; + expected_x = trim(new BigInteger(x_string, 16).toByteArray()); + assertEquals(new BigInteger(1, expected_x).toString(16), x_string); + B = "285b00c034da5676dd8938ce6a7b717968fef2e5f479ecca6d95828a6ce809dd37893752c956245b5d13315987c50e57cc68aa4f770ff9ce977ddfd65052f278b90545286cf32b3d18307140514e0fe2269fc0437fb16104358f6fa127dc97281a017582759644862d736f48025f2b35cb1662067c11f2fcf0753e2f72c9e028"; + expected_M1 = trim(new BigInteger("fedbaff9d9a19efc4eea949b045297a6a3121cf371e2acdda85a2a1ca61c929d", 16).toByteArray()); + expected_M2 = trim(new BigInteger("ffccafa0febc1771a428082b30b7ce409856de4581c7d7d986f5b80015aba0d3", 16).toByteArray()); + + a_byte = new BigInteger(a, 16).toByteArray(); + client = new LeapSRPSession(username, password, a_byte); + + x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray())); + assertTrue(Arrays.equals(x, expected_x)); + assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16)); + + A = client.exponential(); + assertTrue(Arrays.equals(A, expected_A)); + + M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray()); + + assertTrue(Arrays.equals(M1, expected_M1)); + + verified = client.verify(expected_M2); + assertTrue(verified); + } + + public void testSignUpMath() throws NoSuchAlgorithmException { + String username = "parmegvtest29"; + String password = "holahola2"; + byte[] salt = new BigInteger("67e8348d1500d26c", 16).toByteArray(); + + LeapSRPSession client = new LeapSRPSession(username, password); + + String expected_v = "12bea84e588ffa2f8fc5ae47cb5e751a8f2d9e8125268ad9ab483eff83f98cb08484350eb478bee582b8b72363ff8e7b12e9f332e86f7a0bd77689927c609d275471c6ad2cff8b1e7bbfc3664169c3b7bccb0b974154c1f1656b64274568015ca1b849c9d9890ae4437ed686341b432340809b81c30727ed2aadea8bdec6d101"; + + assertEquals(expected_v, client.calculateV(username, password, salt).toString(16)); + } + + public byte[] trim(byte[] in) { + if (in.length == 0 || in[0] != 0) + return in; + + int len = in.length; + int i = 1; + while (in[i] == 0 && i < len) + ++i; + byte[] ret = new byte[len - i]; + System.arraycopy(in, i, ret, 0, len - i); + return ret; + } + +} diff --git a/app/src/androidTest/legacy/TestProviderListActivity.java b/app/src/androidTest/legacy/TestProviderListActivity.java new file mode 100644 index 00000000..4ab705e7 --- /dev/null +++ b/app/src/androidTest/legacy/TestProviderListActivity.java @@ -0,0 +1,114 @@ +package se.leap.bitmaskclient.test; + +import android.test.ActivityInstrumentationTestCase2; +import android.widget.ListView; + +import com.robotium.solo.Solo; + +import java.io.IOException; + +import se.leap.bitmaskclient.ProviderListActivity; +import se.leap.bitmaskclient.R; + +public class TestProviderListActivity extends ActivityInstrumentationTestCase2 { + + private Solo solo; + + public TestProviderListActivity() { + super(ProviderListActivity.class); + } + + + @Override + protected void setUp() throws Exception { + super.setUp(); + solo = new Solo(getInstrumentation(), getActivity()); + Screenshot.initialize(solo); + } + + @Override + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + super.tearDown(); + } + + /** + * Tests should run independently from each other. We need a better approach to test the amount of providers added + */ + /*public void testListProviders() { + assertEquals(solo.getCurrentViews(ListView.class).size(), 1); + + assertEquals("Number of available providers differ", predefinedProviders() + added_providers, shownProviders()); + }*/ + + private int shownProviders() { + return solo.getCurrentViews(ListView.class).get(0).getCount(); + } + + private int predefinedProviders() { + int predefined_providers = 0; + try { + predefined_providers = solo.getCurrentActivity().getAssets().list("urls").length; + } catch (IOException e) { + e.printStackTrace(); + return predefined_providers; + } + + return predefined_providers; + } + + public void testSelectProvider() { + Screenshot.take("Initial CW"); + selectProvider("demo.bitmask.net"); + } + + private void selectProvider(String provider) { + solo.clickOnText(provider); + Screenshot.setTimeToSleep(1); + Screenshot.take("Configuring provider"); + waitForProviderDetails(); + } + + private void waitForProviderDetails() { + String text = solo.getString(R.string.provider_details_title); + assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); + Screenshot.take("Provider details"); + } + + public void testAddNewProvider() { + //addProvider("calyx.net"); + addProvider("riseup.net", true); + } + + public void testAddFalseProviderReturning404() { + //addProvider("calyx.net"); + addProvider("startpage.com", false); + } + + public void testAddFalseProviderReturning200() { + //addProvider("calyx.net"); + addProvider("test.com", false); + } + + private void addProvider(String url, boolean expectSuccess) { + + solo.clickOnActionBarItem(R.id.new_provider); + solo.enterText(0, url); + if ( BuildConfig.FLAVOR.equals("insecure")) { + solo.clickOnCheckBox(0); + } + solo.clickOnText(solo.getString(R.string.save)); + if (expectSuccess) { + waitForProviderDetails(); + } else { + waitForNoValidProviderError(); + } + solo.goBack(); + } + + private void waitForNoValidProviderError() { + String text = solo.getString(R.string.malformed_url); + assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000)); + } + +} diff --git a/app/src/androidTest/legacy/TestUserStatusFragment.java b/app/src/androidTest/legacy/TestUserStatusFragment.java new file mode 100644 index 00000000..d77b9796 --- /dev/null +++ b/app/src/androidTest/legacy/TestUserStatusFragment.java @@ -0,0 +1,34 @@ +package se.leap.bitmaskclient.test; + +public class TestUserStatusFragment extends BaseTestDashboardFragment { + + public final String TAG = TestUserStatusFragment.class.getName(); + + private final String provider = "demo.bitmask.net"; + private final String test_username = "parmegvtest1"; + private final String test_password = " S_Zw3'-"; + + @Override + protected void setUp() throws Exception { + super.setUp(); + changeProviderAndLogIn(provider); + user_status_controller.clickUserSessionButton(); + user_status_controller.assertLoggedOut(); + } + + public void testLogInAndOut() { + user_status_controller.clickUserSessionButton(); + Screenshot.take("Login dialog"); + user_status_controller.logIn(test_username, test_password); + Screenshot.setTimeToSleep(2); + Screenshot.takeWithSleep("Logging in"); + user_status_controller.logOut(); + } + + public void testFailedLogIn() { + user_status_controller.clickUserSessionButton(); + user_status_controller.logIn(test_username, TAG, false); + if(!user_status_controller.assertErrorLogInDialogAppears()) + throw new IllegalStateException(); + } +} diff --git a/app/src/androidTest/legacy/TestVpnCertificateValidator.java b/app/src/androidTest/legacy/TestVpnCertificateValidator.java new file mode 100644 index 00000000..70596c10 --- /dev/null +++ b/app/src/androidTest/legacy/TestVpnCertificateValidator.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2013, 2014, 2015 LEAP Encryption Access Project and contributers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package se.leap.bitmaskclient.test; + +import android.content.Context; +import android.test.InstrumentationTestCase; + +import org.json.JSONObject; + +import java.util.Calendar; + +import se.leap.bitmaskclient.Provider; +import se.leap.bitmaskclient.eip.VpnCertificateValidator; + +/** + * @author parmegv + * //FIXME: The class VpnCertificateValidator should be tested with unit tests! + */ +public class TestVpnCertificateValidator extends InstrumentationTestCase { + + String certificate_valid_from_nov2012_to_nov2022 = ""; + + Context context; + FromAssets assets; + + @Override + protected void setUp() throws Exception { + context = getInstrumentation().getContext(); + assets = new FromAssets(context); + JSONObject secrets = new JSONObject(assets.toString(TestConstants.SECRETS_FILE)); + certificate_valid_from_nov2012_to_nov2022 = secrets.getString(Provider.CA_CERT); + super.setUp(); + } + + + public void testIsValid() { + VpnCertificateValidator validator = new VpnCertificateValidator(certificate_valid_from_nov2012_to_nov2022); + Calendar calendar = Calendar.getInstance(); + + calendar.set(Calendar.YEAR, 2006); + calendar.set(Calendar.MONTH, Calendar.NOVEMBER); + calendar.set(Calendar.DAY_OF_MONTH, 6); calendar.set(Calendar.YEAR, 2006); + validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); + assertFalse(validator.isValid()); + + calendar.set(Calendar.YEAR, 2011); + calendar.set(Calendar.MONTH, Calendar.NOVEMBER); + calendar.set(Calendar.DAY_OF_MONTH, 6); + validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); + assertFalse(validator.isValid()); + + calendar.set(Calendar.YEAR, 2012); + calendar.set(Calendar.MONTH, Calendar.NOVEMBER); + calendar.set(Calendar.DAY_OF_MONTH, 7); + validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); + assertTrue(validator.isValid()); + + calendar.set(Calendar.YEAR, 2022); + calendar.set(Calendar.MONTH, Calendar.OCTOBER); + calendar.set(Calendar.DAY_OF_MONTH, 21); + validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); + assertTrue(validator.isValid()); + + calendar.set(Calendar.YEAR, 2022); + calendar.set(Calendar.MONTH, Calendar.OCTOBER); + calendar.set(Calendar.DAY_OF_MONTH, 23); + validator.setCalendarProvider(new TestCalendarProvider(calendar.getTimeInMillis())); + assertFalse(validator.isValid()); + + } + +} \ No newline at end of file diff --git a/app/src/androidTest/legacy/UserStatusTestController.java b/app/src/androidTest/legacy/UserStatusTestController.java new file mode 100644 index 00000000..3b0daf9a --- /dev/null +++ b/app/src/androidTest/legacy/UserStatusTestController.java @@ -0,0 +1,83 @@ +package se.leap.bitmaskclient.test; + +import android.view.*; + +import com.robotium.solo.*; + +import se.leap.bitmaskclient.R; + +import static junit.framework.Assert.assertTrue; + +public class UserStatusTestController { + private final Solo solo; + + public UserStatusTestController(Solo solo) { + this.solo = solo; + } + + void clickUserSessionButton() { + solo.clickOnView(getUserSessionButton()); + } + + View getUserSessionButton() throws IllegalStateException { + View view = solo.getView(R.id.user_status_button); + if(view == null) + throw new IllegalStateException(); + + return view; + } + + void logIn(String username, String password, boolean expectSuccess) { + solo.enterText(0, username); + solo.enterText(1, password); + // https://stackoverflow.com/questions/33560746/how-to-test-alertdialog-item-click-in-robotium-for-android-studio + solo.clickOnView(solo.getView(android.R.id.button1)); + assertTrue(solo.waitForDialogToClose()); + + if (expectSuccess) { + assertLoggedIn(); + } else { + solo.waitForText(solo.getString(R.string.cancel)); + assertTrue(solo.waitForText(solo.getString(R.string.login_button))); + } + } + + void logIn(String username, String password) { + logIn(username, password, true); + } + + private void assertLoggedIn() { + String log_out = solo.getString(R.string.logout_button); + assertTrue(solo.waitForText(log_out)); + } + + void assertLoggedOut() { + String log_in = solo.getString(R.string.login_button); + assertTrue(solo.waitForText(log_in)); + } + + void logOut() { + assertLoggedIn(); + clickUserSessionButton(); + + solo.clickOnActionBarItem(R.string.logout_button); + solo.waitForDialogToClose(); + assertLoggedOut(); + } + + boolean assertErrorLogInDialogAppears() { + assertTrue(solo.waitForDialogToOpen()); + + String username_hint = solo.getEditText(0).getHint().toString(); + String correct_username_hint = solo.getString(R.string.username_hint); + String password_hint = solo.getEditText(1).getHint().toString(); + String correct_password_hint = solo.getString(R.string.password_hint); + String user_message = solo.getText(0).toString(); + String riseup_user_message = solo.getString(R.string.login_riseup_warning); + + return username_hint.equalsIgnoreCase(correct_username_hint) + && password_hint.equalsIgnoreCase(correct_password_hint) + && !user_message.equalsIgnoreCase(riseup_user_message) + && !user_message.isEmpty(); + } +} diff --git a/app/src/androidTest/legacy/VpnTestController.java b/app/src/androidTest/legacy/VpnTestController.java new file mode 100644 index 00000000..4c6a6370 --- /dev/null +++ b/app/src/androidTest/legacy/VpnTestController.java @@ -0,0 +1,137 @@ +package se.leap.bitmaskclient.test; + +import android.view.View; +import android.widget.Button; + +import com.robotium.solo.Condition; +import com.robotium.solo.Solo; + +import de.blinkt.openvpn.activities.DisconnectVPN; +import mbanje.kurt.fabbutton.ProgressRingView; +import se.leap.bitmaskclient.Dashboard; +import se.leap.bitmaskclient.R; +import se.leap.bitmaskclient.userstatus.FabButton; + +import static junit.framework.Assert.assertTrue; + +public class VpnTestController { + + private final Solo solo; + + public VpnTestController(Solo solo) { + this.solo = solo; + } + + protected void turnVpnOnAndOff() { + clickVpnButton(); + turningEipOn(); + clickVpnButton(); + turningEipOff(); + } + + protected void clickVpnButton() throws IllegalStateException { + Button button = getVpnButton(); + if(!isVpnButton(button)) + throw new IllegalStateException(); + solo.clickOnButton(String.valueOf(button.getText())); + } + + protected Button getVpnButton() { + View button_view = solo.getView(R.id.vpn_main_button); + if (button_view != null) + return (Button) button_view; + else + return null; + } + + private boolean isVpnButton(Button button) { + return button != null && !button.getText().toString().isEmpty(); + } + + protected FabButton getVpnWholeIcon() { + assertTrue(solo.waitForActivity(Dashboard.class, 5 * 1000)); + + View view = solo.getView(R.id.vpn_status_image); + if (view != null) + return (FabButton) view; + else + return null; + } + + protected void turningEipOn() { + assertInProgress(); + int max_seconds_until_connected = 120; + + Condition condition = new Condition() { + @Override + public boolean isSatisfied() { + return iconShowsConnected(); + } + }; + assertTrue("condition iconShowsConnected not fulfilled within " + max_seconds_until_connected + " seconds." , solo.waitForCondition(condition, max_seconds_until_connected * 1000)); + sleepSeconds(2); + } + + private void assertInProgress() { + FabButton whole_icon = getVpnWholeIcon(); + ProgressRingView a; + a = whole_icon != null ? + (ProgressRingView) getVpnWholeIcon().findViewById(R.id.fabbutton_ring) : + new ProgressRingView(solo.getCurrentActivity()); + BaseTestDashboardFragment.isShownWithinConfinesOfVisibleScreen(a); + } + + private boolean iconShowsConnected() { + View vpnIconView = getVpnWholeIcon(); + return vpnIconView.getTag().equals(R.drawable.ic_stat_vpn); + } + + protected boolean iconShowsDisconnected() { + View vpnIconView = getVpnWholeIcon(); + return vpnIconView.getTag().equals(R.drawable.ic_stat_vpn_offline); + } + + protected void turningEipOff() { + okToBrowserWarning(); + int max_seconds_until_connected = 120; + + Condition condition = new Condition() { + @Override + public boolean isSatisfied() { + return iconShowsDisconnected(); + } + }; + assertTrue(solo.waitForCondition(condition, max_seconds_until_connected * 1000)); + sleepSeconds(2); + } + + private void okToBrowserWarning() { + assertTrue(solo.waitForDialogToOpen()); + clickYes(); + solo.waitForDialogToClose(); + } + + private void clickYes() { + String yes = solo.getString(android.R.string.yes); + solo.clickOnButton(yes); + } + + private void clickDisconnect() { + String disconnect = solo.getString(R.string.cancel_connection); + solo.clickOnButton(disconnect); + } + + @SuppressWarnings("unused") + private void sayOkToDisconnect() throws IllegalStateException { + boolean disconnect_vpn_appeared = solo.waitForActivity(DisconnectVPN.class); + if(disconnect_vpn_appeared){ + clickDisconnect(); + solo.waitForDialogToClose(); + } + else throw new IllegalStateException(); + } + + void sleepSeconds(int seconds) { + solo.sleep(seconds * 1000); + } +} -- cgit v1.2.3 From 5da1beaf403584f2824b3b6350a03e6640b6066d Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 1 Feb 2018 14:45:16 +0100 Subject: #8832 add missing resources for now --- .../ic_add_circle_outline_grey600_24dp.png | Bin 0 -> 624 bytes .../ic_add_circle_outline_white_24dp.png | Bin 0 -> 606 bytes .../res/drawable-hdpi/ic_archive_grey600_24dp.png | Bin 0 -> 353 bytes .../res/drawable-hdpi/ic_archive_white_24dp.png | Bin 0 -> 347 bytes .../drawable-hdpi/ic_content_copy_white_24dp.png | Bin 0 -> 287 bytes app/src/main/res/drawable-hdpi/ic_menu_archive.png | Bin 0 -> 1094 bytes .../res/drawable-hdpi/ic_menu_copy_holo_light.png | Bin 0 -> 199 bytes app/src/main/res/drawable-hdpi/ic_menu_log.png | Bin 0 -> 2891 bytes .../res/drawable-hdpi/ic_receipt_white_24dp.png | Bin 0 -> 261 bytes .../main/res/drawable-hdpi/ic_sort_white_24dp.png | Bin 0 -> 115 bytes .../res/drawable-hdpi/ic_warning_black_36dp.png | Bin 0 -> 549 bytes .../main/res/drawable-hdpi/vpn_item_settings.png | Bin 0 -> 773 bytes .../ic_add_circle_outline_grey600_24dp.png | Bin 0 -> 427 bytes .../ic_add_circle_outline_white_24dp.png | Bin 0 -> 409 bytes .../res/drawable-mdpi/ic_archive_grey600_24dp.png | Bin 0 -> 266 bytes .../res/drawable-mdpi/ic_archive_white_24dp.png | Bin 0 -> 264 bytes .../drawable-mdpi/ic_content_copy_white_24dp.png | Bin 0 -> 216 bytes app/src/main/res/drawable-mdpi/ic_menu_archive.png | Bin 0 -> 831 bytes .../res/drawable-mdpi/ic_menu_copy_holo_light.png | Bin 0 -> 161 bytes app/src/main/res/drawable-mdpi/ic_menu_log.png | Bin 0 -> 2860 bytes .../res/drawable-mdpi/ic_receipt_white_24dp.png | Bin 0 -> 194 bytes .../main/res/drawable-mdpi/ic_sort_white_24dp.png | Bin 0 -> 90 bytes .../res/drawable-mdpi/ic_warning_black_36dp.png | Bin 0 -> 432 bytes .../main/res/drawable-mdpi/vpn_item_settings.png | Bin 0 -> 653 bytes .../ic_add_circle_outline_grey600_24dp.png | Bin 0 -> 781 bytes .../ic_add_circle_outline_white_24dp.png | Bin 0 -> 775 bytes .../res/drawable-xhdpi/ic_archive_grey600_24dp.png | Bin 0 -> 372 bytes .../res/drawable-xhdpi/ic_archive_white_24dp.png | Bin 0 -> 362 bytes .../drawable-xhdpi/ic_content_copy_white_24dp.png | Bin 0 -> 330 bytes .../main/res/drawable-xhdpi/ic_menu_archive.png | Bin 0 -> 1398 bytes .../res/drawable-xhdpi/ic_menu_copy_holo_light.png | Bin 0 -> 252 bytes app/src/main/res/drawable-xhdpi/ic_menu_log.png | Bin 0 -> 2927 bytes .../res/drawable-xhdpi/ic_receipt_white_24dp.png | Bin 0 -> 240 bytes .../main/res/drawable-xhdpi/ic_sort_white_24dp.png | Bin 0 -> 101 bytes .../res/drawable-xhdpi/ic_warning_black_36dp.png | Bin 0 -> 655 bytes .../main/res/drawable-xhdpi/vpn_item_settings.png | Bin 0 -> 956 bytes .../ic_add_circle_outline_grey600_24dp.png | Bin 0 -> 1106 bytes .../ic_add_circle_outline_white_24dp.png | Bin 0 -> 1097 bytes .../drawable-xxhdpi/ic_archive_grey600_24dp.png | Bin 0 -> 529 bytes .../res/drawable-xxhdpi/ic_archive_white_24dp.png | Bin 0 -> 520 bytes .../drawable-xxhdpi/ic_content_copy_white_24dp.png | Bin 0 -> 436 bytes .../drawable-xxhdpi/ic_menu_copy_holo_light.png | Bin 0 -> 1279 bytes app/src/main/res/drawable-xxhdpi/ic_menu_log.png | Bin 0 -> 3069 bytes .../res/drawable-xxhdpi/ic_receipt_white_24dp.png | Bin 0 -> 292 bytes .../res/drawable-xxhdpi/ic_sort_white_24dp.png | Bin 0 -> 103 bytes .../res/drawable-xxhdpi/ic_warning_black_36dp.png | Bin 0 -> 873 bytes .../ic_add_circle_outline_grey600_24dp.png | Bin 0 -> 1508 bytes .../ic_add_circle_outline_white_24dp.png | Bin 0 -> 1634 bytes .../drawable-xxxhdpi/ic_archive_grey600_24dp.png | Bin 0 -> 773 bytes .../res/drawable-xxxhdpi/ic_archive_white_24dp.png | Bin 0 -> 763 bytes .../ic_content_copy_white_24dp.png | Bin 0 -> 522 bytes .../res/drawable-xxxhdpi/ic_receipt_white_24dp.png | Bin 0 -> 334 bytes .../res/drawable-xxxhdpi/ic_sort_white_24dp.png | Bin 0 -> 107 bytes .../res/drawable-xxxhdpi/ic_warning_black_36dp.png | Bin 0 -> 1033 bytes app/src/main/res/values-da/plurals-icsopenvpn.xml | 20 ++ app/src/main/res/values-da/strings-icsopenvpn.xml | 399 +++++++++++++++++++++ 56 files changed, 419 insertions(+) create mode 100644 app/src/main/res/drawable-hdpi/ic_add_circle_outline_grey600_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_add_circle_outline_white_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_archive_grey600_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_archive_white_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_content_copy_white_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_menu_archive.png create mode 100644 app/src/main/res/drawable-hdpi/ic_menu_copy_holo_light.png create mode 100644 app/src/main/res/drawable-hdpi/ic_menu_log.png create mode 100644 app/src/main/res/drawable-hdpi/ic_receipt_white_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_sort_white_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_warning_black_36dp.png create mode 100644 app/src/main/res/drawable-hdpi/vpn_item_settings.png create mode 100644 app/src/main/res/drawable-mdpi/ic_add_circle_outline_grey600_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_add_circle_outline_white_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_archive_grey600_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_archive_white_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_content_copy_white_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_menu_archive.png create mode 100644 app/src/main/res/drawable-mdpi/ic_menu_copy_holo_light.png create mode 100644 app/src/main/res/drawable-mdpi/ic_menu_log.png create mode 100644 app/src/main/res/drawable-mdpi/ic_receipt_white_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_sort_white_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_warning_black_36dp.png create mode 100644 app/src/main/res/drawable-mdpi/vpn_item_settings.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_add_circle_outline_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_add_circle_outline_white_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_archive_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_content_copy_white_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_menu_archive.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_menu_copy_holo_light.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_menu_log.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_receipt_white_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_sort_white_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_warning_black_36dp.png create mode 100644 app/src/main/res/drawable-xhdpi/vpn_item_settings.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_white_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_archive_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_content_copy_white_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_menu_copy_holo_light.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_menu_log.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_receipt_white_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_sort_white_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_warning_black_36dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_white_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_archive_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_content_copy_white_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_receipt_white_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_sort_white_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_warning_black_36dp.png create mode 100755 app/src/main/res/values-da/plurals-icsopenvpn.xml create mode 100755 app/src/main/res/values-da/strings-icsopenvpn.xml (limited to 'app/src') diff --git a/app/src/main/res/drawable-hdpi/ic_add_circle_outline_grey600_24dp.png b/app/src/main/res/drawable-hdpi/ic_add_circle_outline_grey600_24dp.png new file mode 100644 index 00000000..7e0a71cd Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_add_circle_outline_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_add_circle_outline_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_add_circle_outline_white_24dp.png new file mode 100644 index 00000000..d86d598e Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_add_circle_outline_white_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_archive_grey600_24dp.png b/app/src/main/res/drawable-hdpi/ic_archive_grey600_24dp.png new file mode 100644 index 00000000..2948d5fc Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_archive_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_archive_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_archive_white_24dp.png new file mode 100644 index 00000000..a9b0b240 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_archive_white_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_content_copy_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_content_copy_white_24dp.png new file mode 100644 index 00000000..03b1aac4 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_content_copy_white_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_menu_archive.png b/app/src/main/res/drawable-hdpi/ic_menu_archive.png new file mode 100644 index 00000000..e2d9bc1a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_menu_archive.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_menu_copy_holo_light.png b/app/src/main/res/drawable-hdpi/ic_menu_copy_holo_light.png new file mode 100644 index 00000000..0dd8865f Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_menu_copy_holo_light.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_menu_log.png b/app/src/main/res/drawable-hdpi/ic_menu_log.png new file mode 100644 index 00000000..474ec16e Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_menu_log.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_receipt_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_receipt_white_24dp.png new file mode 100644 index 00000000..bf781280 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_receipt_white_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_sort_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_sort_white_24dp.png new file mode 100644 index 00000000..55a429b6 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_sort_white_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_warning_black_36dp.png b/app/src/main/res/drawable-hdpi/ic_warning_black_36dp.png new file mode 100644 index 00000000..d1cef177 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_warning_black_36dp.png differ diff --git a/app/src/main/res/drawable-hdpi/vpn_item_settings.png b/app/src/main/res/drawable-hdpi/vpn_item_settings.png new file mode 100644 index 00000000..47b4ba23 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/vpn_item_settings.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_add_circle_outline_grey600_24dp.png b/app/src/main/res/drawable-mdpi/ic_add_circle_outline_grey600_24dp.png new file mode 100644 index 00000000..b5017d2a Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_add_circle_outline_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_add_circle_outline_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_add_circle_outline_white_24dp.png new file mode 100644 index 00000000..6a1c32aa Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_add_circle_outline_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_archive_grey600_24dp.png b/app/src/main/res/drawable-mdpi/ic_archive_grey600_24dp.png new file mode 100644 index 00000000..a42d774c Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_archive_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_archive_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_archive_white_24dp.png new file mode 100644 index 00000000..8e4a0426 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_archive_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_content_copy_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_content_copy_white_24dp.png new file mode 100644 index 00000000..6aa238c5 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_content_copy_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_menu_archive.png b/app/src/main/res/drawable-mdpi/ic_menu_archive.png new file mode 100644 index 00000000..49ac569d Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_menu_archive.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_menu_copy_holo_light.png b/app/src/main/res/drawable-mdpi/ic_menu_copy_holo_light.png new file mode 100644 index 00000000..74cb920f Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_menu_copy_holo_light.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_menu_log.png b/app/src/main/res/drawable-mdpi/ic_menu_log.png new file mode 100644 index 00000000..c8d60977 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_menu_log.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_receipt_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_receipt_white_24dp.png new file mode 100644 index 00000000..565c67ff Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_receipt_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_sort_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_sort_white_24dp.png new file mode 100644 index 00000000..3d84a444 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_sort_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_warning_black_36dp.png b/app/src/main/res/drawable-mdpi/ic_warning_black_36dp.png new file mode 100644 index 00000000..52273c3e Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_warning_black_36dp.png differ diff --git a/app/src/main/res/drawable-mdpi/vpn_item_settings.png b/app/src/main/res/drawable-mdpi/vpn_item_settings.png new file mode 100644 index 00000000..79281042 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/vpn_item_settings.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_grey600_24dp.png b/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_grey600_24dp.png new file mode 100644 index 00000000..b9a106fd Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_white_24dp.png new file mode 100644 index 00000000..0399d60a Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_archive_grey600_24dp.png b/app/src/main/res/drawable-xhdpi/ic_archive_grey600_24dp.png new file mode 100644 index 00000000..6725175d Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_archive_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png new file mode 100644 index 00000000..08228d1f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_content_copy_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_content_copy_white_24dp.png new file mode 100644 index 00000000..04a0cc94 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_content_copy_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_menu_archive.png b/app/src/main/res/drawable-xhdpi/ic_menu_archive.png new file mode 100644 index 00000000..b1be9d5b Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_menu_archive.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_menu_copy_holo_light.png b/app/src/main/res/drawable-xhdpi/ic_menu_copy_holo_light.png new file mode 100644 index 00000000..364b1692 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_menu_copy_holo_light.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_menu_log.png b/app/src/main/res/drawable-xhdpi/ic_menu_log.png new file mode 100644 index 00000000..29c1faed Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_menu_log.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_receipt_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_receipt_white_24dp.png new file mode 100644 index 00000000..66dafa4f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_receipt_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_sort_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_sort_white_24dp.png new file mode 100644 index 00000000..6d4af1bc Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_sort_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_warning_black_36dp.png b/app/src/main/res/drawable-xhdpi/ic_warning_black_36dp.png new file mode 100644 index 00000000..e1d6f7ac Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_warning_black_36dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/vpn_item_settings.png b/app/src/main/res/drawable-xhdpi/vpn_item_settings.png new file mode 100644 index 00000000..a057db8b Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/vpn_item_settings.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_grey600_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_grey600_24dp.png new file mode 100644 index 00000000..d13b5195 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_white_24dp.png new file mode 100644 index 00000000..7ae1b4a1 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_archive_grey600_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_archive_grey600_24dp.png new file mode 100644 index 00000000..25cfc91a Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_archive_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png new file mode 100644 index 00000000..aa186ce5 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_content_copy_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_content_copy_white_24dp.png new file mode 100644 index 00000000..5fc17a4d Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_content_copy_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_menu_copy_holo_light.png b/app/src/main/res/drawable-xxhdpi/ic_menu_copy_holo_light.png new file mode 100644 index 00000000..91043c9d Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_menu_copy_holo_light.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_menu_log.png b/app/src/main/res/drawable-xxhdpi/ic_menu_log.png new file mode 100644 index 00000000..d91c632b Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_menu_log.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_receipt_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_receipt_white_24dp.png new file mode 100644 index 00000000..2161c9a5 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_receipt_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_sort_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_sort_white_24dp.png new file mode 100644 index 00000000..b8ef1050 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_sort_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_warning_black_36dp.png b/app/src/main/res/drawable-xxhdpi/ic_warning_black_36dp.png new file mode 100644 index 00000000..2aab2278 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_warning_black_36dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_grey600_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_grey600_24dp.png new file mode 100644 index 00000000..ae11fb25 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_white_24dp.png new file mode 100644 index 00000000..1d436703 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_archive_grey600_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_archive_grey600_24dp.png new file mode 100644 index 00000000..58d38997 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_archive_grey600_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png new file mode 100644 index 00000000..9d538ff4 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_content_copy_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_content_copy_white_24dp.png new file mode 100644 index 00000000..557c64f7 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_content_copy_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_receipt_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_receipt_white_24dp.png new file mode 100644 index 00000000..8cac119c Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_receipt_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_sort_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_sort_white_24dp.png new file mode 100644 index 00000000..4796c33b Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_sort_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_warning_black_36dp.png b/app/src/main/res/drawable-xxxhdpi/ic_warning_black_36dp.png new file mode 100644 index 00000000..58999574 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_warning_black_36dp.png differ diff --git a/app/src/main/res/values-da/plurals-icsopenvpn.xml b/app/src/main/res/values-da/plurals-icsopenvpn.xml new file mode 100755 index 00000000..3fb9d049 --- /dev/null +++ b/app/src/main/res/values-da/plurals-icsopenvpn.xml @@ -0,0 +1,20 @@ + + + + + En måned tilbage + %d måneder tilbage + + + En dag tilbage + %d dage tilbage + + + En time tilbage + %d timer tilbage + + + Et minut tilbage + %d minutter tilbage + + diff --git a/app/src/main/res/values-da/strings-icsopenvpn.xml b/app/src/main/res/values-da/strings-icsopenvpn.xml new file mode 100755 index 00000000..2635c79e --- /dev/null +++ b/app/src/main/res/values-da/strings-icsopenvpn.xml @@ -0,0 +1,399 @@ + + + + + + Server Adresse: + Server Port: + Placering + Kan ikke læse mappen + Vælg + Annuller + Ingen data + LZO komprimering + Intet certifikat + Klientcertifikat + Klientcertifikat nøgle + PKCS12 fil + CA Certifikat + Du skal vælge et certifikat + Kildekode og fejl tracker findes på http://code.google.com/p/ics-openvpn/ + Dette program bruger følgende komponenter: se kildekoden for alle detaljer om licenserne + Om + Profiler + Type + PKCS12 kodeord + Vælg… + Du skal vælge en fil + Brug TLS-godkendelse + TLS retning + Indtast IPv6-adresse /netmaske i CIDR format (fx 2000:dd::23/64) + Indtast IPv4-adresse/netmaske i CIDR format (f.eks 1.2.3.4/24) + IPv4-adresse + IPv6 adresse + Angiv brugerdefinerede OpenVPN indstillinger. Benyt med forsigtighed. Bemærk også, at mange af tun relateret OpenVPN indstillinger ikke kan understøttes af VPNSettings. Hvis du syntes en vigtig indstilling mangler, så kontakt os + Brugernavn + Kodeord + For statisk konfiguration vil TLS autentifikations nøglerne blive brugt som statiske nøgler + Konfigurer VPN + Tilføj profil + Indtast et navn, der identificerer den nye profil + Indtast venligst et unikt profilnavn + Profilnavn + Du skal vælge et bruger certifikat + Du skal vælge et CA-certifikat + Ingen fejl fundet + Fejl ved konfiguration + Fejl ved tolkning af IPv4-adresse + Fejl med den brugerdefinerede rute + (efterlad tomt for forespørgsel efter efterspørgsel) + OpenVPN genvej + Opretter forbindelse til VPN… + Profil angivet i genvejen ikke fundet + Tilfældig værts præfiks + Tilføjer 6 tilfældige tegn foran værtsnavn + Aktiver brugerdefinerede indstillinger + Angiv brugerdefinerede indstillinger. Brug med omtanke! + Rute afvist af Android + Afbryd + Afbryd VPN + ryd log + Annuller bekræftelse + Afbryd den tilsluttede VPN/annuller forbindelses forsøg? + Fjern VPN + Kontrollerer om serveren bruger et certifikat med TLS Server udvidelser (--remote-CERT-tls server) + Forvent TLS servercertifikat + Kontrollerer Remote Server Certificate Subject DN + Kontrol af Certifikat Værtsnavn + Angiv hvilket check der anvendes til at verificere det eksterne certifikat DN (e.g. C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de)\n\nAngiv den komplette DN eller RDN (f.eks. openvpn.blinkt.de) eller et RDN-præfiks til verificering.\n\nNår der anvendes RDN-præfiks vil \"Server\" matche \"Server-1\" og \"Server-2\"\n\nEfterlades feltet tomt vil RDN tjekkes mod serverens værtsnavn.\n\nFor flere detaljer, se OpenVPN 2.3.1+ manpage\'en under —verify-x509-name + Fjerncertifikat emne + Aktiverer TLS Key-godkendelse + TLS godkendelses fil + Anmoder IP-adresser, ruter og tidsindstillingerne fra serveren. + Ingen oplysninger anmodes fra serveren. Indstillinger skal angives nedenfor. + Pull-indstillinger + DNS + Tilsidesæt DNS-indstillinger fra Server + Brug dine egne DNS-servere + søgeDomæne + DNS-server, som skal anvendes. + DNS-server + Sekundær DNS-Server som bruges, hvis den normale DNS-serveren ikke kan nås. + Backup DNS-server + Ignorer skubbet ruter + Ignorer ruter modtaget fra serveren. + Omdiriger al trafik over VPN\'en + Brug standard Rute + Indtast brugerdefinerede ruter. Skriv kun destinationen i CIDR format. \"10.0.0.0/8 2002::/16\" vil dirigere netværkene 10.0.0.0/8 og 2002::/16 gennem VPN\'en. + Ruter der IKKE skal dirigeres gennem VPN\'en. Brug samme syntax som til de inkluderede ruter. + Brugerdefinerede ruter + Ekskluderede netværk + Log informationsniveau + Tillad bekræftede pakker fra alle IP\'er + Tillad flydende server + Brugerdefinerede indstillinger + Rediger VPN-indstillinger + Fjern VPN-profilen \'%s\'? + På nogle brugerdefinerede ICS images kan rettighederne til /dev/tun være forkerte, eller tun modulet kan mangle fuldstændigt. Til CM9 images kan du prøve \"fix ejerskab\" valgmuligheden under generelle indstillinger + Kunne ikke åbne tun grænsefladen + "Fejl: " + Tøm + Åbner tun grænseflade: + Lokal IPv4: %1$s/%2$d IPv6: %3$s MTU: %4$d + DNS-Server: %1$s, Domæne: %2$s + Ruter: %1$s %2$s + Ekskluderede ruter: %1$s %2$s + VpnService rute installeret: %1$s %2$s + Fik grænsfladeoplysninger %1$s og %2$s, antager at anden adresse er peer-adressen på fjernserveren. Bruger /32 netmask til lokal IP. Tilstanden givet af OpenVPN er \"%3$s\". + Kan ikke forstå %1$s og %2$s som IP rute med CIDR netmask, bruger /32 som netmask. + Rettede rute %1$s/%2$s til %3$s/%2$s + Kan ikke få adgang til Android Keychain Certifikater. Dette kan skyldes en firmware opdatering eller ved at gendanne en backup af app\'en/app indstillingerne. Rediger venligst VPN\'en og genvælg certifikatet under grund indstillinger for at gendanne rettighederne til at tilgå certifikatet. + %1$s %2$s + Send log fil + Send + ICS OpenVPN log fil + Kopierede logpost til udklipsholder + Tap-tilstand + Tap-tilstand er ikke muligt med ikke-root VPN API. Programmet kan derfor ikke tilbyde tap-understøttelse + Igen? Laver du sjov? Nej, tap-tilstand er virkelig ikke understøttet og det hjælper ikke at sende mig mails og spørge om det bliver understøttet. + En tredje gang? Man kunne faktisk skrive en tap-emulator baseret på tun der kunne tilføje layer2 information når den sender og fjerne layer2 information når det modtages. Men en sådan tap-emulator skulle også implementere ARP og muligvis en DHCP-klient. JEg kender ikke nogen der arbejder i denne retning. Kontakt mig hvis du vil begynde at programmere det. + OFTE STILLEDE SPØRGSMÅL + Kopiere logposter + For at kopiere en enkelt logpost skal du trykke og holde på logposten. For at kopiere/sende hele log\'en skal du bruge Send Log valgmuligheden. Brug hardware menu knappen hvis den ikke er vist i GUI\'en. + Genvej til start + Du kan placere en genvej til at starte OpenVPN på dit skrivebord. Afhængigt af dit homescreen-program skal du enten tilføje en genvej eller et widget. + Dit billede understøtter ikke VPNService API\'en, beklager :( + Kryptering + Angiv krypterings metode + Angiv krypteringsalgoritmen der skal bruges af OpenVPN. Efterlad tom for at anvende standard algoritmen. + Angiv autentificeringsdigest til brug af OpenVPN. Efterlad tom for at anvende standard digest. + Autentificering/kryptering + Stifinder + Indlejret fil + Fejl under importering af fil + Kunne ikke importere fil fra filsytemet + [[Data inline fil]] + Nægter at åbne tun-enhed uden IP-information + Importér profil fra ovpn fil + Importér + Kunne ikke læse profil fra import + Fejl under læsning af konfigurationsfil + tilføj profil + Kunne ikke finde fil %1$s nævnt under importen af konfigurationsfil + Importering af konfigurationsfil fra kilde %1$s + Din konfiguration havde nogle indstillingsmuligheder der ikke er knyttet til brugerinterface indstillinger. Disse indstillinger blev tilføjet som brugerdefinerede indstillingsmuligheder. De brugerdefinerede indstillinger er vist forneden: + Færdig med at læse konfigurationsfil. + Bind ikke til lokal adresse eller port + Ingen lokal binding + Importér konfigurationsfil + Sikkerhedsovervejelser + "Da OpenVPN er sikkerhedsfølsom er det på sin plads med nogle bemærkninger om sikkerhed. Al data på SD-kortet er usikkert af konstruktion. Alle apps kan læse fra det (f. eks. har denne app ikke behov for SD-kort rettigheder). Dette programs data kan kun læses af programmet selv. Ved at anvende Importér valgmuligheden til cacert/cert/key i fil dialogen bliver data\'en opbevaret i VPN-profilen. VPN-profilerne er kun tilgængelige for denne app. (Glem ikke at slette kopierne fra SD-kortet bagefter). Selvom de kun er tilgængelige for dette program er dataen stadig stadig ukrypteret. Ved at root\'e telefonen eller ved hjælp af andre exploits kan det være muligt at indhente dataen. Gemte passwords bliver også opbevaret ukrypteret. For pkcs12 filer er det særligt anbefalet at du importere dem til Android Keystore." + Importér + Fejl ved visning af certifikat-valg + Fik en undtagelse ved visning af Android 4.0+ certifikat valgsdialog. Dette burde ikke ske da det er en standardfunktion i Android 4.0+. Måske er din Android ROM\'s certifikatopbevaring i stykker + IPv4 + IPv6 + Venter på statusmeddelelse… + importeret profil + importeret profil %d + Ødelagt Image + <p>Official HTC-afbildning er kendte for at have et mærkelig routing-problem, som betyder, at trafikafvikling ikke sker gennem tunnelen (se også <a href=\"https://github.com/schwabe/ics-openvpn/issues/18\">Problem 18</a> i fejlsporingen.)</p><p>Ældre officielle SONY-afbildninger fra Xperia Arc S og Xperia Ray er blevet rapporteret for helt at mangle VPNService i afbildningen (se også <a href=\"https://github.com/schwabe/ics-openvpn/issues/29\">Problem 29</a> i fejlsporingen.)</p><p>På tilpassede afbildningsversioner kan tun-modulet mangle eller rettigheder for /dev/tun kan være forkerte. Visse CM9-afbildninger behøver aktivering af valgmuligheden \"Korrigér ejerskab\" under \"Enhedsspecifikke hacks\" .</p><p>Og vigtigst: Hvis din enhed har en ødelagt Android-afbildning, så rapportér venligst dette til din salgskanal. Jo flere personer, der rapporterer et problem til salgskanalen, jo større er chancen for, at problemet bliver rettet.</p> + PKCS12 fil-krypterings-nøgle + Private Key adgangskode + Adgangskode + fil ikon + TLS-autentificering/kryptering + Genereret konfiguration + Indstillinger + Forsøger at indstille ejeren af /dev/tun til system. Nogle CM9 images skal bruge dette for at få VPNService API\'en til at virke. Kræver root. + Ret ejerskab af /dev/tun + Vis den generede OpenVPN konfigurationsfil + Redigerer \"%s\" + Bygger konfiguration… + Hvis dette tilvalg slåes til vil det gennemtvinge en genopretning af forbindelsen hvis netværkstilstanden ændres (f.eks. WIFI til/fra mobildata) + Genopret forbindelse ved ændring i netværkstilstand + Netværks status: %s + CA certifikatet fåes som regel fra Android Keystore. Angiv et seperat certifikat hvis du certifikats-verificerings-fejl. + Vælg + Intet CA Certifikat fundet under søgning i Android keystore. Autentificering vil nok mislykkes. + Vis logvinduet ved tilslutning. Du kan altid komme til logvinduet fra notifikationen. + Vis logvindue + %10$s %9$s kører på %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) + Fejl under signering med Android keystore nøgle %1$s: %2$s + VPN forbindelses advarslen der fortæller dig at denne app kan aflytte al din internettrafik er pålagt af systemet for at undgå misbrug af VPNService API\'en.\nVPN-forbindelses-notifikationen (nøglesymbolet) er også pålagt af Android systemet for at signalere en aktiv VPN forbindelse. På nogle Images afspiller denne notifikation en lyd.\nAndroid introducerede system dialoger for din sikkerhed og sørgede for at de ikke kunne omgås. + Forbindelsesadvarsel og notifikationslyd + Dansk oversættelse af + IP og DNS + Grundlæggende + Routing + Tildæk OpenVPN indstillinger. Normalt ikke nødvendigt. + Avanceret + ICS OpenVPN konfiguration + Der anvendes ingen DNS server. Name resolution vil muligvis ikke fungere. Overvej at indstille brugerdefinerede DNS servere. Bemærk også at Android vil fortsætte med at anvende de proxy-indstillinger specificeret i din mobil/WI-FI forbindelse når der ikke er indstillet nogen DNS servere. + Kunne ikke tilføje DNS server \"%1$s\", afvist af systemet: %2$s + Kunne ikke indstille IP adresse \"%1$s\", afvist af systemet: %2$s + <>Skaf en funktionel konfiguration (testet den på din computer eller downloadet fra din udbyder/organisation)</p><p>Hvis det er en enkelt fil uden ekstra pem/pkcs12 filer kan du e-maile den til dig selv og åbne vedhæftningen. Hvis du har flere filer kan du putte dem på dit sd-kort.</p><p>Klik på e-mailvedhæftningen/Brug mappe ikonet i VPN-listen for at importere konfigurationsfilen</p><p>Hvis der kommer fejlmeddelelser om manglende filer kan du placere de manglende filer på dit sd-kort.</p><p>Klik på gem symbolet for at tilføje den importerede VPN til din VPN-liste</p><p>Forbind til VPN\'en ved at klikke på dens navn</p><p>Hvis der er fejl eller advarsler i loggen så prøv at forstå adverslerne/fejlene og prøv at fikse dem</p> + Hurtig start + Prøv at indlæse tun.ko kernel-modulet før du forsøger at forbinde. Kræver enheden er rootet. + Indlæs tun-modul + Importer pkcs12 fra konfigurationen til Android Keystore + Fejl under indlæsning af proxy-indstillinger: %s + Anvender proxy %1$s %2$d + Anvend system-proxy + Anvend systemets globale konfiguration til forbindelse af HTTP/HTTPS proxy\'er. + OpenVPN vil forbinde til den angivne VPN hvis den var aktiv under system opstart. Læs venligst forbindelses advarsel FAQ før du bruger demme valgmulighed på Android < 5.0. + Forbind ved opstart + Ignorer + Genstart + Konfigurationsændringer træder i kræft efter VPN\'en genstartes. (Gen)start VPN\'en nu? + Konfiguration ændret + Kunne ikke bestemme den sidst forbundne profil til redigering + Duplikerede notifikationer + Hvis Androids system hukommelse (RAM) er under pres, vil apps og tjenester der ikke bruges i øjeblikket blive fjernet fra den aktive hukommelse. Dette afbryder den igangværende VPN-forbindelse. For at sikre at forbindelsen/OpenVPN overlever, kører tjenesten med en højere prioritet. For at køre med en højere prioritet viser programmet en notifikation. Nøgle-ikons-notifikationen bliver vist af systemet som beskrevet i det sidste FAQ indlæg. Den tæller ikke som en notifikation med det formål at køre programmet med højere prioritet. + Ingen VPN-profil defineret. + Brug <img src=\"ic_menu_add\"/> ikonet for at tilføje en ny VPN + Brug <img src=\"ic_menu_archive\"/> ikonet for at importere en eksisterende (.ovpn eller .conf) profil fra dit SD-kort. + Sørg for også at læse FAQ\'en. Der er en hurtig-start-guide. + Routing/interface konfiguration + Routing og interface konfigurationen bliver ikke gjort ved hjælp af traditionel ifconfig/route kommandoer, men ved hjælp af VPNService API\'en. Dette resulterer i en anderledes routing konfiguration end i andre styresystemer.\nKonfigurationen af VPN-forbindelsen består af IP-adressen og netværkerne der skal routes gennem interfacet. Specielt er peer partner adresser eller gateway adresser nødvendige. Særlige ruter til at nå VPN-serveren (for eksempel tilføjet når der anvendes redirect-gateway) er heller ikke nødvendige. Programmet vil konsekvent ignorere disse indstillinger når det importere en konfiguration. App\'en sikre ved hjælp af VPNService API\'en at forbindelsen til serveren ikke bliver routet gennem VPN-forbindelsen.\nVPNService API\'en tillader ikke at specificere netværk der ikke skal routes gennem VPN\'en. For at arbejde sig udenom denne begrænsning prøver denne app at finde netværk der ikke skal routes gennem forbindelsen (f.eks. route x.x.x.x y.y.y.y net_gateway) and udregner et sæt ruter der ekskludere disse ruter for at efterligne adfæren på andre platforme. Logvinduet viser konfigurationen af VPNService ved etablering af en forbindelse.\nBag kulissen: Android 4.4+ bruger policy routing. Anvendes route/ifconfig vil det ikke vise de installerede ruter. Brug i stedet IP-reglen, iptables -t mangle -L + Fald ikke tilbage på VPN-løs forbindelse når OpenVPN genforbinder. + Vedvarende tun + OpenVPN log + Importér OpenVPN konfiguration + Batteriforbrug + I mine personlige tests er hovedårsagen til OpenVPNs høje batteriforbrug keepalive-pakker. De fleste OpenVPN-servere har en konfigurationsregel såsom \'keepalive 10 60\', som får klienten og serveren til at udveksle keepalive-pakker hvert tiende sekund. <p> Selvom disse pakker er små og ikke udgør megen trafik, holder de mobilradioenetværk beskæftiget og øger dermed strømforbruget (se evt. <a href=\"http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\"> Radio State Machine | Android Developers</a>) <p>. Denne keepalive-indstilling kan ikke ændres på klienten, men kun systemadministratoren for OpenVPN kan ændre denne. <p> Ved at benytte et keepalive-niveau længere end 60 sekunder med UDP kan visse NAT-gateways droppe forbindelsen grundet en inaktivitets-timeout. Brug af TCP med en høj keepalive-tid fungerer, men tunnelering af TCP over TCP udviser en ekstrem ringe ydelse på forbindelser med højt pakketab (se <a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">Why TCP over TCP is a bad idea</a>). + Funktionen Android Tethering (via Wi.Fi, USB eller Bluetooth) og VPN-tjeneste-API\'et (som benyttes af denne app) fungerer ikke sammen. For yderligere oplysninger, se venligst <a href=\"https://github.com/schwabe/ics-openvpn/issues/34\">problem #34</a> + VPN og Tethering + Forbindelses-forsøg + Gentilslutningindstillinger + Antal sekunder at vente mellem forbindelsesforsøg. + Sekunder mellem forbindelser + OpenVPN gik uventet ned. Overvej venligst at benytte muligheden Send Minidump i hovedmenuen + Send Minidump til udvikler + Sender fejlsøgningsinfo om seneste nedbrud til udvikler + OpenVPN - %s + %1$s - %2$s + %1$s - %3$s, %2$s + Tilslutning + Afventer serversvar + Godkender + Henter klientkonfiguration + Tildele IP-adresser + Tilføjer ruter + Tilsluttet + Afbryd + Gentilslutter + Afslutter + Kører ikke + Opløser værtsnavne + Tilslutter (TCP) + Godkendelse mislykkedes + Afventer anvendeligt netværk + ↓%2$s %1$s - ↑%4$s %3$s + Ikke tilsluttet + Forbinder til VPN %s + Forbinder til VPN %s + Nogle versioner af Android 4.1 har problemer, hvis navnet på keystore-certifikatet indeholder ikke-alfanumeriske tegn (som mellemrum, understregninger eller bindestreger). Prøv at genimportere certifikatet uden specialtegn + Krypteringsstreng + Pakkegodkendelse + Angiv pakkegodkendelsesmetode + bygget af %s + fejlfindingskompilering + officiel kompilering + Kopiér til profil + Nedbruds-dump + Tilføj + Send opsætningsfil + Komplet DN + Din importerede konfiguration benytter den gamle DEPRECATED TLS-remote funktion, der benytter et andet DN-format. + RDN (almindeligt navn) + RDN-præfiks + TLS-REMOTE (forældet) + Du kan hjælpe med at oversætte ved at gå ind på http://crowdin.net/project/ics-openvpn/invite + %1$s forsøger at styre %2$s + Ved at fortsætte giver du programmet rettighed til at tage komplet kontrol over OpenVPN til Android og til at opsnappe al netværkstrafik.Accepter IKKE medmindre du har tillid til programmet. Ellers løber du risikoen for at få din data kompromiteret af ondsindet software. + Jeg har tillid til dette program. + Ingen app har lov til at anvende ekstern API + Tilladte apps: %s + Ryd liste over tilladte eksterne apps?\nNuværende liste over tilladte apps:\n\n%s + Paus VPN når skærmen er slukket og mindre end 64 kB data er blevet overført de sidste 60 sekunder. Når \"Vedvarende Tun\" indstillingen er slået til, vil din enhed ikke have forbindelse til netværket når VPN\'en er pauset. Uden \"Vedvarende Tun\" indstillingen til enheden ikke have nogen VPN forbindelse/beskyttelse. + Paus VPN-forbindelse efter skærmen slukkes + Pauser forbindelse i slukket-skræm tilstand: Mindre end %1$s på %2$ss + Advarsel: Vedvarende Tun er ikke slået til på denne VPN. Internettrafik vil anvende den normale internetforbindelse når skærmen er slukket. + Gem adgangskode + Paus VPN + Genoptag VPN + VPN pausning anmodet af bruger + VPN pauset - Skærmen er slukket + Enheds-specifikke hacks + Kan ikke vise certifikatsinformation + Program opførsel + VPN opførsel + Tillad ændringer til VPN-profiler + Hardware keystore: + En app prøver at bruge OpenVPN til Androids ikon + "Fra og med Android 4.3 er VPN-bekræftelsen beskyttet mod \"overlejrede apps\". Dette resulterer i, at dialogen ikke reagerer på berøringsinput. Har du en app, der benytter overlejring, kan det forårsage denne adfærd. Finder du en app, der overtrædende overlejringsbeskyttelsen, skal du kontakte app-udvikleren. Problemet påvirker alle VPN-apps på Android 4.3 og senere. Se også <a href=\"https://github.com/schwabe/ics-openvpn/issues/185\">Issue 185<a> for yderligere oplysninger" + VPN bekræftelses dialog + Alternativt kan du sende mig en donation med Play Butik: + Tak for donationen %s! + Log ryddet. + Vis adgangskode + KeyChain adgangsfejl: %s + Kort + ISO + Tidsstempler + Ingen + Upload + Download + VPN status + Indstillinger for visning + Ubehandlet undtagelse: %1$s\n\n%2$s + %3$s: %1$s\n\n%2$s + Hvis du har rootet din androidenhed kan du installere <a href=\"http://xposed.info/\">Xposed framework</a> og <a href=\"http://repo.xposed.info/module/de.blinkt.vpndialogxposed\">VPN Dialog confirm module</a> på din egen risiko + Fulde licenser + Netværk forbundet direkte til det lokale interface vil ikke blive dirigeret gennem VPN\'en. Fravælges denne indstilling vil alt trafik til lokale netværk dirigeres gennem VPN\'en. + Forbipasser VPN for lokale netværk + Brugernavn/password fil + [Importeret fra: %s] + Nogle filer kunne ikke findes. Vælg venligst filerne for at importere profilen: + For at anvende denne app skal du bruge en VPN udbydder/VPN gateway der understøtter OpenVPN (som regel givet af din arbejdsgiver). Tjek http://community.openvpn.net/ for yderligere information om OpenVPN og instruktioner til at opsætte din egen OpenVPN server. + Importér log: + VPN topologi \"%3$s\" specificeret, men ifconfig %1$s %2$s ligner mere en IP-adresse med en netværksmaske. Antager \"subnet\" topologi. + MSS override-værdien skal være et heltal mellem 0 og 9000 + MTU-tilsidesættelsesværdien skal være et helt tal mellem 64 og 9000 + Meddel TCP sessioner der kører gennem tunnelen at de skal begrænse deres sendte pakker så, efter at OpenVPN har indkapslet dem, de resulterende UDP-pakker OpenVPN sender til dets modtagere ikker bliver større end de valgte antal bytes. (standarden er 1450) + Tilsidesæt MSS-værdi af ​​TCP-nyttelast + Opsæt MSSfor TCP-dataindhold + Klientadfærd + Ryd tilladte eksterne apps + Indlæser… + Tilladte VPN-apps: %1$s + Ikke-tilladte VPN apps: %1$s + Pakken %s er ikke længere installeret, fjerner den fra app-listen Tilladte/Ikke-tilladte + VPN benyttes til alle apps, bortset fra de valgte + VPN benyttes kun til valgte apps + Fjern fjernserverangivelse? + Behold + Slet + Tilføj ny fjernserver + Benyt forbindelsesangivelser i tilfældig rækkefølge ved tilslutning + Mindst én fjernserver skal definere og aktiveres. + Serverliste + Tilladte apps + Avancerede Indstillinger + Dataindholdsmuligheder + TLS-indstillinger + Ingen fjernserver defineret + Duplicér VPN-profil + Dupliceringsprofilnavn: %s + Vis log + Der findes flere OpenVPN-klienter til Android. De mest almindelige er OpenVPN for Android (denne klient), OpenVPN Connect og OpenVPN Settings.<p>Klienterne kan placeres i to grupper: OpenVPN for Android og OpenVPN Connect bruger den officielle VPN-tjeneste API (Android 4.0+) og kræver ingen root, og OpenVPN Settings, der benytter root.<p>OpenVPN for Android, er en open source-klient udviklet af Arne Schwabe. Den er målrettet mere avancerede brugere og tilbyder mange indstillinger og muligheden for at importere profiler fra filer samt til at konfigurere/ændre profiler i selve i app\'en. Klienten er baseret på fællesskabsversionen af ​​OpenVPN. Den er baseret på OpenVPN 2.x-kildekoden. Denne klient kan ses som fællesskabets semi-officielle klient. <p>OpenVPN Connect er en ikke-open source-klient, der er udviklet af OpenVPN Technologies, Inc. Klienten er tildigtet generelt brug og mere målrettet den gennemsnitlige bruger og tillader import af OpenVPN-profiler. Denne klient er baseret på OpenVPN C ++ genimplementering af OpenVPN-protokollen (dette var påkrævet for at tillade OpenVPN Technologies, Inc at offentliggøre en iOS OpenVPN-app). Denne klient er den officielle klient for OpenVPN-teknologierne <p> OpenVPN Settings er den ældste af klienterne og også en brugerflade til open source OpenVPN. I modsætning til OpenVPN for Android kræver den root og benytter ikke VPN-tjeneste API. Dem afhænger ikke af Android 4.0+ + Forskelle mellem OpenVPN Android-klienter + Ignorerer multicast-rute: %s + Android understøtter kun CIDR-ruter til VPN. Da ikke-CIDR-ruter næsten aldrig benyttes, vil OpenVPN for Android benytte en /32 til ruter, som ikke er CIDR, og udstede en advarsel. + Tøjring fungerer, mens VPN\'en er aktiv. Den kablede forbindelse benytter IKKE VPN\'en. + Tidlige KitKat-versioner indstiller den forkerte MSS-værdi på TCP-forbindelser (#61948). Prøv at aktivere mssfix-indstillingen for at løse denne fejl. + Android vil fortsat bruge de proxyindstillinger, som er angivet til mobil/Wi-Fi-forbindelsen, når ingen DNS-servere er opsat. OpenVPN for Android vil advare dig om dette i loggen.

Når en VPN indstiller en DNS-server vil Android ikke benytte en proxy. Der er intet API indstilling af en proxy for en VPN-forbindelse.

+ VPN-apps stoppe muligvis med at fungere, hvis de afinstalleres og geninstalleres. Se #80074 for yderligere oplysninger + Den opsatte klient-IP og IP\'erne i netværksmasken bliver ikke sendt til VPN\'en. OpenVPN kompenserer for denne fejl ved udtrykkeligt at tilføje en rute, der korresponderer med klientens IP og dens netmaske + Åbning af en tun-enhed, mens en anden tun-enhed, der benyttes til vedvarende tun-understøttelse, er aktiv, medfører fejl i VPN-tjenesten på enheden. En genstart er nødvendig for at gøre VPN funktionel igen. OpenVPN for Android forsøger at undgå at genåbne tun-enheden, og hvis det virkelig er nødvendigt, lukkes først den nuværende TUN, inden den nye TUN-enhed åbnes for at undgå nedbrud. Dette kan medføre et kort interval, hvori pakker sendes over en ikke-VPN-forbindelse. Selv med denne løsning går VPN-tjenesten somme tider ned og kræver genstart af enheden. + VPN fungerer slet ikke for sekundære brugere. + "Flere brugere rapporterer, at mobilforbindelse/-dataforbindelse ofte droppes under brug af VPN-app\'en. Denne adfærd synes kun at påvirke visse kombinationer af mobiludbydere/enheder, og indtil nu har ingen årsag/løsning på fejlen kunnet identificeres." + Kun destinationer, der også kan nås uden VPN, kan nås via VPN. IPv6 VPN\'er virker slet ikke. + Ikke-CIDR-ruter + Proxy-adfærd for VPN\'er + Geninstallerer VPN-apps + %s og tidligere + Kopi af %s + Rute til den konfigurerede IP-adresse + Forkert MSS-værdi for VPN-forbindelse + Sekundære tabletbrugere + Angiv tilpassede tilslutningsspecifikke indstillinger. Brug med omtanke + Tilpassede indstillinger + Fjern forbindelsesindgang + Tilfældige afbrydelser fra mobiltnetværk + Eksterne netværk kan ikke nås + Fortsæt Tun tilstand + %s og senere + Forbindelser fejler SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure + Nyere OpenVPN for Android-versioner (0.6.29/marts 2015) benytter en mere sikker standard for de tilladte chiffer-pakker (tls-chiffer \"DEFAULT:! EXP:! PSK:! SRP:! KRSA\"). Uheldigvis afstedkommer udeladelse af de mindre sikre chiffer-pakker og eksportchiffer-pakker, især udeladelsen af ​​chiffer-pakker, som ikke understøtter Perfect Forward Secrecy (Diffie-Hellman), visse problemer. Dette skyldes normalt et velment, men dårligt udført, forsøg på at styrke TLS-sikkerhed ved at opsætte tls-chiffer på serveren eller nogle indlejrede operativsystemer med fjernet SSL (f.eks. MikroTik).\nFor at løse dette problem bør tls-cipher-indstillinger på serverensættes til en rimelig standard såsom tls-chiffer \"DEFAULT:! EXP:! PSK:! SRP:! kRSA\". For at løse problemet på klienten kan den tilpassede indstilling tls-chiffer DEFAULT tilføjes på Android-klienten. + Denne profil er tilføjet fra en ekstern app (%s) og er blevet markeret som ikke-bruger-redigerbar. + Liste over tilbagekaldte certifikater + Genstarter OpenVPN Service (App\'en crashede, den crashede sandsynligvis eller blev stoppet på grund a RAM overbelastning) + Import af konfigurationsfilen gav en fejl, kan ikke gemme + Søg + Ryd log ved ny forbindelse + Forbindelses-timeout + Ingen tilladt app tilføjet. Tilføjer selve appen (%s) for at have mindst én tilladt app, ellers vil alle apps være tilladte + OpenVPN til Android kan forsøge at finde de(n) manglende fil(er) automatisk på SD-kortet. Klik på denne besked for at starte rettighedsanmodningen. + Protokol + Aktiveret + VPN tilladelse tilbagekaldt af styresystemet (f.eks. kan et andet VPN program være startet), stopper VPN + %.0f B + %.1f kB + %.1f MB + %.1f GB +
-- cgit v1.2.3 From c89fd2f73f8a84f9ef7742e39476a9645e6d3863 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 1 Feb 2018 15:30:39 +0100 Subject: #8832 add all ics-openvpn code changes --- app/src/main/java/de/blinkt/openvpn/LaunchVPN.java | 24 +- .../main/java/de/blinkt/openvpn/VpnProfile.java | 117 ++++-- .../java/de/blinkt/openvpn/core/ConfigParser.java | 5 +- .../blinkt/openvpn/core/ICSOpenVPNApplication.java | 2 +- .../de/blinkt/openvpn/core/OpenVPNService.java | 49 ++- .../java/de/blinkt/openvpn/core/OpenVPNThread.java | 5 +- .../openvpn/core/OpenVpnManagementThread.java | 19 +- .../de/blinkt/openvpn/core/VPNLaunchHelper.java | 1 - .../de/blinkt/openvpn/fragments/LogFragment.java | 1 - app/src/main/res/layout-sw600dp/log_fragment.xml | 5 +- app/src/main/res/menu/logmenu.xml | 8 +- app/src/main/res/values-cs/plurals-icsopenvpn.xml | 23 +- app/src/main/res/values-cs/strings-icsopenvpn.xml | 69 ++++ app/src/main/res/values-de/plurals-icsopenvpn.xml | 2 +- app/src/main/res/values-de/strings-icsopenvpn.xml | 34 +- app/src/main/res/values-es/plurals-icsopenvpn.xml | 10 +- app/src/main/res/values-es/strings-icsopenvpn.xml | 48 +++ app/src/main/res/values-fr/strings-icsopenvpn.xml | 44 ++- app/src/main/res/values-hu/strings-icsopenvpn.xml | 58 ++- app/src/main/res/values-in/strings-icsopenvpn.xml | 89 ++++- app/src/main/res/values-it/plurals-icsopenvpn.xml | 19 +- app/src/main/res/values-it/strings-icsopenvpn.xml | 107 ++++- app/src/main/res/values-ko/plurals-icsopenvpn.xml | 15 +- app/src/main/res/values-ko/strings-icsopenvpn.xml | 430 +++++++++++++-------- app/src/main/res/values-nl/strings-icsopenvpn.xml | 56 +++ app/src/main/res/values-no/strings-icsopenvpn.xml | 40 ++ app/src/main/res/values-pl/plurals-icsopenvpn.xml | 8 +- app/src/main/res/values-pl/strings-icsopenvpn.xml | 25 ++ app/src/main/res/values-pt/plurals-icsopenvpn.xml | 19 +- app/src/main/res/values-pt/strings-icsopenvpn.xml | 16 + app/src/main/res/values-ro/strings-icsopenvpn.xml | 2 +- app/src/main/res/values-ru/plurals-icsopenvpn.xml | 8 +- app/src/main/res/values-ru/strings-icsopenvpn.xml | 14 +- app/src/main/res/values-tr/strings-icsopenvpn.xml | 21 +- app/src/main/res/values-uk/strings-icsopenvpn.xml | 33 +- app/src/main/res/values-v21/refs.xml | 10 +- app/src/main/res/values-vi/strings-icsopenvpn.xml | 23 ++ .../main/res/values-zh-rCN/plurals-icsopenvpn.xml | 15 +- .../main/res/values-zh-rCN/strings-icsopenvpn.xml | 206 ++++++++-- .../main/res/values-zh-rTW/strings-icsopenvpn.xml | 11 + app/src/main/res/values/refs.xml | 10 +- app/src/main/res/values/strings-icsopenvpn.xml | 26 +- .../de/blinkt/openvpn/core/OpenVPNThreadv3.java | 32 +- 43 files changed, 1372 insertions(+), 387 deletions(-) (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 0c3f20fb..4fff3071 100644 --- a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java +++ b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java @@ -5,47 +5,27 @@ package de.blinkt.openvpn; -import se.leap.bitmaskclient.R; - -import se.leap.bitmaskclient.R; - -import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.content.ActivityNotFoundException; -import android.content.ComponentName; -import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; -import android.content.ServiceConnection; import android.content.SharedPreferences; import android.net.VpnService; import android.os.Build; import android.os.Bundle; -import android.os.IBinder; -import android.os.RemoteException; -import android.preference.PreferenceManager; -import android.text.InputType; -import android.text.TextUtils; -import android.text.method.PasswordTransformationMethod; -import android.view.View; -import android.widget.CheckBox; -import android.widget.CompoundButton; -import android.widget.EditText; import java.io.IOException; import de.blinkt.openvpn.activities.LogWindow; import de.blinkt.openvpn.core.ConnectionStatus; -import de.blinkt.openvpn.core.IServiceStatus; -import de.blinkt.openvpn.core.OpenVPNStatusService; -import de.blinkt.openvpn.core.PasswordCache; import de.blinkt.openvpn.core.Preferences; import de.blinkt.openvpn.core.ProfileManager; import de.blinkt.openvpn.core.VPNLaunchHelper; import de.blinkt.openvpn.core.VpnStatus; +import se.leap.bitmaskclient.R; /** * This Activity actually handles two stages of a launcher shortcut's life cycle. @@ -134,7 +114,7 @@ public class LaunchVPN extends Activity { } @Override - protected void onActivityResult (int requestCode, int resultCode, Intent data) { + protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode==START_VPN_PROFILE) { diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index aa25da48..1d6f41cd 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -5,6 +5,8 @@ package de.blinkt.openvpn; +import de.blinkt.openvpn.core.Preferences; +import se.leap.bitmaskclient.BuildConfig; import se.leap.bitmaskclient.R; import android.annotation.SuppressLint; @@ -36,6 +38,8 @@ import java.lang.reflect.Method; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; +import java.security.Signature; +import java.security.SignatureException; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; @@ -182,7 +186,6 @@ public class VpnProfile implements Serializable, Cloneable { public boolean mUseUdp = true; - public VpnProfile(String name) { mUuid = UUID.randomUUID(); mName = name; @@ -282,30 +285,42 @@ public class VpnProfile implements Serializable, Cloneable { } + + public static boolean doUseOpenVPN3(Context c) { + SharedPreferences prefs = Preferences.getDefaultSharedPreferences(c); + boolean useOpenVPN3 = prefs.getBoolean("ovpn3", false); + if ("noovpn3".equals(BuildConfig.FLAVOR)) + useOpenVPN3 = false; + return useOpenVPN3; + } + public String getConfigFile(Context context, boolean configForOvpn3) { File cacheDir = context.getCacheDir(); String cfg = ""; - // Enable management interface - cfg += "# Enables connection to GUI\n"; - cfg += "management "; - - cfg += cacheDir.getAbsolutePath() + "/" + "mgmtsocket"; - cfg += " unix\n"; - cfg += "management-client\n"; - // Not needed, see updated man page in 2.3 - //cfg += "management-signal\n"; - cfg += "management-query-passwords\n"; - cfg += "management-hold\n\n"; - if (!configForOvpn3) { + // Enable management interface + cfg += "# Config for OpenVPN 2.x\n"; + cfg += "# Enables connection to GUI\n"; + cfg += "management "; + + cfg += cacheDir.getAbsolutePath() + "/" + "mgmtsocket"; + cfg += " unix\n"; + cfg += "management-client\n"; + // Not needed, see updated man page in 2.3 + //cfg += "management-signal\n"; + cfg += "management-query-passwords\n"; + cfg += "management-hold\n\n"; + cfg += String.format("setenv IV_GUI_VER %s \n", openVpnEscape(getVersionEnvString(context))); - String versionString = String.format(Locale.US, "%d %s %s %s %s %s", Build.VERSION.SDK_INT, Build.VERSION.RELEASE, - NativeUtils.getNativeAPI(), Build.BRAND, Build.BOARD, Build.MODEL); + String versionString = getPlatformVersionEnvString(); cfg += String.format("setenv IV_PLAT_VER %s\n", openVpnEscape(versionString)); + } else { + cfg += "# Config for OpeNVPN 3 C++\n"; } + cfg += "machine-readable-output\n"; cfg += "allow-recursive-routing\n"; @@ -418,8 +433,7 @@ public class VpnProfile implements Serializable, Cloneable { cfg += insertFileData("ca", mCaFilename); } - if (isUserPWAuth()) - { + if (isUserPWAuth()) { if (mAuthenticationType == AUTH_RETRY_NOINTERACT) cfg += "auth-retry nointeract"; } @@ -456,7 +470,7 @@ public class VpnProfile implements Serializable, Cloneable { if (!TextUtils.isEmpty(mIPv6Address)) { // Use our own ip as gateway since we ignore it anyway String fakegw = mIPv6Address.split("/", 2)[0]; - cfg += "ifconfig-ipv6 " + mIPv6Address + " " + fakegw +"\n"; + cfg += "ifconfig-ipv6 " + mIPv6Address + " " + fakegw + "\n"; } } @@ -490,16 +504,12 @@ public class VpnProfile implements Serializable, Cloneable { if (mOverrideDNS || !mUsePull) { if (!TextUtils.isEmpty(mDNS1)) { - if (mDNS1.contains(":")) - cfg += "dhcp-option DNS6 " + mDNS1 + "\n"; - else - cfg += "dhcp-option DNS " + mDNS1 + "\n"; - } if (!TextUtils.isEmpty(mDNS2)) { - if (mDNS2.contains(":")) - cfg += "dhcp-option DNS6 " + mDNS2 + "\n"; - else - cfg += "dhcp-option DNS " + mDNS2 + "\n"; - } if (!TextUtils.isEmpty(mSearchDomain)) + cfg += "dhcp-option DNS " + mDNS1 + "\n"; + } + if (!TextUtils.isEmpty(mDNS2)) { + cfg += "dhcp-option DNS " + mDNS2 + "\n"; + } + if (!TextUtils.isEmpty(mSearchDomain)) cfg += "dhcp-option DOMAIN " + mSearchDomain + "\n"; } @@ -511,9 +521,8 @@ public class VpnProfile implements Serializable, Cloneable { cfg += "mssfix\n"; } - if (mTunMtu >= 48 && mTunMtu != 1500) - { - cfg+= String.format(Locale.US, "tun-mtu %d\n", mTunMtu); + if (mTunMtu >= 48 && mTunMtu != 1500) { + cfg += String.format(Locale.US, "tun-mtu %d\n", mTunMtu); } if (mNobind) @@ -580,7 +589,7 @@ public class VpnProfile implements Serializable, Cloneable { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean usesystemproxy = prefs.getBoolean("usesystemproxy", true); - if (usesystemproxy && !mIsOpenVPN22) { + if (usesystemproxy && !mIsOpenVPN22 && !configForOvpn3) { cfg += "# Use system proxy setting\n"; cfg += "management-query-proxy\n"; } @@ -609,6 +618,11 @@ public class VpnProfile implements Serializable, Cloneable { return cfg; } + public String getPlatformVersionEnvString() { + return String.format(Locale.US, "%d %s %s %s %s %s", Build.VERSION.SDK_INT, Build.VERSION.RELEASE, + NativeUtils.getNativeAPI(), Build.BRAND, Build.BOARD, Build.MODEL); + } + public String getVersionEnvString(Context c) { String version = "unknown"; try { @@ -907,12 +921,12 @@ public class VpnProfile implements Serializable, Cloneable { if (mAuthenticationType == TYPE_KEYSTORE || mAuthenticationType == TYPE_USERPASS_KEYSTORE) { if (mAlias == null) return R.string.no_keystore_cert_selected; - } else if (mAuthenticationType == TYPE_CERTIFICATES || mAuthenticationType == TYPE_USERPASS_CERTIFICATES){ + } else if (mAuthenticationType == TYPE_CERTIFICATES || mAuthenticationType == TYPE_USERPASS_CERTIFICATES) { if (TextUtils.isEmpty(mCaFilename)) return R.string.no_ca_cert_selected; } - if (mCheckRemoteCN && mX509AuthType==X509_VERIFY_TLSREMOTE) + if (mCheckRemoteCN && mX509AuthType == X509_VERIFY_TLSREMOTE) return R.string.deprecated_tls_remote; if (!mUsePull || mAuthenticationType == TYPE_STATICKEYS) { @@ -948,6 +962,15 @@ public class VpnProfile implements Serializable, Cloneable { if (noRemoteEnabled) return R.string.remote_no_server_selected; + if (doUseOpenVPN3(context)) { + if (mAuthenticationType == TYPE_STATICKEYS) { + return R.string.openvpn3_nostatickeys; + } + if (mAuthenticationType == TYPE_PKCS12 || mAuthenticationType == TYPE_USERPASS_PKCS12) { + return R.string.openvpn3_pkcs12; + } + } + // Everything okay return R.string.no_error_found; @@ -1068,7 +1091,7 @@ public class VpnProfile implements Serializable, Cloneable { return mPrivateKey; } - public String getSignedData(String b64data) { + public String getSignedData(String b64data, boolean ecdsa) { PrivateKey privkey = getKeystoreKey(); byte[] data = Base64.decode(b64data, Base64.DEFAULT); @@ -1081,19 +1104,33 @@ public class VpnProfile implements Serializable, Cloneable { try { + @SuppressLint("GetInstance") + String keyalgorithm = privkey.getAlgorithm(); + + byte[] signed_bytes; + if (keyalgorithm.equals("EC")) { + Signature signer = Signature.getInstance("NONEwithECDSA"); + + signer.initSign(privkey); + signer.update(data); + signed_bytes = signer.sign(); + + } else { /* ECB is perfectly fine in this special case, since we are using it for the public/private part in the TLS exchange */ - @SuppressLint("GetInstance") - Cipher rsaSigner = Cipher.getInstance("RSA/ECB/PKCS1PADDING"); + Cipher signer; + signer = Cipher.getInstance("RSA/ECB/PKCS1PADDING"); + - rsaSigner.init(Cipher.ENCRYPT_MODE, privkey); + signer.init(Cipher.ENCRYPT_MODE, privkey); - byte[] signed_bytes = rsaSigner.doFinal(data); + signed_bytes = signer.doFinal(data); + } return Base64.encodeToString(signed_bytes, Base64.NO_WRAP); } catch (NoSuchAlgorithmException | InvalidKeyException | IllegalBlockSizeException - | BadPaddingException | NoSuchPaddingException e) { + | BadPaddingException | NoSuchPaddingException | SignatureException e) { VpnStatus.logError(R.string.error_rsa_sign, e.getClass().toString(), e.getLocalizedMessage()); return null; } 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 74afd61e..9889754d 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java @@ -261,6 +261,7 @@ public class ConfigParser { "group", "allow-recursive-routing", "ip-win32", + "ifconfig-nowarn", "management-hold", "management", "management-client", @@ -275,6 +276,7 @@ public class ConfigParser { "management-client-user", "management-client-group", "pause-exit", + "preresolve", "plugin", "machine-readable-output", "persist-key", @@ -300,7 +302,8 @@ public class ConfigParser { {"setenv", "IV_GUI_VER"}, {"setenv", "IV_OPENVPN_GUI_VERSION"}, {"engine", "dynamic"}, - {"setenv", "CLIENT_CERT"} + {"setenv", "CLIENT_CERT"}, + {"resolve-retry","60"} }; final String[] connectionOptions = { 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 e7019f42..38f51807 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java @@ -57,7 +57,7 @@ public class ICSOpenVPNApplication extends Application { name = getString(R.string.channel_name_status); mChannel = new NotificationChannel(OpenVPNService.NOTIFICATION_CHANNEL_NEWSTATUS_ID, - name, NotificationManager.IMPORTANCE_DEFAULT); + name, NotificationManager.IMPORTANCE_LOW); mChannel.setDescription(getString(R.string.channel_description_status)); mChannel.enableLights(true); 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 c15f659a..6c312c87 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -11,7 +11,6 @@ import android.app.Notification; import android.app.UiModeManager; import android.content.Intent; import android.content.IntentFilter; -import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.pm.ShortcutManager; import android.content.res.Configuration; @@ -43,7 +42,6 @@ import java.util.Vector; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.VpnStatus.ByteCountListener; import de.blinkt.openvpn.core.VpnStatus.StateListener; -import se.leap.bitmaskclient.BuildConfig; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.VpnNotificationManager; @@ -61,6 +59,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private static final String RESUME_VPN = "se.leap.bitmaskclient.RESUME_VPN"; public static final String NOTIFICATION_CHANNEL_BG_ID = "openvpn_bg"; public static final String NOTIFICATION_CHANNEL_NEWSTATUS_ID = "openvpn_newstat"; + public static final String VPNSERVICE_TUN = "vpnservice-tun"; private static boolean mNotificationAlwaysVisible = false; private final Vector mDnslist = new Vector<>(); @@ -76,7 +75,6 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private boolean mDisplayBytecount = false; private boolean mStarting = false; private long mConnecttime; - private boolean mOvpn3 = false; private OpenVPNManagement mManagement; private String mLastTunCfg; private String mRemoteGW; @@ -169,7 +167,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } // Similar to revoke but do not try to stop process - public void processDied() { + public void openvpnStopped() { endVpnService(); } @@ -291,6 +289,18 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac return START_REDELIVER_INTENT; } + /* TODO: check that for Bitmask */ + // Always show notification here to avoid problem with startForeground timeout + VpnStatus.logInfo(R.string.building_configration); + VpnStatus.updateStateString("VPN_GENERATE_CONFIG", "", R.string.building_configration, ConnectionStatus.LEVEL_START); + notificationManager.buildOpenVpnNotification( + mProfile != null ? mProfile.mName : "", + VpnStatus.getLastCleanLogMessage(this), + VpnStatus.getLastCleanLogMessage(this), + ConnectionStatus.LEVEL_START, + 0, + NOTIFICATION_CHANNEL_NEWSTATUS_ID); + if (intent != null && intent.hasExtra(getPackageName() + ".profileUUID")) { String profileUUID = intent.getStringExtra(getPackageName() + ".profileUUID"); int profileVersion = intent.getIntExtra(getPackageName() + ".profileVersion", 0); @@ -319,6 +329,12 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac mProfile.checkForRestart(this); } + if (mProfile == null) { + stopSelf(startId); + return START_NOT_STICKY; + } + + /* start the OpenVPN process itself in a background thread */ new Thread(new Runnable() { @Override @@ -343,6 +359,9 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } private void startOpenVPN() { + /** + * see change above (l. 292 ff) + */ VpnStatus.logInfo(R.string.building_configration); VpnStatus.updateStateString("VPN_GENERATE_CONFIG", "", R.string.building_configration, ConnectionStatus.LEVEL_START); @@ -369,14 +388,10 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac mStarting = false; // Start a new session by creating a new thread. - SharedPreferences prefs = Preferences.getDefaultSharedPreferences(this); - - mOvpn3 = prefs.getBoolean("ovpn3", false); - if (!"ovpn3".equals(BuildConfig.FLAVOR)) - mOvpn3 = false; + boolean useOpenVPN3 = VpnProfile.doUseOpenVPN3(this); // Open the Management Interface - if (!mOvpn3) { + if (!useOpenVPN3) { // start a Thread that handles incoming messages of the managment socket OpenVpnManagementThread ovpnManagementThread = new OpenVpnManagementThread(mProfile, this); if (ovpnManagementThread.openManagementInterface(this)) { @@ -392,15 +407,11 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } Runnable processThread; - if (mOvpn3) - + if (useOpenVPN3) { - OpenVPNManagement mOpenVPN3 = instantiateOpenVPN3Core(); processThread = (Runnable) mOpenVPN3; mManagement = mOpenVPN3; - - } else { processThread = new OpenVPNThread(this, argv, nativeLibraryDirectory); mOpenVPNThread = processThread; @@ -757,8 +768,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac /** * Route that is always included, used by the v3 core */ - public void addRoute(CIDRIP route) { - mRoutes.addIP(route, true); + public void addRoute(CIDRIP route, boolean include) { + mRoutes.addIP(route, include); } public void addRoute(String dest, String mask, String gateway, String device) { @@ -810,7 +821,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private boolean isAndroidTunDevice(String device) { return device != null && - (device.startsWith("tun") || "(null)".equals(device) || "vpnservice-tun".equals(device)); + (device.startsWith("tun") || "(null)".equals(device) || VPNSERVICE_TUN.equals(device)); } public void setMtu(int mtu) { @@ -859,7 +870,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac if (mLocalIP.len <= 31 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { CIDRIP interfaceRoute = new CIDRIP(mLocalIP.mIp, mLocalIP.len); interfaceRoute.normalise(); - addRoute(interfaceRoute); + addRoute(interfaceRoute ,true); } diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java index c96f88c4..b902f5d7 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java @@ -111,7 +111,8 @@ public class OpenVPNThread implements Runnable { } } - mService.processDied(); + if (!mNoProcessExitStatus) + mService.openvpnStopped(); Log.i(TAG, "Exiting"); } } @@ -177,7 +178,7 @@ public class OpenVPNThread implements Runnable { VpnStatus.logMessageOpenVPN(logStatus, logLevel, msg); if (logerror==1) - VpnStatus.logError("OpenSSL reproted a certificate with a weak hash, please the in app FAQ about weak hashes"); + VpnStatus.logError("OpenSSL reported a certificate with a weak hash, please the in app FAQ about weak hashes"); } else { VpnStatus.logInfo("P:" + logline); diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 492e8913..1124c5b7 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -260,7 +260,10 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { processLogMessage(argument); break; case "RSA_SIGN": - processSignCommand(argument); + processSignCommand(argument, false); + break; + case "ECDSA_SIGN": + processSignCommand(argument, true); break; default: VpnStatus.logWarning("MGMT: Got unrecognized command" + command); @@ -606,7 +609,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { if (mWaitingForRelease) releaseHold(); else if (samenetwork) - managmentCommand("network-change\n"); + managmentCommand("network-change samenetwork\n"); else managmentCommand("network-change\n"); } @@ -631,16 +634,20 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { releaseHold(); } - private void processSignCommand(String b64data) { + private void processSignCommand(String b64data, boolean ecdsa) { + + String signed_string = mProfile.getSignedData(b64data, ecdsa); + String signcmd = "rsa-sig\n"; + if (ecdsa) + signcmd = "ecdsa-sig\n"; - String signed_string = mProfile.getSignedData(b64data); if (signed_string == null) { - managmentCommand("rsa-sig\n"); + managmentCommand(signcmd); managmentCommand("\nEND\n"); stopOpenVPN(); return; } - managmentCommand("rsa-sig\n"); + managmentCommand(signcmd); managmentCommand(signed_string); managmentCommand("\nEND\n"); } 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 f3b40381..97a73964 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java +++ b/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java @@ -6,7 +6,6 @@ package de.blinkt.openvpn.core; import android.annotation.TargetApi; -import android.app.NotificationManager; import android.content.Context; import android.content.Intent; import android.os.Build; 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 a1fc7cdc..1a207a25 100644 --- a/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java +++ b/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java @@ -23,7 +23,6 @@ import android.os.Bundle; import android.os.Handler; import android.os.Handler.Callback; import android.os.Message; -import android.preference.Preference; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.text.SpannableString; diff --git a/app/src/main/res/layout-sw600dp/log_fragment.xml b/app/src/main/res/layout-sw600dp/log_fragment.xml index 26f63df4..089bfb9d 100644 --- a/app/src/main/res/layout-sw600dp/log_fragment.xml +++ b/app/src/main/res/layout-sw600dp/log_fragment.xml @@ -17,8 +17,9 @@ android:background="@drawable/white_rect" android:elevation="1dp" android:minWidth="300dp" + android:orientation="vertical" - android:layout_width="wrap_content" + android:layout_width="400dp" android:layout_height="match_parent"> @@ -27,6 +28,8 @@ - - + android:showAsAction="ifRoom" + android:title="@string/edit_vpn"/> + \ No newline at end of file diff --git a/app/src/main/res/values-cs/plurals-icsopenvpn.xml b/app/src/main/res/values-cs/plurals-icsopenvpn.xml index 70489fbc..be0f3cb1 100755 --- a/app/src/main/res/values-cs/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-cs/plurals-icsopenvpn.xml @@ -1,3 +1,24 @@ - + + + Zbývá jeden měsíc + Zbývají %d měsíce + Zbývá %d měsíců + + + Zbývá jeden den + Zbývají %d dny + Zbývá %d dnů + + + Zbývá jedna hodina + Zbývají %d hodiny + Zbývá %d hodin + + + Zbývá jedna minuta + Zbývají %d minuty + Zbývá %d minut + + diff --git a/app/src/main/res/values-cs/strings-icsopenvpn.xml b/app/src/main/res/values-cs/strings-icsopenvpn.xml index eb039901..40feea2c 100755 --- a/app/src/main/res/values-cs/strings-icsopenvpn.xml +++ b/app/src/main/res/values-cs/strings-icsopenvpn.xml @@ -44,12 +44,14 @@ Zadej prosím unikátní jméno profilu Jméno profilu Je třeba vybrat uživatelský certifikát + Je třeba vybrat certifikát Bez chyb Chyba v konfiguraci Chyba při zpracování IPv4 adresy Chyba při zpracování vlastního směrování (nechej prázdné pro dotazování, až bude potřeba) OpenVPN zkratka + Připojování k VPN… Profil zvolený ve zkratce nenalezen Náhodný prefix klienta Přidej 6 náhodných znaků před jméno klienta (hostname) @@ -163,6 +165,7 @@ Heslo k soukromému klíči Heslo ikona souboru + TLS autentizace/šifrování Vygenerované nastavení Nastavení Pokusit se nastavit vlastníka /dev/tun zařízení. Na některých systémech s CM9 je toto potřeba pro zprovoznění VPNService API. Vyžaduje root zařízení. @@ -178,6 +181,7 @@ Žádný CA certifikát nebyl získán z úložiště, autentikace pravděpodobně selže. Zobrazit okno s logem při připojování. okno lze vždy otevřít z notifikace. Zobrazit okno s logem + %10$s %9$s spuštěno na %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) Chyba při podepisování klíčem %1$s: %2$s VPN varování při připojování oznamující o možnosti přesměrování veškerého provozu je vynuceno systémem, aby se zabránilo zneužití VPNService API.\nNotifikace (symbol s klíčem) je také vynucena systémem, aby signalizovala odchozí VPN spojení. Na některých systémech přehrává notifikace i zvuk.\nAndroid zavedl tyto dialogy pro tvoji osobní bezpečnost a ujistil se, že nejdou obejít. (Někdu to bohužel zahrnuje i zvuk notifikace.) Varování při připojení a zvuková notifikace @@ -200,6 +204,8 @@ Používám proxy %1$s %2$d Použít systémovou proxy K připojení použít systémové nastavení pro HTTP/HTTPS. + OpenVPN se automaticky připojí k vybrané VPN po startu systému. Prosím věnujte pozornost upozornění ve FAQ pro verzi Android < 5.0. + Připojit po spuštění systému Ignorovat Restartovat Změna nastavení začne platit až po restartu VPN. Restartovat teď? @@ -246,6 +252,7 @@ Připojuji (TCP) Přihlášení nebylo úspěšné Čekání na použitelnou síť + ↓%2$s %1$s - ↑%4$s %3$s Nepřipojeno Připojování k VPN %s Připojování k VPN %s @@ -316,6 +323,7 @@ Import logu: Vpn topologie \"%3$s\" soecifikována, ale ifconfig %1$s %2$s vypadá spíše jako IP adresa se síťovou maskou. Předpokládám \"podsíťovou\" topologii. mssfix hodnota musí být celé číslo mezi 0 a 9000 + MTU hodnota musí být celé číslo mezi 64 a 9000 Oznámit TCP sezením běžícím skrze tunel, že mají limitovat velikost odesílaných paketů tak, aby poté, co je OpenVPN zabalí, byla výsledná velikost UDP paketu, které OpenVPN posílá menší než tento počet bytů. (výchozí je 1450) Přepsat hodnotu MSS pro TCP obsah Nastavit MSS pro TCP obsah @@ -347,6 +355,7 @@ 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. + Aplikace VPN mohou přestat fungovat po odinstalování a reinstalaci. Podrobnosti najdete v #80074 VPN vůbec nefunguje pro vedlejší uživatele. Ne-CIDR trasy Proxy chování pro VPN @@ -356,6 +365,66 @@ Trasa k nastavené IP adrese Špatná hodnota MSS pro VPN spojení Vedlejší uživaté tabletu + Zadejte vlastní specifické možnosti k připojení. Používejte opatrně Vlastní možnosti Odstranit položku připojení + Náhodné odpojování od mobilní sítě + Vzdálená síť není dostupná + Setrvat v režimu tun + %s a později + Připojení selhalo SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure + Tento profil byl přidán z externí aplikace (%s) a byl označen jako uživatelsky nezměnitelný. + Seznam odvolaných certifikátů + Restartování služby OpenVPN (aplikace pravděpodobně havarovala, nebo byla ukončena kvůli nedostatku paměti) + Importování konfigurace způsobilo chybu, nelze jej uložit + Hledat + (Poslední výpis je %1$d: %2$dh starý (%3$s)) + Vymazat log při novém připojení + Časový limit připojení + Protokol + Povoleno + Push Peer info + Odeslat na server další informace, např. verzi SSL a verzi systému Android + Potřebujete %1$s + Prosím zadejte heslo pro profil %1$s + Použít vložené údaje + Exportovat konfigurační soubor + soubor tls-auth chybí + Chybí uživatelský certifikát nebo soubor uživatelského klíče certifikátu + Chybí certifikát CA + Seznam revokovaných certifikátů (volitelné) + Znovu načíst (%d) logy z mezipaměti + Samsung telefony + Nebyla vybrána žádná VPN. + Výchozí VPN + Aktuálně vybraná VPN: „%s“ + Znovu připojit + Přepnout VPN + Připojit k %s + Odpojit od %s + Maximální doba mezi pokusy o připojení + Čekat %ss sekund mezi pokusem o připojení + Připojení k OpenVPN zavřeno (%s) + Změnit řazení + Třídit + Profily seřazené podle naposledy použitých + Profily řazené podle názvu + Konfigurace využívá možnost tls-remote, která je nyní ve 2.3 zastaralá a ve 2.4 bude odstraněna + Chování při AUTH_FAILED + Graf + Použít logaritmickou stupnici + Nedostatek dat + Průměr za hodinu + Průměr za minutu + Posledních 5 minut + Vstup + Výstup + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-de/plurals-icsopenvpn.xml b/app/src/main/res/values-de/plurals-icsopenvpn.xml index 1737fa7a..d6445be6 100755 --- a/app/src/main/res/values-de/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-de/plurals-icsopenvpn.xml @@ -14,7 +14,7 @@ %d Stunden verbleibend - Ein Minute verbleibend + Eine Minute verbleibend %d Minuten verbleibend diff --git a/app/src/main/res/values-de/strings-icsopenvpn.xml b/app/src/main/res/values-de/strings-icsopenvpn.xml index c80dc0d1..04c50cd2 100755 --- a/app/src/main/res/values-de/strings-icsopenvpn.xml +++ b/app/src/main/res/values-de/strings-icsopenvpn.xml @@ -44,14 +44,14 @@ Profilname bereits vorhanden. Bitte vergeben Sie einen eindeutigen Profilnamen. Profilname Kein Benutzerzertifikat ausgewählt - Kein Benutzerzertifikat ausgewählt. + Sie müssen ein CA-Zertifikat auswählen Kein Fehler. Fehler in der Konfiguration Kann die konfigurierte IPv4 Adresse nicht parsen Kann die manuell angegeben Routen nicht verarbeiten (Leer lassen, um nicht zu speichern) OpenVPN-Verknüpfung - Verbinde VPN… + Verbinde zu VPN… Von der Verknüpfung referenziertes Profil konnte nicht gefunden werden Zufälliger Host-Präfix Fügt 6 zufällige Zeichen am Anfang des Hostnamens hinzu @@ -244,7 +244,7 @@ Weise IP-Adressen zu Lege Routen an Verbunden - Trennen + Getrennt Wiederverbinden Beende OpenVPN läuft nicht @@ -323,7 +323,7 @@ Import-Protokoll: VPN-Topologie \"%3$s\" wurde angegeben, die Interface-Konfiguration \'ifconfig %1$s %2$s sieht allerdings wie eine IP-Adresse mit einer Netzwerkmaske aus. Topologie \"subnet\" wird angenommen. Wert muss eine Zahl zwischen 0 und 9000 sein - Der MTU-Wert muss eine Zahle zwischen 64 und 9000 sein + Die MTU Override Angabe muss eine ganze Zahl zwischen 64 und 9000 sein TCP-Verbindungen, die über den Tunnel laufen, anweisen, ihre maximale Paketgröße so einzustellen, dass die resultierende UDP-Paketgröße nach der Enkapsulierung durch OpenVPN auf den hier eingestellten Wert beschränkt bleibt. (Standardwert ist 1450) MSS-Wert der TCP-Nutzlast überschreiben MSS der TCP-Nutzlast @@ -409,7 +409,7 @@ Samsung-Geräte Kein VPN ausgewählt Standard-VPN - Standard VPN. Wird momentan für VPN beim Booten, Always-On-Modus und die Schnellzugriffskachel benutzt. + VPN für Fälle, wo ein Standard-VPN benötigt wird. Wird momentan beim Booten, Always-On-Modus und beim Schnellzugriffskachel benutzt. Derzeit ausgewähltes VPN: \'%s\' Neu verbinden VPN an-/ausschalten @@ -418,8 +418,8 @@ Maximale Zeit zwischen Verbindungsversuchen. OpenVPN erhöht die Wartezeit zwischen zwei Verbindungsversuchen schrittweise bis zu dieser Zeit. Der Standardwert ist 300s. Maximale Zeit zwischen Verbindungsversuchen Warte %ss Sekunden zwischen zwei Verbindungsversuchen - Netzwerke mehr... -> VPNS]]> - Verbindung mit OpenVPN getrennt (%s) + Netzwerke oder Verbindungen -> mehr... oder weitere ...-> VPN]]> + Verbindung zu OpenVPN getrennt (%s) Sortierung ändern Sortieren Profile nach letzter Verwendung sortiert @@ -427,11 +427,11 @@ Konfiguration verwendet die Option tls-remote, die in 2.3 als veraltet markiert und schließlich in 2.4 entfernt wurde Verhalten bei AUTH_FAILED Kurven - logarithmische Skala verwnden - noch keine Daten + Logarithmische Skala verwenden + Nicht genügend Daten Durchschnitt pro Stunde Durchschnitt pro Minute - letzten 5 Minuten + Die letzten 5 Minuten Eingehend Ausgehend %.0f bit/s @@ -442,4 +442,18 @@ %.1f kB %.1f MB %.1f GB + Verbindungsstatistiken + Laufende Statistiken der OpenVPN-Verbindung + Verbindungsstatus Änderungen + Statusänderungen der OpenVPN-Verbindung (Verbindung, Authentifizierung,...) + Schwache (MD5) Hashes in Zertifikatssignatur (SSL_CTX_use_certificate md too weak) + OpenSSL Geschwindigkeitstest + OpenSSL Chiffrenamen + OpenSSL Crypto Geschwindigkeitstest + OpenSSL hat einen Fehler gemeldet + Test läuft… + Ausgewählte Algorithmen testen + Eine andere App versucht, %s zu steuern. Die anforderne App kann nicht bestimmt werden. Wenn Sie diesen Zugriff zulassen, erhalten ALLE Apps Zugriff. + Die OpenVPN 3 C ++ - Implementierung unterstützt keine statischen Schlüssel. Bitte wechseln Sie zu OpenVPN 2.x unter den allgemeinen Einstellungen. + Die Benutzung von PKCS12 Dateien mit der OpenVPN 3 C++ Implementierung wird nicht unterstützt. Bitte importieren Sie entweder die PKCS12 Datei in den Android Keystore oder nutzen Sie die Option OpenVPN 2.x in den allgemeinen Einstellungen auszuwählen. diff --git a/app/src/main/res/values-es/plurals-icsopenvpn.xml b/app/src/main/res/values-es/plurals-icsopenvpn.xml index 2aa7eab7..0c0d5139 100755 --- a/app/src/main/res/values-es/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-es/plurals-icsopenvpn.xml @@ -2,19 +2,19 @@ - %d mes restante - %d meses restantes + Queda un mes + Queda un mes %d día restante - %d días restantes + %d día restante %d hora restante - %d horas restantes + %d hora restante %d minuto restanate - %d minutos restanates + %d minuto restanate diff --git a/app/src/main/res/values-es/strings-icsopenvpn.xml b/app/src/main/res/values-es/strings-icsopenvpn.xml index a123d5e6..42a15975 100755 --- a/app/src/main/res/values-es/strings-icsopenvpn.xml +++ b/app/src/main/res/values-es/strings-icsopenvpn.xml @@ -51,6 +51,7 @@ Error al analizar las rutas personalizadas (Deje en blanco para consultar sobre demanda) Acceso directo de OpenVPN + Conectando a VPN… Perfil especificado en el acceso directo no encontrado Prefijo aleatorio de Host Agrega 6 caracteres al azar delante del nombre de host @@ -252,6 +253,7 @@ hacia/de Móvil) Conectando (TCP) Fallo de autenticación Esperando por una red que se pueda usar + ↓%2$s %1$s - ↑%4$s %3$s No conectado Conectando a VPN %s Conectando a VPN %s @@ -322,6 +324,7 @@ hacia/de Móvil)
Importar registros: Topología de VPN \"%3$s\" especificado pero ifconfig %1$s %2$s se parece más a una dirección IP con una máscara de red. Asumiendo una topología de \"subred\". El valor de mssfix debe ser un número entero entre 0 y 9000 + El valor de anulación de MTU debe ser un número entero entre 64 y 9000 Anunciar a las sesiones TCP ejecutandose sobre el túnel que deben limitar su tamaño de paquetes enviados de tal manera que después de que OpenVPN los hay encapsulado, el tamaño del paquete UDP resultante enviado a su par no exceda este numero de bytes. (Por defecto es 1450) Reemplazar el valor MSS de la carga TCP Establecer MSS de la carga TCP @@ -391,9 +394,54 @@ hacia/de Móvil)
OpenVPN para Android puede tratar de encontrar el/los archivo/s faltante/s en la tarjeta de memoria automáticamente. Toque este mensaje de iniciar la solicitud de permiso. Protocolo Activo + La precedencia de ABI nativa preferida de este dispositivo (%1$s) y la ABI informada por bibliotecas nativas (%2$s) no coinciden + Permiso de VPN revocado por el sistema operativo (por ejemplo, otro programa de VPN iniciado), deteniendo VPN + Presión información por igual + Enviar información adicional al servidor, por ejemplo, la versión SSL y la versión de Android + Necesito %1$s + Por favor, introduzca la contraseña para el perfil %1$s + Utilizar datos en línea + Exportar archivo de configuración + falta el archivo tls-auth + Falta el certificado de usuario o el archivo de clave de certifcación del usuario Falta certificado CA + Lista de revocación de certificados (opcional) Vuelva a leer (%d) artículos de archivo de caché de registro log A pesar de que los teléfonos Samsung son algunos de los teléfonos Android más vendidos, el firmware de Samsung se encuentran entre los firmware con más errores. Los errores no se limitan a la operación del VPN en estos dispositivos, pero muchos de ellos se pueden solucionar. A continuación de describen algunos errores. \n\n El DNS no funciona a menos que el servidor DNS en el rango del VPN. \n \n En muchos dispositivos Samsung 5.x la funcionalidad de aplicaciones permitidas y no permitidas no funciona. \n En Samsung 6.x Se reporta que VPN no funcionará a menos que la aplicación de VPN se encuentre por fuera de la funcionalidad de ahorro de energía. Celulares Samsung VPN no seleccionado. + VPN predeterminado + VPN utilizado en lugares donde se necesita una VPN predeterminada. Estos están actualmente en arranque, para siempre y la ficha de configuración rápida. + VPN actualmente seleccionada: \'%s\' + Reconectar + Alternar VPN + Conéctese a %s + Desconectar %s + Ingrese el tiempo máximo entre intentos de conexión. OpenVPN aumentará lentamente su tiempo de espera después de una tentativa de conexión fallida hasta este valor. El valor predeterminado es 300s. + Tiempo máximo entre intentos de conexión + Esperando %s segundos entre intento de conexión + Redes más .. -> VPNS]]> + Conexión a OpenVPN cerrada (%s) + Cambio de clasificación + Ordenar + Perfiles ordenados por última vez usados ​​recientemente + Perfiles ordenados por nombre + Config usa la opción tls-remote que quedó obsoleta en 2.3 y finalmente eliminada en 2.4 + Comportamiento en AUTH_FAILED + Grafico + Usar escala logarítmica + No hay suficientes datos + Promedio por hora + Promedio por minuto + Últimos 5 minutos + En + Fuera + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-fr/strings-icsopenvpn.xml b/app/src/main/res/values-fr/strings-icsopenvpn.xml index ae289702..a647bf40 100755 --- a/app/src/main/res/values-fr/strings-icsopenvpn.xml +++ b/app/src/main/res/values-fr/strings-icsopenvpn.xml @@ -6,7 +6,7 @@ --> - "Adresse du serveur:" + Adresse du serveur : Port du serveur : "Emplacement" Impossible de lire le dossier @@ -128,9 +128,9 @@ "Votre ROM ne prend pas en charge l\'API VPNService, désolé :(" Chiffrement Entrez la méthode de chiffrement - Entrez l\'algorithme de chiffrement utilisé par OpenVPN. Laisser vide pour utiliser le cipher par défaut. + Entrez l\'algorithme de chiffrement utilisé par OpenVPN. Laissez vide pour utiliser l\'algorithme par défaut. Entrez l\'authentification digest utilisé pour OpenVPN. Laisser vide pour utiliser le digest par défaut. - Authentification / Chiffrement + Authentification/Chiffrement Explorateur de fichiers "Fichier personnalisé" "Impossible d\'importer le fichier" @@ -161,11 +161,11 @@ profil importé %d Images corrompues <>Les ROMs officielles HTC sont connues pour avoir des problèmes de routage entraînant que le trafic ne passe pas par le tunnel VPN. (C.f.: <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">Issue 18</a> dans le \"bug tacker\")</p><p>Les ROMs officielles de SONY pour le Xperia Arc S et le Xperia Ray ont été signalé comme ne possédant pas le service VPN. Toute autre ROM SONY peut avoir le même problème. (C.f.: <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">Issue 29</a> dans le \"bug tacker\")</p><p>Sur les ROM personnalisées le module TUN peut être manquant ou les droits de /dev/tun peuvent être incorrects. Certaines ROM CM9 peuvent nécessiter d\'utiliser l\'option de correction des droits de /dev/tun accessible depuis les \"Options générales\"/</p><p>Important: Si votre ROM a un problème, contactez le vendeur, il se peut que qu\'il vous fournisse un patch.</p> - Fichier contenant la clé de chiffrement PKCS12 + Fichier avec la clé de chiffrement PKCS12 Mot de passe de la clé privée Mot de passe icône du fichier - TLS Authentification/Cryptage + Authentification TLS/Chiffrement Configuration générée Paramètres Essaie de définir le propriétaire de l\'interface /dev/tun. Certaines images CM9 en ont besoin pour faire fonctionner l\'API VPNService. Nécessite les droits root. @@ -174,7 +174,7 @@ Modification \"%s\" Création de la configuration… Activer cette option forcera une reconnexion si l\'état du réseau est modifié (par exemple WiFi/Mobile) - Se reconnecter lors d\'un changement de réseau + Se reconnecter au changement de réseau État du réseau : %s "Le certificat CA est généralement renvoyé par le gestionnaire de clés Android. Spécifiez un certificat distinct si vous obtenez des erreurs de vérification de certificat." "Sélectionner" @@ -205,7 +205,7 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces "Utilisation du proxy %1$s %2$d" "Utiliser le proxy système" "Utiliser la configuration générale du système pour que les proxy HTTP / HTTPS se connectent." - OpenVPN connecter le VPN spécifié si elle était active au démarrage du système. S\'il vous plaît lire l\'avertissement de connexion FAQ avant d\'utiliser cette option sur Android < 5.0. + OpenVPN connectera le VPN spécifié si elle était active au démarrage du système. Veuillez lire l\'avertissement de connexion FAQ avant d\'utiliser cette option sur Android < 5.0. Se connecter au redémarrage Ignorer Redémarrer @@ -215,8 +215,8 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Notifications en double "Si Android tourne sur la mémoire du système (RAM), les application et les services qui ne sont pas nécessaires à un moment sont automatiquement supprimés de la mémoire. Cela stoppe donc la connexion VPN en cours. Pour s\'assurer que celle-ci reste toujours lancée, le service est lancé avec une priorité plus élevée. Pour cela, l\'application doit afficher une notification permanente. L\'icône de \"clé\" dans la notification est imposée par le système comme expliqué dans l\'entrée de la FAQ précédente." Aucun profil VPN défini. - "Utilisez l\'icône <img src=\"ic_menu_add\"/ pour ajouter un nouveau VPN" - "Utilisez l\'icône <img src=\"ic_menu_archive\"/> pour importer un fichier profil (.opvpn ou .conf) de votre carte SD." + Utilisez l\'icône <img src=\"ic_menu_add\"/> pour ajouter un nouveau VPN. + Utilisez l\'icône <img src=\"ic_menu_archive\"/> pour importer un profil existant (.opvpn ou .conf) depuis 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 @@ -273,7 +273,7 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Préfixe RDN tls-remote (OBSOLÈTE) Vous pouvez aider à traduire en visitant http://crowdin.net/project/ics-openvpn/invite - %1$s essais de controler %2$s + %1$s essaye de contrôler %2$s En poursuivant vous donnez la permission a l\'application de contrôler complètement OpenVPN pour Android et d\'intercepter tout le trafic réseau.N\'acceptez que si vous faite confiance à l\'application. Sinon vous vous exposez au risque de voir vos données compromises par un logiciel malveillant.\" Faire confiance à cette application. Aucune application n\'est autorisée à utiliser l\'API externe @@ -294,7 +294,7 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Comportement du VPN Autoriser les modifications des profils VPN Clés du matériel : - Icône de l\'application qui essaie d\'utiliser OpenVPN for Android + Icône de l\'appli essayant d\'utiliser OpenVPN for Android "À partir d\'Android 4.3 la confirmation VPN est gardée contre les \"applications recouvrante\". Cela se traduit par la boîte de dialogue qui ne réagi pas à la saisie tactile. Si vous avez une application qui utilise des superpositions, elle peut causer ce comportement. Si vous trouvez une application délinquante contacter l\'auteur de l\'application. Ce problème affecte toutes les applications VPN sur Android 4.3 et plus. Voir aussi <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\">Issue 185<a> pour plus de détails" Fenêtre de confirmation du VPN Sinon vous pouvez m\'envoyer un don via le Play Store : @@ -319,10 +319,11 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Fichier Nom d\'utilisateur/Mot de passe [Importé de : %s] 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. + 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 + La valeur de dépassement MTU doit être un entier compris entre 64 et 9000 Annoncer aux sessions TCP en cours d\'exécution sur le tunnel qu\'ils devraient limiter leurs tailles de paquets d\'émission de telle sorte qu\'après OpenVPN les a encapsulé, la taille des paquets UDP résultant que OpenVPN envoie à son homologue ne dépassera pas ce nombre d\'octets. (Valeur par défaut est 1450) Remplacer la valeur MSS de TCP payload Définir MSS de TCP payload @@ -402,6 +403,9 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Relire (%d) éléments du fichier de log Téléphones Samsung Aucun VPN sélectionné. + VPN par défaut + VPN utilisé dans les endroits où un VPN par défaut est nécessaire. Ceux-ci sont actuellement en cours de démarrage, pour Always-On et la tuile de paramétrage rapide. + VPN actuellement sélectionné : \"%s\" Reconnecter Activer VPN Connecter à %s @@ -414,4 +418,20 @@ Sur certaines images, cette notification joue un son.\nAndroid à introduit ces Trier Profils triés par dernier récemment utilisé Profils triés par nom + Graphique + Utiliser l\'échelle logarithmique + Données insuffisantes + Moyenne par heure + Moyenne par minute + 5 dernières minutes + Entré + Sorti + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-hu/strings-icsopenvpn.xml b/app/src/main/res/values-hu/strings-icsopenvpn.xml index a1db366c..4eafc9c1 100755 --- a/app/src/main/res/values-hu/strings-icsopenvpn.xml +++ b/app/src/main/res/values-hu/strings-icsopenvpn.xml @@ -179,13 +179,13 @@ A CA tanúsítvány általában visszajön az Android Keystore-ból. Adjon meg egy külön tanúsítványt ha tanúsítvány-ellenőrzési hibát kap. Választ Nem jött vissza CA tanúsítvány az Android keystore olvasása során. A hitelesítés valószínűleg sikertelen lesz. - Napló ablak mutatása a csatlakozás alatt. A napló ablak mindig elérető a rolóról is. + Napló ablak mutatása a csatlakozás alatt. A napló ablak mindig elérhető a rolóról is. Naplózási ablak mutatása %10$s %9$s futtatva %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) Hiba az Android keystore %1$s: %2$s kulccsal való belépéskor A VPN csatlakozás figyelmeztetés azt jelzi, hogy ez az alkalmazás a rendszer általi teljes forgalmat lehallgathatja a VPNService API visszaélések elkerülése érdekében.\nA VPN csatlakozás értesítés (A kulcs szimbólum) is az Android rendszer jelzése egy kimenő VPN kapcsolatról. Néhány lemezképen ez az értesítés hangot is lejátszik.\nAz android az ön biztonsága érdekében vezette be ezeket a rendszer értesítéseket, és gondoskodott arról, hogy ne lehessen megkerülni. (Néhány lemezképen ez sajnos értesítési hangot is tartalmaz.) Kapcsolat figyelmeztetés és értesítés hang - A magyar fordítást készítették: kisjuhos, hd_adam, tomygee, Floo19, PettyBlue, ha1dfo + A magyar fordítást készítették: kisjuhos, hd_adam, tomygee, Floo19, PettyBlue, ha1dfo, mmisi74, benewfy IP és DNS Alapvető Útválasztás @@ -252,6 +252,7 @@ Csatlakozás (TCP) Hitelesítési hiba Várakozás használható hálózatra + ↓%2$s %1$s - ↑%4$s %3$s Nincs kapcsolat Csatlakozás a %s VPN-hez Csatlakozás a %s VPN-hez @@ -322,6 +323,7 @@ Importálási napló: VPN topológia \"%3$s\" specifikálva, de ifconfig %1$s %2$s inkább IP címnek tűnik hálózati maszkkal. \"Alhálózat\" topológiát feltételezve. Az MSS felülbírálati értéknek egész számnak kell lennie 0 és 9000 között + Az MTU felülbírálati értéknek egész számnak kell lennie 64 és 9000 között Jelentse be a TCP munkameneteknek, hogy korlátozniuk kell a küldendő csomagjaik méretét hogy miután az OpenVPN bekapszulázza őket a peer-nek küldendő eredmény UDP csomag mérete ne haladhassa meg ezt a byte számot. (az alapérték 1450) TCP payload MSS felülbírálati érték MSS beállítás a TCP payload-hoz @@ -406,6 +408,9 @@ Annak ellenére, hogy a Samsung telefonok a legtöbbet eladott Android telefonok közé tartoznak, a Samsung firmware-ek a leg bug-osabb Android firmware-ek. Ezeken az eszközökön a hibák nem csak a VPN működésre korlátozódnak, de nagy részük kiküszöbölhető. A következő néhány ilyen hiba leírása.\n\nA DNS nem működik hacsak nem a DNS kiszolgáló a VPN tartományban van.\n\nSok Samsung 5.x eszközön nem működik az engedélyezett/tiltott alkalmazások funkció.\nSamsung 6.0-n a VPN nem működik hacsak nem adjuk hozzá kivételként az alkalmazást a Powersave funkcióknál. Samsung telefonok Nincs VPN kiválasztva. + Alapértelmezett VPN + VPN használata azokon a helyeken ahol alapértelmezett VPN szükséges. Ezek jelenleg a boot-oláskor, a Mindig-BE és a Gyors Beállítások csempe. + Jelenleg kiválasztott VPN: \'%s\' Újracsatlakozás VPN be/kikapcsolás Csatlakozás %s-hez @@ -420,4 +425,53 @@ A profilok a legutóbbi használat szerint rendezve A profilok név szerint rendezve A konfiguráció tls-remote opciót használ, ami a 2.3-ban elavulttá vált és a 2.4-ben végleg eltávolították + Viselkedés AUTH_FAILED-kor + Grafikon + Logaritmikus skála használata + Nincs elég adat + Átlag óránként + Átlag percenként + Utolsó 5 perc + Be + Ki + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + <p>Az OpenSSL az 1.1-es verziótól kezdve elutasítja a gyenge aláírásokat, mint például + az MD5.</p><p><b>Az MD5 aláírások egyáltalán nem biztonságosak, a továbbiakban nem kellene használni.</b> MD5 + ütközést lehet létrehozni< + href=\"https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html\">néhány óra alatt minimális erőfeszítéssel.</a>. + Frissítenie kellene a VPN tanúsítványokat amint lehetséges.</p><p>Sajnos, a régebbi easy-rsa disztribúciók a \"default_md md5\" beállítás opciót tartalmazták. Ha régi easy-rsa verziót használ, frissítsen + a <a href=\"https://github.com/OpenVPN/easy-rsa/releases\">legutóbbi verzióra</a>) vagy módosítsa az md5-ot sha256-ra és + generálja újra a tanúsítványokat.</p><p>Ha mégis a régi megtört tanúsítványokat szeretné használni, akkor használja + tls-cipher \"DEFAULT:@SECLEVEL=0\" konfiguráció opciót a haladó beállításoknál, vagy adja hozzá mint új sort + az importált konfigurációhoz.</p> + + %.0f B + %.1f kB + %.1f MB + %.1f GB + Kapcsolatstatisztika + A létrehozott OpenVPN kapcsolat pillanatnyi statisztikái + Kapcsolat állapot változás + Állapotváltozások az OpenVPN kapcsolatban (Csatlakozás, hitelesítés,…) + + Gyenge (MD5) hash-ek a tanúsítvány aláírásban (SSL_CTX_use_certificate md túl gyenge) + + OpenSSL Sebesség Teszt + OpenSSL titkosítások + OpenSSL Titkosítás Sebesség teszt + Az OpenSSL hibával tért vissza + A teszt fut… + Kijelölt algoritmusok tesztelése + Egy külső alkalmazás megpróbálja vezérelni a(z) %s-t. Az alkalmazást nem lehet felismerni, a hozzáférés megadása + MINDEN alkalmazás számára elérhetőséget biztosít. + + Az OpenVPN 3 C++ implementáció nem támogatja a statikus kulcsokat, Kérem, váltson + OpenVPN 2.x-re az általános beállításokban. + + PKCS12-fájlok közvetlen használata nem támogatott az OpenVPN 3 C++ implementációval. + Kérem, importálja az Android kulcstárba a pkcs12 fájlokat, vagy váltson OpenVPN 2.x-re az általános beállításokban. + diff --git a/app/src/main/res/values-in/strings-icsopenvpn.xml b/app/src/main/res/values-in/strings-icsopenvpn.xml index e310d2f9..784ee9bf 100755 --- a/app/src/main/res/values-in/strings-icsopenvpn.xml +++ b/app/src/main/res/values-in/strings-icsopenvpn.xml @@ -12,19 +12,19 @@ Gagal membaca direktori: Pilih Batal - Tak ada data + Tidak ada data Kompresi LZO - Tanpa Sertifikat + Tidak ada Sertifikat Sertifikat Klien Kunci Sertifikat Klien Berkas PKCS12 Sertifikat CA Anda harus memilih sertifikat - Kode sumber dan pelacak masalah tersedia di http://code.google.com/p/ics-openvpn/ - Program ini menggunakan komponen-komponen berikut ini; lihat kode sumber penjelasan lengkap mengenai lisensi + Kode sumber dan masalah pelacak tersedia di http://code.google.com/p/ics-openvpn/ + Program ini menggunakan komponen berikut ini; lihat kode sumber penjelasan lengkap mengenai lisensi Tentang Profil - Jenis + Tipe Password PKCS12 Pilih… Anda harus memilih setidaknya satu berkas @@ -54,21 +54,21 @@ Dyan Profil di shrotcut tidak ada Acak awalan Host - Tambah 6 karakter acak di depan nama host - Aktifkan pilihan buatan - Tentukan seting buatan. Gunakan hati-hati! - Rute ditolak Android - Putus + Tambahkan 6 karakter acak di depan nama host + Aktifkan pilihan buatan (Custom) + Tentukan seting buatan (Custom). Gunakan hati-hati! + Rute ditolak oleh Android + Koneksi Putus Memutuskan sambungan VPN Bersihkan catatan - Batal Konfirmasi - Putuskan sambungan VPN/Batalkan usaha menyambungkan VPN? - Singkirkan VPN + Membatalkan Konfirmasi + Putuskan sambungan VPN/Batalkan upaya penyambungan VPN? + Hapus VPN Memeriksa apakah server menggunakan sertifikat dengan ekstensi TLS Server (--server remote-cert-tls) Mengharapkan sertifikat server TLS - Memeriksa sertifikat Remote Server Subjek DN + Memeriksa sertifikat Remote Server dengan Subjek DN Cek nama sertifikat Host - Tentukan nilai ynag digunakan untuk memverifikasi sertifikat remote DN (misal C=nama perusahaan, L=Kota lokasi, OU=nama departemen perusahaan, CN=openvpn.blinkt.de. Tentukan DN atau RDN yang lengkap (dalam contoh : openvpn.blinkt.de) atau sebuah awalan RDN untuk verifikasi. Saat memakai RDN awalan \"server\" cocok dengan \"server-1\" dan \"server-2\". Mengosongkan field akan membuat RDN diperiksa dengan nama host server. Lebih jelasnya lihat OpenVPN 2.3.1 manpage di bagian -verify-x509-name + Tentukan nilai yang digunakan untuk memverifikasi sertifikat remote DN (misal C=nama perusahaan, L=Kota lokasi, OU=nama departemen perusahaan, CN=openvpn.blinkt.de. Tentukan DN atau RDN yang lengkap (dalam contoh: openvpn.blinkt.de) atau sebuah awalan RDN untuk verifikasi. Saat memakai RDN awalan \"server\" cocok dengan \"server-1\" dan \"server-2\". Mengosongkan field akan membuat RDN diperiksa dengan nama host server. Lebih jelasnya lihat OpenVPN 2.3.1 manpage di bagian -verify-x509-name Subyek sertifikat remote Aktifkan otentifikasi kunci TLS Berkas otintikasi TLS @@ -252,6 +252,7 @@ Menghubungkan (TCP) Otentifikasi gagal Menunggu jaringan yang dapat dipakai + ↓%2$s/s %1$s - ↑%4$s/s %3$s Tidak terhubung Menghubungkan ke VPN %s Menghubungkan ke VPN %s @@ -322,6 +323,7 @@ Log impor: Vpn topologi \"%3$s\" ditentukan tapi ifconfig %1$s %2$s terlihat lebih seperti alamat IP dengan mask jaringan. Dengan asumsi \"subnet\" topologi. Nilai menimpa MSS telah menjadi bulat antara 0 dan 9000 + Nilai penggantian MTU harus bilangan bulat antara 64 dan 9000 Mengumumkan kepada sesi TCP berjalan di atas terowongan bahwa mereka harus membatasi kirim ukuran paket mereka seperti bahwa setelah OpenVPN telah dikemas mereka, sehingga UDP ukuran paket yang OpenVPN mengirim ke rekan-nya tidak akan melebihi jumlah ini byte. (default adalah 1450) Mengganti nilai MSS TCP muatan Mengatur muatan MSS TCP @@ -383,4 +385,61 @@ Restart layanan OpenVPN (App jatuh mungkin jatuh atau dibunuh untuk memori tekanan) Mengimpor konfigurasi menghasilkan kesalahan, tidak bisa menyimpannya Pencarian + (Sampah terakhir adalah %1$d: %2$dh lama (%3$s)) + Hapus log pada koneksi baru + Hubungkan Timeout + Tidak ada aplikasi yang diizinkan ditambahkan Menambahkan diri kita (%s) untuk memiliki setidaknya satu aplikasi dalam daftar aplikasi yang diizinkan agar tidak mengizinkan semua aplikasi + OpenVPN untuk Android dapat mencoba untuk menemukan file yang hilang pada sdcard secara otomatis. Ketuk pesan ini untuk memulai. + Protokol + Diaktifkan + Preferred native ABI yang diutamakan dari perangkat ini (%1$s) dan ABI dilaporkan oleh perpustakaan asli (%2$s) ketidakcocokan + [01.55] Routes excluded: 10.0.0.0/8, *********/32, 172.16.0.0/12, 192.168.0.0/16 + Info Push Peer + Send extra information to the server, e.g. SSL version and Android version + Butuh %1$s + Silakan masukkan sandi untuk profil %1$s + Gunakan data inline + Ambil berkas konfigurasi + File tls-auth hilang + Sertifikat pengguna atau file kunci pengguna certifcate hilang + Sertifikat CA tidak ditemukan + Daftar Pencabutan Certifcate (opsional) + Baca ulang (%d) item log dari file cache log + Jjj + Ponsel Samsung + Tidak ada VPN yang dipilih. + VPN default + VPN digunakan di tempat VPN default dibutuhkan. Ini saat ini sedang boot, Always-On dan Quick Settings Tile. + VPN yang dipilih saat ini: \'%s\' + Menghubungkan kembali + Toggle VPN + Menghubungkan ke %s + Memutuskan %s + Masukkan waktu maksimum antara upaya koneksi. OpenVPN secara perlahan akan menaikkan waktu tunggunya setelah usaha koneksi gagal mencapai nilai ini. Default ke 300s. + Waktu maksimum antar upaya koneksi + Menunggu %s detik di antara upaya koneksi + Networks more .. -> VPNS]]> + Sambungan ke OpenVPN ditutup (%s) + Ubah penyortiran + Urutkan + Profil diurutkan berdasarkan terakhir yang terakhir digunakan + Profil diurutkan berdasarkan nama + Config menggunakan opsi tls-remote yang sudah ditinggalkan di 2.3 dan akhirnya dihapus di 2.4 + Perilaku pada AUTH_FAILED + Grafik + Gunakan skala logaritmik + Tidak cukup data + Rata-rata per jam + Rata-rata per jam + 5 menit terakhir + Masuk + Keluar + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-it/plurals-icsopenvpn.xml b/app/src/main/res/values-it/plurals-icsopenvpn.xml index 70489fbc..ae8b7c61 100755 --- a/app/src/main/res/values-it/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-it/plurals-icsopenvpn.xml @@ -1,3 +1,20 @@ - + + + Un mese rimanente + %d mesi rimanenti + + + Un giorno rimanente + %d giorni rimanenti + + + Un\'ora rimanente + %d ore rimanenti + + + Un minuto rimanente + %d minuti rimanenti + + diff --git a/app/src/main/res/values-it/strings-icsopenvpn.xml b/app/src/main/res/values-it/strings-icsopenvpn.xml index b3774986..77866ab8 100755 --- a/app/src/main/res/values-it/strings-icsopenvpn.xml +++ b/app/src/main/res/values-it/strings-icsopenvpn.xml @@ -44,23 +44,25 @@ Si prega di inserire un nome univoco del profilo Nome del profilo Devi selezionare un certificato utente + Devi selezionare un certificato Nessun errore trovato Errore nella configurazione Impossibile analizzare l\'indirizzo IPv4 Errore durante la lettura delle regole di reindirizzamento (routing) (non compilare perché venga sempre richiesto) Collegamento a OpenVPN + Connessione alla VPN… Profilo indicato nel collegamento non trovato Prefisso Host casuale Aggiunge 6 caratteri casuali prima dell\'hostname Abilita opzioni personalizzate Specifica opzioni personalizzate. Utilizzare con cautela! Reindirizzamento (route) rifiutato da Android - Scollega + Disconnetti Disconnettere VPN Cancella registro Conferma l\'annullamento - Disconnetti la VPN in uso/annulli il tentativo di connessione? + Disconnettere la VPN in uso/annullare il tentativo di connessione? Rimuovi VPN Controlla se il server utilizza un certificato con estensioni TLS (--remote-cert-tls server) Attesa di un certificato server TLS @@ -165,6 +167,7 @@ Effettuata la lettura del file di configurazione Password della chiave privata Password icona del file + Autenticazione/crittografia TLS Configurazione generata Impostazioni Tenta di impostare system come proprietario di /dev/tun. Alcuni firmware CM9 necessitano di questa impostazione affinché le API del servizio VPN funzionino. E\' necessario essere root. @@ -180,6 +183,7 @@ Effettuata la lettura del file di configurazione Nessun certificato della CA è stato prelevato dal Keystore di Android. E\' probabile che l\'autenticazione fallisca. Mostra la finestra dei log della connessione. Si può sempre accedere alla finestra dei log tramite la barra delle notifiche. Visualizza la finestra dei log + %10$s %9$s in esecuzione su %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) Errore di firma con la chiave %1$s: %2$s del Keystore di Android. L\'avvertimento durante la connessione VPN, in cui si informa che questo programma può intercettare tutto il traffico del sistema, serve a prevenire un uso fraudolento delle API del servizio VPN.\nL\'icona di notifica a forma di chiave è altresì imposta dal sistema Android per avvertire che si è connessi ad una VPN. Su alcuni apparecchi questa notifica è accompagnata da un suono.\nAndroid utilizza questi sistemi per la tua sicurezza e per assicurarsi che questi non vengano aggirati (in alcuni firmware questo sfortunamente è accompagnato da un suono di avvertimento). Avviso di connessione e notifica sonora @@ -202,6 +206,8 @@ Effettuata la lettura del file di configurazione Si sta utilizzando il proxy %1$s %2$d Utilizza il proxy di sistema Utilizza la configurazione generale del sistema relativa ai proxy HTTP/HTTPS per connettersi. + OpenVPN connetterà la VPN specificata se è attiva durante l\'avvio del sistema. Leggi le domande di avviso di connessione prima di utilizzare questa opzione in Android < 5.0. + Connessione all\'avvio Ignora Riavvia Le modifiche sarannoi applicate dopo aver riavviato la connessione VPN. Riavviare ora la connessione? @@ -248,6 +254,7 @@ Effettuata la lettura del file di configurazione Connessione in corso (TCP) Autenticazione fallita In attesa di una rete utilizzabile + ↓%2$s %1$s - ↑%4$s %3$s Non connesso Connessione alla VPN %s in corso Connessione alla VPN %s in corso @@ -316,7 +323,10 @@ Effettuata la lettura del file di configurazione Alcuni file non possono essere trovati. Si prega di selezionare i file da importare nel profilo: Per utilizzare questa applicazione è necessario un provider VPN/gateway VPN che supportino OpenVPN (spesso forniti dal datore di lavoro). Vai a http://community.openvpn.net/ per ulteriori informazioni su OpenVPN e come configurare il proprio server OpenVPN. Registro importazione: + Topologia Vpn \"%3$s\" specificata, ma ifconfig %1$s %2$s sembra più un indirizzo IP con una maschera di rete. Assumendo la topologia di \"sottorete\". Il valore di fix MSS deve essere un intero tra 0 e 9000 + Il valore di override MTU deve essere un intero compreso tra 64 e 9000 + Notificare alle sessioni TCP in esecuzione sul tunnel che dovrebbero limitare i loro formati di pacchetti di invio dopo che OpenVPN li ha incapsulati, la dimensione del pacchetto UDP risultante da OpenVPN inviata al proprio peer non supererà questo numero di byte. (Impostazione predefinita è 1450) Sovrascrivi il valore del MSS nel payload TCP Setta il valore del MSS nel payload TCP Comportamento Client @@ -331,14 +341,107 @@ Effettuata la lettura del file di configurazione Mantieni Elimina Aggiungi nuovo server + Utilizza le voci di connessione in ordine casuale di connessione + È necessario definire e abilitare almeno un server remoto. Lista Server Applicazioni consentite Impostazioni Avanzate Opzioni Payload Impostazioni TLS + Nessuna destinazione definita Profilo VPN duplicato Duplicazione del profilo: %s Mostra il log + Esistono diversi client OpenVPN per Android. I più comuni sono OpenVPN per Android (questo client), OpenVPN Connect e OpenVPN Settings.<p>I clienti possono essere raggruppati in due gruppi: OpenVPN per Android e OpenVPN Connect utilizzano l\'API VPNService ufficiale (Android 4.0+) e non necessitano di root e OpenVPN Settings che utilizza root.<p>OpenVPN per Android è un client open source sviluppato da Arne Schwabe. È destinato a utenti più avanzati e offre molte impostazioni e la possibilità di importare profili da file e di configurare/modificare i profili all\'interno dell\'applicazione. Il client si basa sulla versione comunitaria di OpenVPN. Si basa sul codice sorgente OpenVPN 2.x. Questo client può essere visto come il client semi ufficiale della comunità. <p>OpenVPN Connect è un client non open source sviluppato da OpenVPN Technologies, Inc. Il client è destinato ad un uso generale e più mirato all\'utente medio e consente l\'importazione di profili OpenVPN. Questo client si basa sulla reimplementazione OpenVPN C ++ del protocollo OpenVPN (questo era necessario per consentire a OpenVPN Technologies, Inc di pubblicare un\'applicazione iOS OpenVPN). Questo client è il client ufficiale delle tecnologie OpenVPN <p> OpenVPN Settings è il più vecchio dei client ed è anche un\'interfaccia utente per OpenVPN Open Source. A differenza di OpenVPN per Android richiede root e non utilizza l\'API VPNService. Non dipende da Android 4.0+ + Differenze tra i client OpenVPN di Android + Ignora route multicast: %s + Android supporta solo le route CIDR alla VPN. Poiché i percorsi non CIDR sono quasi mai usati, OpenVPN per Android utilizzerà un /32 per percorsi che non sono CIDR ed invieranno un avviso. + Le operazioni di tethering funzionano mentre la VPN è attiva. La connessione di tether NON utilizzerà la VPN. + La prima versione KitKat ha impostato il valore MSS errato sulle connessioni TCP (#61948). Prova ad abilitare l\'opzione mssfix per risolvere questo problema. + Android continuerà a utilizzare le impostazioni proxy specificate per la connessione mobile/Wi-Fi quando non vengono impostati server DNS. OpenVPN per Android ti avviserà in questo registro.

Quando una VPN imposta un server DNS, Android non utilizzerà un proxy. Non esistono API per impostare un proxy per una connessione VPN

+ Le applicazioni VPN potrebbero smettere di funzionare durante la disinstallazione e la reinstallazione. Per dettagli vedi # 80074 + L\'IP client configurato e gli IP nella maschera di rete non vengono indirizzati alla VPN. OpenVPN funziona senza questo errore aggiungendo esplicitamente un percorso che corrisponda con il client IP e con la sua maschera di rete + L\'apertura di un dispositivo tun mentre è attivo un altro dispositivo tun, che viene utilizzato per il supporto persist-tun, blocca i VPNServices sul dispositivo. Un riavvio è necessario per rendere nuovamente funzionante la VPN. OpenVPN per Android tenta di evitare la riapertura del dispositivo tun e se necessario chiude l\'attuale TUN prima di aprire il nuovo dispositivo TUN per evitare il blocco. Ciò può portare ad una breve finestra in cui i pacchetti vengono inviati tramite la connessione non VPN. Anche con questa soluzione il VPNServices a volte si blocca e richiede un riavvio del dispositivo. + VPN non funziona affatto per gli utenti secondari. + "Gli utenti multipli riferiscono che la connessione dati mobile/connessione mobile spesso viene eliminata durante l\'utilizzo dell\'applicazione VPN. Il comportamento sembra influenzare solo alcune combinazioni di provider di servizi e dispositivi mobili e finora non è possibile individuare alcuna causa/soluzione." + Solo la destinazione può essere raggiunta tramite VPN che sono raggiungibili senza VPN. La VPN IPv6 non funziona affatto. + Nessuna route CIDR + Modalità proxy per VPN + Reinstallazione applicazioni VPN %s e precedenti Copia di %s + Percorso per l\'indirizzo IP configurato + Valore MSS errato per la connessione VPN + Utenti tablet secondari + Imposta le opzioni specifiche di connessione personalizzate. Usare con attenzione + Opzioni personalizzate + Rimuovi voce connessione + Disconnessioni casuali dalla rete mobile + Reti remote non raggiungibili + Modalità tun persistente + %s e successive + Le connessioni falliscono con l\'avviso di autenticazione SSL23_GET_SERVER_HELLO: sslv3 + Nuove OpenVPN per le versioni Android (0.6.29/Marzo 2015) utilizzano un valore predefinito più sicuro per le suite di cifrature consentite (tls-cipher \"DEFAULT:! EXP:! PSK:! SRP:! KRSA\"). Purtroppo, omettendo le suite di cifrature meno sicure e le suite di cifrature di esportazione, in particolare l\'omissione di suite di cifratura che non supportano la perfetta segretezza avanzata (Diffie-Hellman), provoca alcuni problemi. Questo è solitamente causato da un tentativo ben intenzionato, ma malinteso, per rafforzare la sicurezza di TLS impostando tls-cipher sul server o alcuni OSes incorporati con SSL (ad esempio MikroTik). \nPer risolvere questo problema, impostare l\'opzione tls-cipher sul server a un default ragionevole come tls-cipher \"DEFAULT:! EXP:! PSK:! SRP:! KRSA\". Per aggirare il problema sul client, aggiungere l\'opzione personalizzata tls-cipher DEFAULT sul client Android. + Questo profilo è stato aggiunto da un\'applicazione esterna (%s) ed è stato contrassegnato come non modificabile dall\'utente. + Elenco di revoca dei certificati + Riavvio del servizio OpenVPN (l\'applicazione si è probabilmente bloccata o è stata chiusa per motivi di memoria) + L\'importazione della configurazione ha generato un errore, non è possibile salvarlo + Cerca + (Ultimo dump è %1$d: %2$dh vecchio (%3$s)) + Pulisci registro su nuova connessione + Connessione scaduta + Non è stata aggiunta alcuna applicazione consentita. Aggiungendo (%s) per avere almeno una app nell\'elenco delle applicazioni consentite per non autorizzare tutte le applicazioni + OpenVPN per Android può provare a scoprire automaticamente i file mancanti nella scheda SD. Tocca questo messaggio per avviare la richiesta di autorizzazione. + Protocollo + Abilitato + Preferenza ABI nativa di questo dispositivo (%1$s) e ABI segnalate da librerie native (%2$s) non corrispondente + L\'autorizzazione VPN è stata revocata dall\'OS (ad esempio un altro programma VPN avviato), arrestando la VPN + Info Push Peer + Invia informazioni aggiuntive al server, ad esempio la versione SSL e la versione Android + E\' necessario %1$s + Inserisci la password per il profilo %1$s + Utilizza dati in linea + Esporta file di configurazione + File tls-auth mancante + Certificato utente o file chiave certificato utente mancante + Certificato CA mancante + Elenco certificato di revoca (facoltativo) + Rileggi (%d) gli elementi del registro dal file di cache di log + Anche se i telefoni Samsung sono tra i più venduti telefoni Android, i firmware di Samsung sono anche tra i firmware Android con più problemi. I problemi non sono limitati all\'operazione VPN su questi dispositivi, ma molti di essi possono essere sistemati. In seguito sono descritti alcuni di questi problemi. \n\nIl DNS non funziona a meno che il server DNS sia nell\'intervallo VPN. \n\nIn molti dispositivi Samsung 5.x la funzionalità delle applicazioni consentite/disattivate non funziona. \nNel Samsung 6.x viene segnalato il non funzionamento della VPN a meno che l\'applicazione VPN non sia esclusa dalle funzioni di Risparmio energia. + Telefoni Samsung + Nessuna VPN selezionata. + VPN predefinita + VPN utilizzata nei luoghi in cui è necessaria una VPN predefinita. Questi sono attualmente in fase di avvio, per Always-On e la finestra Impostazioni rapide. + VPN attualmente selezionata: \'%s\' + Riconnetti + Attiva/disattiva VPN + Connetti a %s + Disconnetti %s + Inserire il tempo massimo tra i tentativi di connessione. OpenVPN aumenterà lentamente il tempo di attesa dopo un tentativo di connessione non riuscito fino a questo valore. Il valore predefinito è 300s. + Tempo massimo tra i tentativi di connessione + Attendere %ss secondi tra i tentativi di connessione + Altre reti .. -> VPNS]]> + Connessione a OpenVPN chiusa (%s) + Cambia ordinamento + Ordina + Profili ordinati per ultimo usato di recente + Profili ordinati per nome + Config utilizza l\'opzione tls-remote che è stata deprecata nella versione 2.3 e infine rimossa nella 2.4 + Comportamento su AUTH_FAILED + Grafico + Usa scala logaritmica + Dati insufficienti + Media oraria + Media al minuto + Ultimi 5 minuti + Ingresso + Uscita + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-ko/plurals-icsopenvpn.xml b/app/src/main/res/values-ko/plurals-icsopenvpn.xml index 70489fbc..9f02b893 100755 --- a/app/src/main/res/values-ko/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-ko/plurals-icsopenvpn.xml @@ -1,3 +1,16 @@ - + + + %d 개월 남음 + + + %d 일 남음 + + + %d 시간 남음 + + + %d 분 남음 + + diff --git a/app/src/main/res/values-ko/strings-icsopenvpn.xml b/app/src/main/res/values-ko/strings-icsopenvpn.xml index 2ebdf272..6a35b580 100755 --- a/app/src/main/res/values-ko/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ko/strings-icsopenvpn.xml @@ -9,7 +9,7 @@ 서버 주소: 서버 포트: 위치 - 폴더를 읽을 수 없습니다 + 디렉토리를 읽을 수 없습니다 선택 취소 데이터 없음 @@ -19,115 +19,117 @@ 클라이언트 인증서 키 PKCS12 파일 CA 인증서 - 인증서를 선택 해야 합니다 - 소스 코드와 문제 추적기는 http://code.google.com/p/ics-openvpn/에서 사용할 수 있습니다 - 프로그램은 다음 구성 요소를 사용합니다. 라이선스에 대 한 자세한 내용은 소스를 참조 하십시오 + 인증서를 선택해야 합니다 + 소스 코드와 문제 추적기는 http://code.google.com/p/ics-openvpn/ 에서 사용할 수 있습니다 + 이 프로그램은 다음 구성 요소를 사용합니다. 라이선스에 대한 자세한 내용은 소스 코드를 참조하십시오. 소개 프로파일 유형 PKCS12 암호 선택… - 파일을 선택 해야 합니다 + 파일을 선택해야 합니다 TLS 인증 사용 TLS 방향 CIDR 형식의 IPv6 주소/넷마스크를 입력 (예: 2000:dd::23/64) CIDR 형식의 IPv4 주소/넷마스크를 입력 (예: 1.2.3.4/24) IPv4 주소 IPv6 주소 - 사용자 정의 OpenVPN 옵션을 입력하십시오. 사용 시 유의하십시오. 또한 TUN과 연관된 많은 OpenVPN 설정은 안드로이드에서 지원하는 VPN 설정의 한계로 지원되지 않습니다. 중요한 옵션이 누락됐다고 생각되면 개발자에게 연락주십시오. - 계정 + 사용자 정의 OpenVPN 옵션을 입력하십시오. 사용시 유의하십시오. 또한 TUN과 연관된 많은 OpenVPN 설정은 안드로이드에서 지원하는 VPN 설정의 한계로 지원되지 않습니다. 중요한 옵션이 누락됐다고 생각되면 개발자에게 연락주십시오. + 사용자 이름 암호 - 고정설정에는 TLS인증 키가 고정키로 사용됩니다 - VPN 설정 + 고정 설정에는 TLS 인증 키가 고정 키로 사용됩니다 + VPN 구성 프로파일 추가 - 새 프로파일에 사용할 이름을 입력하세요. - 고유 프로필 이름을 입력 하십시오 + 새 프로파일을 식별하는 이름을 입력하세요. + 고유한 프로파일 이름을 입력하십시오 프로파일 이름 - 사용자 인증서를 선택 해야 합니다 + 사용자 인증서를 선택해야 합니다 + CA 인증서를 선택해야 합니다 오류 없음 - 설정 오류 + 구성 오류 IPv4 주소 구문 분석 오류 사용자 지정 경로 구문 분석 오류 (비워두면 요청시 쿼리됨) OpenVPN 바로 가기 - 바로가기에 지정 된 프로파일을 찾을 수 없습니다. + VPN에 연결 중... + 바로가기에 지정된 프로파일을 찾을 수 없습니다. 임의의 호스트 접두사 6개 임의의 문자를 호스트 이름 앞에 추가 - 사용자 지정 옵션을 사용 하도록 설정 - 사용자 지정 옵션을 입력하세요. 주의해서 사용! - 안드로이드에 의해 거부된 라우트 + 사용자 지정 옵션 사용 + 사용자 지정 옵션을 지정하세요. 주의해서 사용! + 안드로이드에 의해 거부된 경로 연결 끊기 VPN 연결 끊기 로그 지우기 취소 확인 - 연결된 VPN 끊기/연결시도 취소? + 연결된 VPN 끊기/연결 시도 취소? VPN 제거 서버가 TLS 서버 확장을 포함한 인증서를 사용하는지 여부 확인 (--remote-cert-tls server) TLS 서버 인증서 바람 - 원격 서버 인증서 대상(Subject) DN을 확인 - 인증서 호스트명 확인 - 원격 인증서 DN을 확인 하는데 사용하는 검사를 지정 (예: C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de)\n\n확인을 위해 완전한 DN이나 RDN (예 openvpn.blinkt.de) 또는 RDN 접두사를 지정.\n\nRDN 접두사 \"서버\"를 사용하면 \"서버-1\" 및 \"서버 2\"와 일치합니다\n\n텍스트 필드를 빈 상태로 두면 RDN은 서버의 호스트명과 비교됩니다\n\n더 자세한 내용은 OpenVPN 2.3.1+ 맨페이지에서 —verify-x509-name 아래를 참조 - 원격 인증서 제목 - TLS Key 인증 활성화 + 원격 서버 인증서 주체 DN을 확인 + 인증서 호스트 이름 확인 + 원격 인증서 DN을 확인하는 데 사용하는 검사를 지정 (예: C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de)\n\n확인을 위해 완전한 DN이나 RDN (예 openvpn.blinkt.de) 또는 RDN 접두사를 지정.\n\nRDN 접두사 \"Server\"를 사용하면 \"Server-1\" 및 \"Server-2\"와 일치합니다.\n\n텍스트 필드를 비워 두면 RDN을 서버의 호스트 이름과 비교합니다\n\n더 자세한 내용은 OpenVPN 2.3.1+ 맨페이지에서 --verify-x509-name 아래를 참조 + 원격 인증서 주체 + TLS 키 인증 사용 TLS 인증 파일 - 서버로부터 IP 주소, 라우트와 타이밍 옵션을 요구합니다. - 서버는 어떤 정보도 요구하지 않습니다. 아래에 세부 설정을 지정하십시오. - 설정 받기 + 서버에 IP 주소와 경로, 타이밍 옵션을 요구합니다. + 서버에 어떤 정보도 요구하지 않습니다. 아래에 설정을 지정해야 합니다. + 설정 끌어오기 DNS 서버에서 DNS 설정을 재정의합니다 - 지정한 DNS서버 사용하기 - searchDomain + 본인의 DNS 서버 사용하기 + 검색 도메인 사용할 DNS 서버. DNS 서버 - 보조 DNS 서버는 평소 DNS 서버에 접근불가시 사용됩니다. + 보조 DNS 서버는 주 DNS 서버에 닿을 수 없는 경우 사용됩니다. 보조 DNS 서버 - 받은 라우트 무시하기 - 서버로부터 받은 라우트를 무시합니다. + 푸시된 경로 무시하기 + 서버로부터 푸시된 경로를 무시합니다. VPN을 통해 모든 트래픽을 보냅니다. - 기본 라우트 사용하기 - 사용자 지정 라우트를 입력하십시오. 목적지는 CIDR 형식으로만 입력하십시오. \"10.0.0.0/8 2002::/16\"은 10.0.0.0/8 과 2002::/16 네트워크를 VPN으로 보냅니다. - VPN을 통해 라우팅되면 안되는 경로(라우트). 포함된 경로와 동일한 구문을 사용합니다. - 사용자 지정 라우트 + 기본 경로 사용하기 + 사용자 지정 경로를 입력하십시오. 목적지는 CIDR 형식으로만 입력하십시오. \"10.0.0.0/8 2002::/16\"은 10.0.0.0/8 과 2002::/16 네트워크를 VPN으로 보냅니다. + VPN을 통해 라우팅되면 안되는 경로. 포함되는 경로와 동일한 구문을 사용합니다. + 사용자 지정 경로 제외된 네트워크 로그의 자세한 정도 - 인증된 패킷은 IP와 상관없이 허용 - 플로팅 서버 허용 + 모든 IP에서 인증된 패킷 허용 + 유동 서버 허용 사용자 지정 옵션 VPN 설정 편집 VPN 프로파일 \'%s\'을 삭제할까요? - 일부 사용자 지정 ICS 이미지에서는 /dev/tun에 대한 권한이 잘못 되어 있거나 tun 모듈 자체가 누락 될 수 있습니다. CM9 이미지는 일반 설정에 있는 소유권 고치기 옵션을 사용해 보십시오. - Tun 인터페이스를 열지 못했습니다 - "오류:" + 일부 커스텀 ICS 이미지에서는 /dev/tun에 대한 권한이 잘못되어 있거나 tun 모듈 자체가 누락될 수 있습니다. CM9 이미지는 일반 설정에 있는 소유권 고치기 옵션을 사용해 보십시오. + TUN 인터페이스를 열지 못했습니다 + "오류: " 지우기 TUN 인터페이스 열기: 로컬 IPv4: %1$s/%2$d IPv6: %3$s MTU: %4$d DNS 서버: %1$s, 도메인: %2$s 경로: %1$s %2$s 제외된 경로: %1$s %2$s - VpnService 노선 설치: %1$s %2$s - 인터페이스 정보 %1$s와 %2$s에 있어, 두 번째 주소를 원격 피어 주소로 가정 하겠습니다. 로컬 IP의 넷마스크로는 /32를 사용하겠습니다. OpenVPN에 의해 주어진 모드는 \"%3$s\" 입니다. - CIDR 넷마스크가 있는 IP 라우트 %1$s 와 %2$s 에 있어서 처리가 불가능합니다. /32를 넷마스크로 사용하겠습니다. - %1$s/%2$s 에서 %3$s/%2$s로 라우트 수정 - 안드로이드 키체인 인증서에 접근할 수 없습니다. 펌웨어 업그래이드 또는 백업된 앱/앱 설정을 복구하면서 발생할 수 있습니다. 인증서에 액세스할 수 있는 권한을 다시 생성하기 위해 VPN을 편집 하고 기본 설정 아래에서 인증서를 다시 선택 하십시오. + 설치된 VpnService 경로: %1$s %2$s + 인터페이스 정보 %1$s와 %2$s를 받았고 두 번째 주소를 원격 피어 주소로 가정합니다. 로컬 IP에 대해 /32 넷마스크를 사용합니다. OpenVPN에 의해 주어진 모드는 \"%3$s\"입니다. + CIDR 넷마스크가 있는 IP 경로로서 %1$s와 %2$s를 이해할 수 없습니다. 넷마스크로 /32를 사용합니다. + %1$s/%2$s에서 %3$s/%2$s로 경로 정정 + 안드로이드 키체인 인증서에 접근할 수 없습니다. 이는 펌웨어 업그레이드 또는 앱 백업 복구, 앱 설정 복구에 의해 발생할 수 있습니다. 인증서에 접근할 수 있는 권한을 다시 생성하기 위해 VPN을 편집하고 기본 설정 아래에서 인증서를 다시 선택하십시오. %1$s %2$s 로그 파일 보내기 보내기 ICS OpenVPN 로그 파일 클립보드로 로그 복사 - Tap 모드 - Tap 모드는 루트가 아닌 VPN API에서는 불가능합니다. 따라서 본앱은 tap지원을 제공할 수 없습니다 - 또? 농담인가요? 아니요 정말로 tap 모드는 지원이 불가능합니다. 계속해서 메일을 보내면서 요구하신다고 도움될 일이 아닙니다. - 3번째로? 누군가가 송신때 레이어2 정보를 추가하고 수신때 레이어2정보를 때내는 tun을 이용한 tap 에뮬레이터를 제작할 수 있습니다. 하지만 이것만이 아닌 ARP 그리고 어쩌면 DHCP 클라이언트 까지도 구현해야합니다. 본인은 이 같은 작업을 하는 분을 알고있지 않습니다. 코딩을 시작하려고 하시는 분이 계시면 제게 연락주십시오. + TAP 모드 + TAP 모드는 루트가 아닌 VPN API에서는 불가능합니다. 따라서 본 앱은 TAP 지원을 제공할 수 없습니다 + 또? 농담인가요? 아니요. 정말로 TAP 모드는 지원이 불가능합니다. 계속해서 메일을 보내면서 요구하신다고 도움될 일이 아닙니다. + 세 번째로? 실제로는 송신 때 레이어2 정보를 추가하고 수신 때 레이어2 정보를 떼내는 TUN을 이용한 TAP 에뮬레이터를 제작하는 것이 가능합니다. 하지만 이것만이 아닌 ARP 그리고 어쩌면 DHCP 클라이언트까지도 구현해야 합니다. 본인은 이 같은 작업을 하는 분을 알고 있지 않습니다. 코딩을 시작하려고 하시는 분이 계시면 제게 연락해 주십시오. 자주 묻는 질문 로그 항목을 복사 - 단일 로그 항목을 복사 하려면 로그 항목을 누르고 계세요. 전체 로그를 복사/전송 하려면 로그 보내기 옵션을 사용하십시오. GUI에 표시 되지 않는 경우 하드웨어 메뉴 버튼를 사용하세요. - 시작으로 바로 가기 - 바탕 화면에 OpenVPN 시작 바로 가기를 배치할 수 있습니다. 당신의 homescreen 프로그램에 따라 바로 가기 또는 위젯 추가를 해야 합니다. - 당신의 이미지는 VPNService API를 지원 하지 않습니다, 죄송 합니다:( + 단일 로그 항목을 복사하려면 로그 항목을 누르고 계세요. 전체 로그를 복사/전송하려면 로그 보내기 옵션을 사용하십시오. GUI에 버튼이 표시되지 않는 경우 하드웨어 메뉴 버튼을 사용하세요. + 시작하는 바로 가기 + 바탕 화면에 OpenVPN을 시작하는 바로 가기를 배치할 수 있습니다. 당신의 홈화면 프로그램에 따라 바로 가기 또는 위젯 추가해야 합니다. + 당신의 이미지는 VPNService API를 지원하지 않습니다, 죄송합니다 :( 암호화 - 입력 암호화 방법 - OpenVPN이 사용할 암호화 암호 알고리즘을 입력 합니다. 기본 암호를 사용하려면 빈 공간으로 두십시오. - OpenVPN이 사용할 인증 다이제스트를 입력 합니다. 기본 다이제스트를 사용하려면 빈 공간으로 두십시오. + 암호화 방법 입력 + OpenVPN이 사용할 암호화 암호 알고리즘을 입력하세요. 기본 암호를 사용하려면 비워 두십시오. + OpenVPN이 사용할 인증 다이제스트를 입력하세요. 기본 다이제스트를 사용하려면 비워 두십시오. 인증/암호화 파일 탐색기 인라인 파일 @@ -138,184 +140,306 @@ ovpn 파일에서 프로파일 가져오기 가져오기 가져올 프로파일을 읽을 수 없습니다. - 설정 파일 읽기 오류 + 구성 파일 읽기 오류 프로파일 추가 - 가져온된 설정 파일에 언급 된 파일 %1$s를 찾을 수 없습니다. - 원본 %1$s에서 설정 파일 가져오기 - 구성은 UI 구성으로 매핑되지 않는 몇 가지 구성 옵션을 가지고 있습니다. 이 옵션은 사용자 정의 구성 옵션으로 추가되었습니다. 사용자 정의 구성은 아래에 표시됩니다 : - 설정 파일 읽기 완료. - 로컬 주소와 포트로 바인드 안하기 - 로컬 바인딩 안함 + 가져온 구성 파일에 언급된 파일 %1$s를 찾을 수 없습니다. + 원본 %1$s에서 구성 파일 가져오기 + 당신의 구성이 UI 구성으로 매핑되지 않은 몇 가지 구성 옵션을 가지고 있었습니다. 이 옵션은 사용자 정의 구성 옵션으로 추가되었습니다. 사용자 정의 구성은 아래에 표시됩니다: + 구성 파일 읽기 완료. + 로컬 주소와 포트로 바인드 안 하기 + 로컬 바인딩 안 함 구성 파일 가져오기 보안 고려 사항 - "OpenVPN은 보안에 민감하기 때문에 보안에 관련된 부분을 알고가는것이 현명합니다. SD 카드에 있는 데이터는 모든 앱이 읽을 수 있기 때문에 보안이 취약합니다. (이 OpenVPN 앱은 SD 카드 읽기 권한이 필요없습니다) 이 OpenVPN 앱의 데이터는 이 OpenVPN 앱만이 읽을 수 있습니다. cacert/cert/key를 파일 탐색기의 가져오기 옵션을 사용하면 데이터는 VPN 프로파일 내에 저장됩니다. 이 VPN 프로파일은 이 OpenVPN 앱만이 접근할 수 있습니다. (잊지 말고 SD 카드에 남아있는 파일들을 삭제하세요.) 접근은 이 OpenVPN 앱만 가능하더라도 데이터는 암호화가 되어 있지 않습니다. 루팅을 비롯한 다른 악의적인 방법으로 데이터를 빼낼 수 있습니다. 암호 또한 일반 텍스트로 저장되어 있습니다. pkcs12 파일은 안드로이드 keystore에 보관할 것을 강력하게 추천합니다." + "OpenVPN은 보안에 민감하기 때문에 보안에 관한 몇 가지 주의사항은 합리적입니다. SD 카드에 있는 데이터는 필연적으로 안전하지 않습니다. 모든 앱이 그것을 읽을 수 있습니다(예를 들어 이 프로그램은 특별한 SD 카드 권한을 가질 필요가 없습니다). 이 앱의 데이터는 이 앱만 읽을 수 있습니다. 파일 대화창에서 CA 인증서/인증서/키를 가져옴으로써 데이터는 VPN 프로파일 내에 저장됩니다. 이 VPN 프로파일은 이 앱만 접근할 수 있습니다. (잊지 말고 SD 카드에 남아있는 파일들을 삭제하세요.) 접근은 이 OpenVPN 앱만 가능하더라도 데이터는 암호화가 되어 있지 않습니다. 루팅이나 다른 취약점을 이용해서 데이터를 빼낼 수 있습니다. 저장된 암호 또한 일반 텍스트로 저장되어 있습니다. pkcs12 파일은 안드로이드 키 저장소에 보관할 것을 강력하게 추천합니다." 가져오기 인증서 선택 표시 오류 - 안드로이드 4.0+의 인증서 선택창을 보여주려는 과정에서 예외가 발생됐습니다. 안드로이드 4.0+의 표준 기능임으로 이 같은 일은 일어나면 안됩니다. 어쩌면 인증서 저장소에 대한 귀하의 안드로이드 ROM 지원이 깨졌습니다. + 안드로이드 4.0+의 인증서 선택 대화창을 보여주려는 과정에서 예외가 발생했습니다. 안드로이드 4.0+의 표준 기능이므로 이 같은 일은 일어나면 안 됩니다. 어쩌면 귀하의 안드로이드 롬의 인증서 저장소에 대한 지원이 깨졌을 수 있습니다. IPv4 IPv6 상태 메시지를 기다리는 중… 가져온 프로파일 가져온 프로파일 %d 깨진 이미지 - <p>공식 HTC 이미지에서는 이상한 라우팅 문제로 트래픽이 터널로 통과 하지 않는 경우가 있는것으로 알려져 있습니다 (참고 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">Issue 18</a> 버그 추적기.)</p><p>Xperia arc S 와 Xperia Ray의 공식 SONY 이미지에서는 VPNService 자체가 완전히 없어진 것으로 보고 되었습니다. (참조 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">Issue 29</a> 버그추적기.)</p><p>일부 사용자를 위해 만들어진 이미지에서는 tun 모듈자체가 없거나 /dev/tun의 권한이 틀려있기도 합니다. 일부 CM9 이미지는 \"Device specific hacks\" 아래에 있는 \"Fix ownership\" 옵션을 사용해야 합니다.</p><p>가장 중요한 부분: 만약 깨진 이미지를 사용하는 경우라면 해당 공급업체에 보고해야 합니다. 업체에 문제를 보고하는 사람들이 많아야 수정될 가능성도 높아집니다..</p> + <p>공식 HTC 이미지에서는 이상한 라우팅 문제로 트래픽이 터널로 통과하지 않는 경우가 있는 것으로 알려져 있습니다. (버그 추적기의 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">문제 18</a> 참조.)</p><p>Xperia Arc S 와 Xperia Ray의 오래된 공식 SONY 이미지에서는 VPNService 자체가 전혀 없는 것으로 보고되었습니다. (버그 추적기의 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">문제 29</a> 참조.)</p><p>커스텀 빌드 이미지에서는 tun 모듈 자체가 없거나 /dev/tun의 권한이 틀려 있기도 합니다. 일부 CM9 이미지는 \"기기별 해킹\" 아래에 있는 \"소유권 고치기\" 옵션을 사용해야 합니다.</p><p>가장 중요한 부분: 만약 깨진 이미지를 사용하는 경우라면 해당 공급 업체에 보고해야 합니다. 업체에 문제를 보고하는 사람들이 많아야 수정될 가능성도 높아집니다.</p> PKCS12 파일 암호화 키 개인 키 암호 암호 파일 아이콘 - 생성 된 설정 + TLS 인증/암호화 + 생성된 설정 설정 - /dev/tun의 소유권을 시스템으로 설정 하려고 합니다. 일부 CM9 이미지에서 VPNService API를 사용하기 위해서는 앞의 작업이 요구됩니다. root권한을 가져야합니다. - /dev/tun 소유권 문제 해결 - 생성된 OpenVPN의 설정 파일 보기 - 수정 \"%s\" - 설정 만드는중… - 이 기능을 사용하면 네트워크 상태 변환시 강제로 재접속을 합니다 (예. WIFI 로/에서 모바일) - 네트워크 변화시 재접속 + /dev/tun의 소유권을 system으로 설정하려고 합니다. 일부 CM9 이미지에서 VPNService API를 사용하기 위해서는 앞의 작업이 요구됩니다. 루트 권한을 가져야 합니다. + /dev/tun 소유권 고치기 + 생성된 OpenVPN의 구성 파일 보기 + \"%s\" 편집 + 구성 만드는 중… + 이 옵션을 켜면 네트워크 상태 변경시 강제로 재접속합니다 (예: WiFi와 모바일 상호 변경) + 네트워크 변경시 재접속 네트워크 상태: %s - CA 인증서는 일반적으로 안드로이드 Keystore에 있는것을 사용합니다. 인증서 오류 발생시 벌도의 인증서를 지정하세요. + CA 인증서는 일반적으로 안드로이드 키 저장소에 있는 것을 사용합니다. 인증서 오류 발생시 별도의 인증서를 지정하세요. 선택 - 안드로이드 keystore에서 CA 인증서를 찾지 못했습니다. Auhtentication은 실패할 것 입니다. - 연결시 로그 윈도우를 보여드립니다. 로그 윈도우는 항상 notification status에서 접근이 가능합니다. - 로그 윈도우 보기 - 안드로이드 keystore 키 %1$s: %2$s과 싸이닝 오류 - 시스템에서는 VPN연결 경고를 통해 당신에게 본앱이 모든 트래픽을 가로챌수있다는 점을 알리게 되어 있는데 이는 VPNService API가 남용하는것을 막기 위함입니다.\nVPN 연결 알림 (키 아이콘) 또한 안드로이드 시스템에서 부과하는 부분이며 이는 VPN연결을 알리는 신호입니다. 어떤 버전에서는 소리를 알림으로 사용하는 경우도 있습니다.\n안드로이드는 이같은 방법을 당신의 안전을 위해 도입하였으며 사용은 필수적입니다. (어떤 버전에서는 유감스럽게도 소리 알림 또한 포함됩니다.) + 안드로이드 키 저장소에서 CA 인증서를 찾지 못했습니다. 인증은 아마 실패할 것입니다. + 연결시 로그 창을 보여드립니다. 로그 창은 항상 알림 상태바에서 접근이 가능합니다. + 로그 창 보기 + %3$s %1$s (%2$s)에서 %10$s %9$s 작동, 안드로이드 %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) + 안드로이드 키 저장소 키로 서명 오류 %1$s: %2$s + 시스템에서는 VPN 연결 경고를 통해 당신에게 본 앱이 모든 트래픽을 가로챌 수 있다는 점을 알리게 되어 있는데 이는 VPNService API가 남용되는 것을 막기 위함입니다.\nVPN 연결 알림 (열쇠 기호) 또한 안드로이드 시스템에서 부과하는 부분이며 이는 VPN 연결을 알리는 신호입니다. 어떤 이미지에서는 이 알림이 소리를 내기도 합니다.\n안드로이드는 당신의 안전을 위해서 이 대화창을 도입했으며 회피할 수 없게 하였습니다. (어떤 이미지에서는 유감스럽게도 알림 소리 또한 포함됩니다.) 연결 경고 및 알림 소리 - 우리말 번역에 참여해주세요. - IP 와 DNS + 한국어 번역: 안규태<ktdann@gmail.com>, 강현진<peaceb> + IP와 DNS 기본 라우팅 모호한 OpenVPN 설정. 일반적으로 필요하지 않습니다. 고급 - ICS Openvpn 설정 - DNS 서버가 미사용중입니다. 이름 변환이 작동 않을 수 있습니다. 사용자 지정 DNS 서버를 설정 하십시오. 또한 안드로이드는 DNS서버가 없는 경우 모바일/Wi-Fi 연결에 저정된 프록시 설정을 계속해서 사용한다는 점을 유의하시기 바랍니다. - DNS서버 \"%1$s\" 는, 시스템에 의해 거부되 추가할 수 없습니다: %2$s - %2$s: 시스템에 의해 거부되어 IP 주소 \"%1$s\"를 설정하지 못하였습니다 - <p>문제없는 설정을 확보하세요 (당신의 컴퓨터에서 테스트 된것 또는 공급자/조직에서 다운받은)</p><p>이것이 단일 파일이며 추가 pem/pks12 파일이 없는 경우면 본인에게 이메일로 보내어 첨부파일을 열면 됩니다. 여러 파일인 경우 당신의 sd card에 넣으세요.</p><p>이메일 첨부파일을 클릭하세요/vpn목록에 있는 폴더 아이콘을 사용하여 설정 파일을 가져옵니다.</p><p>파일 누락 오류 발생시 누락된 파일을 sd card에 복사하세요.</p><p>저장 기호를 클릭하여 VPN 목록에 가져온 VPN을 추가 하세요.</p><p>VPN 이름을 클릭하여 VPN을 연결하세요.</p><p>오류 또는 경고가 로그에 있는 경우 오류/경고를 이해하여 이들을 해결하십시오.</p> + ICS Openvpn 구성 + 사용 중인 DNS 서버가 없습니다. 이름 변환이 작동하지 않을 수 있습니다. 사용자 지정 DNS 서버를 설정하는 것이 좋습니다. 또한 안드로이드는 DNS 서버가 설정되지 않은 경우 모바일/Wi-Fi 연결에 당신의 프록시 설정을 계속해서 사용한다는 점을 유의하세요. + DNS 서버 \"%1$s\"는 시스템에 의해 거부돼 추가할 수 없습니다: %2$s + 시스템에 의해 거부되어 IP 주소 \"%1$s\"를 설정하지 못하였습니다: %2$s + <p>작동하는 구성을 얻기 (당신의 컴퓨터에서 검증된 것 또는 공급자/조직에서 내려받은 것)</p><p>이것이 추가 pem/pks12 파일이 없는 단일 파일인 경우 본인에게 이메일로 보내어 첨부 파일을 열면 됩니다. 여러 파일인 경우 SD 카드에 넣으세요.</p><p>이메일 첨부 파일을 클릭하거나 또는 VPN 목록에 있는, 구성 파일을 가져오는 폴더 모양 아이콘을 사용하세요.</p><p>파일 누락 오류 발생시 누락된 파일을 SD 카드에 복사하세요.</p><p>저장 기호를 클릭하여 가져온 VPN을 VPN 목록에 추가하세요.</p><p>VPN 이름을 클릭하여 VPN에 연결하세요.</p><p>오류 또는 경고가 로그에 있는 경우 오류/경고를 이해하여 이들을 해결하십시오.</p> 빠른 시작 - 연결을 시도 하기 전에 tun.ko 커널 모듈을 로드하세요. 루팅된 장치야만 합니다. - tun 모듈 로드하기 - 설정에 있는 PKCS12를 안드로이드 keystore로 가져오기 + 연결을 시도하기 전에 tun.ko 커널 모듈을 로드합니다. 루팅된 장치이어야만 합니다. + TUN 모듈 로드하기 + 구성에 있는 PKCS12를 안드로이드 키 저장소로 가져오기 프록시 설정 가져오기 오류: %s - 프록시 %1$s %2$d 을 사용 + 프록시 %1$s %2$d를 사용 시스템 프록시를 사용 - 연결시 전 시스템 설정에 있는 HTTP/HTTPS 프록시를 사용합니다. - 이 시스템 부팅에 활성화 된 경우 OpenVPN을 지정된 VPN을 연결합니다. 안드로이드 < 5.0에이 옵션을 사용하기 전에 연결 경고 FAQ를 읽어 보시기 바랍니다. - 부팅에 연결 + 연결할 HTTP/HTTPS 프록시로 시스템 범위의 설정을 사용합니다. + OpenVPN이 시스템 부팅시에 활성화되면 지정된 VPN에 연결합니다. 안드로이드 5.0 이전 버전에 이 옵션을 사용하기 전에 연결 경고 FAQ를 읽어 보시기 바랍니다. + 부팅시 연결 무시 다시 시작 - VPN을 다시 시작한 후 설정 변경 내용이 적용 됩니다. VPN을 지금 (재)시작? - 설정 변경 - 편집을 위해 마지막으로 연결 된 프로파일을 확인할 수 없습니다. + VPN을 다시 시작한 후 구성 변경 내용이 적용됩니다. VPN을 지금 (재)시작? + 구성 변경됨 + 편집하려는 마지막으로 연결된 프로파일을 확인할 수 없습니다. 중복 알림 - 안드로이드는 시스템의 메모리 (RAM) 가 부족한 경우, 현재 필요하지 않는 앱들과 서비스들을 활성화 메모리에서 삭제합니다. 이 과정에서 진행중인 VPN 연결이 끊어 집니다. 이렇게 되지 않기 위해서 OpenVPN 서비스는 우선순위가 높게 되어 실행됩니다. 높은 우선 순위로 실행되기 위해서는 응용프로그램에서 이를 알림으로 표시해야 합니다. 키 알림 아이콘은 이전 FAQ에서 설명된 대로 시스템에서 강요하기 때문입니다. 이것은 우선 순위가 높이 실행된다는 알림에 대한 알림이 아닙니다. - VPN 프로파일이 없습니다. - 이 <img src=\"ic_menu_add\"/> 아이콘을 사용하여 VPN을 추가 하세요 - 이 <img src=\"ic_menu_archive\"/> 아이콘을 사용하여 귀하의 sdcard에서 기존 (.ovpn 또는 .conf) 프로파일을 가져오세요. - 꼭 FAQ를 확인 하세요. 빠른 시작 가이드가 있습니다. - 라우팅/인터페이스 설정 - OpenVPN을 다시 연결 하는 경우 VPN 연결 없음으로 표기하지 마십시오. + 안드로이드는 시스템의 메모리(램)가 부족한 경우, 현재 필요하지 않는 앱들과 서비스들을 활성 메모리에서 삭제합니다. 이 과정에서 진행중인 VPN 연결이 끊어집니다. 이렇게 되지 않기 위해서 OpenVPN 서비스는 더 높은 우선 순위로 실행됩니다. 더 높은 우선 순위로 실행되기 위해서는 앱이 알림을 표시해야 합니다. 열쇠 알림 아이콘은 이전 FAQ에서 설명된 대로 시스템에서 강요하는 것입니다. 이것은 더 높은 우선 순위로 실행되기 위한 앱 알림이 아닙니다. + 정의된 VPN 프로파일이 없습니다. + 이 <img src=\"ic_menu_add\"/> 아이콘을 사용하여 VPN을 추가하세요 + 이 <img src=\"ic_menu_archive\"/> 아이콘을 사용하여 귀하의 SD 카드에서 기존 (.ovpn 또는 .conf) 프로파일을 가져오세요. + 꼭 FAQ를 확인하세요. 빠른 시작 가이드가 있습니다. + 라우팅/인터페이스 구성 + 라우팅 및 인터페이스 구성은 기존 ifconfig/route 명령을 통하지 않고 VPNService API를 사용하여 수행됩니다. 그 결과 다른 OS와 다른 라우팅 구성이 생깁니다.\nVPN 터널의 구성은 IP 주소와 이 인터페이스를 통해 라우팅되어야 하는 네트워크들로 이루어져 있습니다. 특히 피어 파트너 주소 또는 게이트웨이 주소가 필요하거나 요구되지 않습니다. VPN 서버에 이르는 특수 경로들(예컨대 redirect-gateway 사용시 추가되는 것)도 필요하지 않습니다. 따라서 앱은 구성을 가져올 때 이러한 설정을 무시합니다. 이 앱은 VPNService API를 사용하여 서버에 대한 연결이 VPN 터널을 통해 라우팅되지 않도록 합니다.\nVPNService API는 VPN을 통해 라우트하지 않아야 할 네트워크들을 지정하는 걸 허용하지 않습니다. 우회 방법으로서 앱이 터널을 통해 라우팅해서는 안 되는 네트워크들(예: route x.x.x.x y.y.y.y net_gateway)을 감지하고 다른 플랫폼의 동작을 모방하기 위해 이 경로들을 제외한 일련의 경로들을 계산합니다. 로그 창은 연결을 수립할 때 VPNService의 설정을 보여줍니다.\n무대 뒤에서: Android 4.4 이상은 정책 라우팅을 사용합니다. route/ifconfig를 사용해선 설치된 경로를 볼 수 없을 것입니다. 대신 ip rule, iptables -t mangle -L을 사용하십시오. + OpenVPN을 다시 연결할 때 VPN 연결이 없는 상태로 빠지지 않습니다. 지속적인 TUN OpenVPN 로그 - OpenVPN 설정 가져오기 + OpenVPN 구성 가져오기 배터리 소모 - 제 개인적인 테스트에서 Openvpn의 높은 배터리 소비에 대한 주요 이유는 keepalive 패킷 때문이었습니다. 대부분의 OpenVPN 서버 설정에는 \'keepalive 10 60\' 와 같은 문구가 있는데 이는 클라이언트에서 서버로 서버에서 클라이언트로 keepalive 패킷을 10 초 마다 보냅니다. <p> 이러한 패킷은 작고 많은 트래픽을 사용 하지 않습니다만 이들은 모바일 라디오 네트워크를 계속 유지하게 만들게되고 따라서 에너지 소비를 증가 합니다. (참조 <a href=\"http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\">The Radio State Machine | Android Developers</a>) <p> 이 keepalive 설정을 클라이언트에서 변경할 수 없습니다. OpenVPN의 시스템 관리자만 설정을 변경할 수 있습니다. <p> 불행히도 udp를 사용할때 keepalive값을 60초 이상으로 하면 일부의 NAT 게이트웨이에서는 비활성 타임아웃 때문에 연결을 끊어버리게 됩니다. TCP와 긴 keepalive 만료기간을 함께 사용할 수는 있지만 패킷 손실이 높은 연결구간에서는 TCP over TCP의 성능이 매우 저조합니다. (참조 <a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">왜 TCP를 통한 TCP는 안좋은 방법인지</a>) - 안드로이드 테더링 기능 (WiFi, USB 또는 블루투스를 통한)과 VPNService API (이 프로그램에서 사용됨)는 함께 작동 하지 않습니다. 자세한 내용은 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=34\">issue #34</a> 를 참조 하십시오 + 제 개인적인 테스트에서 Openvpn의 높은 배터리 소비에 대한 주요 이유는 keepalive 패킷 때문이었습니다. 대부분의 OpenVPN 서버 설정에는 \'keepalive 10 60\' 와 같은 문구가 있는데 이는 클라이언트에서 서버로 서버에서 클라이언트로 keepalive 패킷을 10 초마다 보냅니다. <p>이러한 패킷은 작고 많은 트래픽을 사용하지 않습니다만 이들은 모바일 라디오 네트워크를 계속 유지하게 만들게 되고 따라서 에너지 소비가 증가합니다. (참조 <a href=\"http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\">The Radio State Machine | Android Developers</a>) <p>이 keepalive 설정을 클라이언트에서 변경할 수 없습니다. OpenVPN의 시스템 관리자만 설정을 변경할 수 있습니다. <p>불행히도 udp를 사용할 때 keepalive값을 60 초 이상으로 하면 일부의 NAT 게이트웨이에서는 비활성 타임아웃 때문에 연결을 끊어버리게 됩니다. TCP와 긴 keepalive 만료기간을 함께 사용할 수는 있지만 패킷 손실이 높은 연결 구간에서는 TCP over TCP의 성능이 매우 저조합니다. (참조 <a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">왜 TCP를 통한 TCP는 안 좋은 방법인가</a>) + 안드로이드의 (WiFi, USB 또는 블루투스를 통한) 테더링 기능과 (이 프로그램에서 사용되는) VPNService API 는 함께 작동하지 않습니다. 자세한 내용은 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=34\">문제 #34</a>를 참조하십시오 VPN과 테더링 - 다시 연결 + 연결 재시도 다시 연결 설정 - 연결 시도 사이의 기다리는 초단위 주기 입니다. - 연결과 연결 사이의 초단위 기간 - OpenVPN이 예기치 않게 종료됐습니다. 메인 메뉴에 있는 미니 덤프 보내기 옵션의 사용을 고려 하시기 바랍니다 + 연결 시도 사이에 대기하는 초 단위 시간입니다. + 연결 사이의 초 단위 시간 + OpenVPN이 예기치 않게 종료됐습니다. 메인 메뉴에 있는 미니 덤프 보내기 옵션의 사용을 고려하시기 바랍니다. 미니 덤프를 개발자에게 보내기 - 개발자에게 마지막 비정상종료에 대한 디버깅 정보를 보냅니다 + 개발자에게 마지막 비정상 종료에 대한 디버깅 정보를 보냅니다 OpenVPN - %s %1$s - %2$s %1$s - %3$s, %2$s 연결중 서버 응답 대기중 인증중 - 클라이언트 구성 가져오는중 + 클라이언트 구성 가져오는 중 IP 주소 할당중 - 노선 추가중 + 경로 추가중 연결됨 연결 끊기 재연결중 종료중 - 실행안됨 - 호스트명 찾는중 + 실행 안 됨 + 호스트 이름 변환중 연결중 (TCP) 인증 실패 사용 가능한 네트워크 대기중 - 연결 되지 않음 + ↓%2$s %1$s - ↑%4$s %3$s + 연결되지 않음 VPN %s 연결중 VPN %s 연결중 - 일부 버전의 안드로이드 4.1에서는 키 인증서의 이름에 비 영숫자 문자(공백, 밑줄 또는 대시)가 포함 된 경우 문제가 있습니다. 특수 문자 없는 인증서를 다시 가져와 시도해보세요 + 일부 버전의 안드로이드 4.1에서는 키 저장소 인증서의 이름에 비영숫자 문자(공백, 밑줄 또는 대시)가 포함된 경우 문제가 있습니다. 특수 문자 없는 인증서를 다시 가져와 보세요. 암호화 암호 패킷 인증 - 패킷 인증 방법을 입력한다 - 개발자 %s + 패킷 인증 방법 입력 + %s가 빌드 디버그 빌드 공식 빌드 프로파일에 복사 크래시 덤프 추가 - 설정 파일 보내기 + 구성 파일 보내기 완전한 DN - 가져온 구성에는 다른 DN 형식을 사용하는 오래된 tls-remote옵션이 있는데 이는 더이상 지원되지 않습니다. - RDN (common 이름) + 가져온 구성에는 다른 DN 형식을 사용하는 오래된 tls-remote 옵션이 있는데 이는 더이상 지원되지 않습니다. + RDN (공통 이름) RDN 접두사 - tls-remote (지원 되지 않음) - http://crowdin.net/project/ics-openvpn/invite를 방문 하여 번역을 도울 수 있습니다 - %1$s 이(가) %2$s 을(를) 제어하려고 시도 - 다음 진행으로, 당신은 OpenVPN for Android 응용프로그램에게 완벽한 제어권과 모든 네트워크 트래픽을 가로챌 수 있는 권한을 허락합니다. 앱을 신뢰하지 않는다면 허락하지 마십시오. 그렇지 않으면, 당신은 당신의 데이터를 악성 소프트웨어에게 빼앗길 수 있습니다.\" - 나는 이 프로그램을 신뢰합니다. - 어떤 응용 프로그램도 외부 API를 사용할 수 없습니다 + tls-remote (지원되지 않음) + http://crowdin.net/project/ics-openvpn/invite 를 방문하여 번역을 도울 수 있습니다 + %1$s가 %2$s를 제어하려고 합니다 + 계속 진행하면, 당신은 해당 앱에 OpenVPN for Android의 완벽한 제어권과 모든 네트워크 트래픽을 가로챌 수 있는 권한을 허락합니다.그 앱을 신뢰하지 않는다면 허락하지 마십시오. 그렇지 않으면 악성 소프트웨어가 당신의 데이터를 유출할 수 있습니다. + 나는 이 앱을 신뢰합니다. + 어떤 앱도 외부 API를 사용할 수 없습니다 허용된 앱: %s - 허용된 외부 앱의 목록을 삭제하겠습니까?\n현재 허용된 외부 앱:\n\n%s - \"화면이 꺼져있을때 60초동안 64kB 미만의 데이터가 전송되면 VPN 일시정지. \"Persistent Tun\" 옵션이 활성화되어 있으면 VPN 일시 정지시 당신의 장비는 네트워크가 끊어 집니다. \"Persistent Tun\" 옵션이 없는 경우 장비는 VPN 연결/보호를 잃습니다. + 허용된 외부 앱 목록을 비우겠습니까?\n현재 허용된 외부 앱:\n\n%s + \"화면이 꺼져 있고 60 초 동안 64kB 미만의 데이터가 전송되면 VPN 일시 정지. \"지속적인 TUN\" 옵션이 활성화되어 있으면 VPN 일시 정지시 당신의 장비는 네트워크 연결이 없는 상태가 됩니다. \"지속적인 TUN\" 옵션이 없는 경우 기기는 VPN 연결/보호를 잃습니다. 화면 꺼짐 후 VPN 연결 일시 정지 - 화면이 꺼진 상태에서 일시 중지: %2$ss에서 %1$s 미만 - 경고: 이 VPN은 persistent tun이 비활성화 되어있습니다. 화면이 꺼졌을 때 트래픽은 터널을 사용하지 않고 인터넷을 바로 사용합니다. + 화면이 꺼진 상태에서 연결 일시 정지: %2$s 초 안에 %1$s 미만 + 경고: 이 VPN은 지속적인 TUN이 비활성화 되어있습니다. 화면이 꺼졌을 때 트래픽은 터널을 사용하지 않고 보통 인터넷을 사용합니다. 암호 저장 - VPN 일시중지 + VPN 일시 정지 VPN 재개하기 - VPN 일시 정지 사용자의 요청 - VPN 일시정지됨 - 화면 끄기 - 장치 관련 Hacks - 인증서 정보를 표시 할 수 없습니다 - 응용 프로그램 동작 + 사용자가 요청한 VPN 일시 정지 + VPN 일시 정지됨 - 화면 끄기 + 기기별 해킹 + 인증서 정보를 표시할 수 없습니다 + 앱 동작 VPN 동작 - VPN 프로필에 대한 변경을 허용 - 하드웨어 키 스토어: - 응용 프로그램의 아이콘이 OpenVPN for Android를 사용 하려고함 - "안드로이드 4.3부터는 VPN 확인이 \"overlaying apps\"로 부터 보호 받게 됩니다. 따라서 입력창이 터치 입력에 반응하지 않을 수 있습니다. 사용하는 앱중에서 overlay를 사용하는 경우 이러한 문제가 발생될수있습니다. 문제의 앱을 제작한 프로그램어를 연락하십시오. 이 문제는 안드로이드 4.3과 이상의 버전에서 모든 VPN 응용 프로그램에 영향을 줍니다. <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\">Issue 185<a> 참조" - 안드로이드 4.3과 이후 버전에서의 VPN 확인 창 - 또는 당신은 플레이 스토어와 나에게 기부금을 보낼 수 있습니다: - %s 님! 기부 감사합니다 + VPN 프로파일 변경을 허용 + 하드웨어 키 저장소: + OpenVPN for Android를 사용하려고 하는 앱의 아이콘 + "안드로이드 4.3부터는 VPN 확인이 \"오버레이하는 앱\"으로부터 보호받습니다. 이 경우 대화창이 터치 입력에 반응하지 않게 됩니다. 사용하는 앱 중에서 오버레이를 사용하는 경우 이러한 문제가 발생될 수 있습니다. 문제의 앱을 발견하면 그 앱의 제작자에게 연락하십시오. 이 문제는 안드로이드 4.3과 이상의 버전에서 모든 VPN 앱에 영향을 줍니다. 상세한 사항은 <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\">문제 185<a> 참조" + VPN 확인 대화창 + 또는 당신은 플레이 스토어에서 나에게 기부금을 보낼 수 있습니다: + %s를 기부해 주셔서 감사합니다! 로그가 삭제되었습니다. - 비밀 번호 표시 + 암호 표시 키체인 접근 오류: %s - 짧은 + 간결하게 ISO 타임 스탬프 없음 업로드 다운로드 - Vpn 상태 + VPN 상태 옵션 보기 - 처리 되지 않은 예외: %1$s\n\n%2$s + 처리되지 않은 예외: %1$s\n\n%2$s %3$s: %1$s\n\n%2$s - 전체 라이센스 + 만약 당신의 안드로이드 기기가 루팅되어 있다면 <a href=\"http://xposed.info/\">Xposed framework</a>와 <a href=\"http://repo.xposed.info/module/de.blinkt.vpndialogxposed\">VPN Dialog confirm module</a>을 자신의 책임 하에 설치할 수 있습니다. + 전체 라이선스 + 로컬 네트워크에 직접 연결된 인터페이스는 VPN을 통해 접속하지 않습니다. 이 옵션의 선택을 취소하면 로컬 네트워크의 모든 트래픽이 VPN으로 리디렉션됩니다. + 로컬 네트워크에선 VPN 우회 사용자 이름/암호 파일 - %s 에서 가져옴 - MSS override의 값은 0과 9000 사이의 정수이어야합니다 + [%s에서 가져옴] + 일부 파일을 찾을 수 없습니다. 프로파일을 가져올 파일을 선택하십시오: + 이 앱을 사용하려면 OpenVPN을 지원하는 VPN 공급자/VPN 게이트웨이가 필요합니다(종종 고용주가 제공함). OpenVPN에 대한 자세한 내용과 자신의 OpenVPN 서버를 설정하는 방법은 http://community.openvpn.net/ 를 참조하십시오. + 로그 가져 오기: + VPN 토폴로지 \"%3$s\"가 지정되었지만 ifconfig %1$s %2$s는 네트워크 마스크가 있는 IP 주소와 더 유사합니다. \"subnet\" 토폴로지를 가정합니다. + MSS 재정의 값은 0과 9000 사이의 정수이어야 합니다 + MTU 재정의 값은 64과 9000 사이의 정수이어야 합니다 + 송신 패킷을 OpenVPN이 캡슐화하여 만들어지는, OpenVPN이 피어에게 보낼 UDP 패킷 크기가 이 바이트 수를 넘지 않도록 송신 패킷 크기를 제한하도록 터널 상의 TCP 세션들에 알립니다. (기본값 1450) + TCP 페이로드의 MSS 값 재정의 + TCP 페이로드의 MSS 설정 + 클라이언트 동작 + 허용된 외부 앱 비우기 로드 중... VPN을 사용할 앱들: %1$s VPN을 사용하지 않을 앱들: %1$s + %s 패키지가 더이상 설치되어 있지 않으며 앱 허용/거부 목록에서 제거함 + VPN은 모든 앱에 사용되지만 선택된 앱은 제외합니다. + VPN은 선택된 앱에만 사용됩니다. + 원격 서버 항목을 제거하시겠습니까? 유지 삭제 + 새 원격 서버 추가 + 연결시 임의의 순서로 연결 항목을 사용 + 하나 이상의 원격 서버를 정의하고 활성화해야 합니다. + 서버 목록 + 허용된 앱 + 고급 설정 페이로드 옵션 TLS 설정 + 정의된 원격 서버 없음 + VPN 프로파일 복제 + 프로파일 복제: %s + 로그 보기 + Android용 OpenVPN 클라이언트가 여러 개 있습니다. 가장 일반적으로 사용되는 것은 OpenVPN for Android (이 클라이언트), OpenVPN Connect 및 OpenVPN Settings입니다. <p>클라이언트들을 두 그룹으로 나눌 수 있습니다. OpenVPN for Android와 OpenVPN Connect는 공식 VPNService API(Android 4.0 이상)를 사용하고 루트가 필요하지 않으며 OpenVPN Settings는 루트를 사용합니다.<p>OpenVPN for Android는 오픈 소스 클라이언트이며 Arne Schwabe에 의해 개발되었습니다. 고급 사용자를 대상으로 하며 많은 설정을 제공하고 파일에서 프로필을 가져오고 앱 내에서 프로필을 구성/변경하는 기능을 제공합니다. 이 클라이언트는 OpenVPN의 커뮤니티 버전을 기반으로 하는데 OpenVPN 2.x 소스 코드를 기반으로 합니다. 이 클라이언트는 커뮤니티의 반 공식 클라이언트로 볼 수 있습니다. <p>OpenVPN Connect는 OpenVPN Technologies, Inc.에서 개발한 비공개 소스 클라이언트입니다. 이 클라이언트는 일반 사용을 목적으로 하고 평균적인 사용자를 대상으로 하며 OpenVPN 프로파일을 가져올 수 있습니다. 이 클라이언트는 OpenVPN 프로토콜의 OpenVPN C++ 재구현을 기반으로 합니다(이는 OpenVPN Technologies, Inc.에서 iOS용 OpenVPN 앱을 내놓는 데 필요했습니다). 이 클라이언트는 OpenVPN 기술의 공식 클라이언트입니다. <p>OpenVPN Settings는 이 클라이언트들 중 가장 오래된 클라이언트이며 오픈 소스 OpenVPN의 UI입니다. OpenVPN for Android와 달리 루트가 필요하며 VPNService API를 사용하지 않습니다. Android 4.0 이상에 의존하지 않습니다. 안드로이드 OpenVPN 클라이언트 간의 차이 + 멀티캐스트 경로 무시​​: %s + Android는 VPN에 대한 CIDR 경로만 지원합니다. 비 CIDR 경로는 거의 사용되지 않기 때문에 OpenVPN for Android는 CIDR이 아닌 경로에 /32를 사용하고 경고를 보냅니다. + 테더링은 VPN이 활성화되어있는 동안 작동합니다. 테더링된 연결은 VPN을 사용하지 않을 것입니다. + 초기 킷캣 버전은 TCP 연결에서 잘못된 MSS 값을 설정합니다(# 61948). 이 버그를 우회하려면 MSS 재정의 옵션을 활성화하십시오. + Android는 DNS 서버가 설정되지 않은 경우 모바일/Wi-Fi 연결에 지정된 프록시 설정을 계속 사용합니다. OpenVPN for Android는 로그에 이에 대해 경고할 것입니다.

VPN이 DNS 서버를 설정할 때 안드로이드는 프록시를 사용하지 않을 것입니다. VPN 연결을 위한 프록시를 설정하는 API는 없습니다.

+ VPN 앱이 제거되고 다시 설치되면 작동을 멈출 수 있습니다. 자세한 내용은 #80074를 참조하십시오. + 구성된 클라이언트 IP와 해당 네트워크 마스크에 있는 IP들은 VPN으로 라우팅되지 않습니다. OpenVPN은 클라이언트 IP와 넷마스크에 해당하는 경로를 명시적으로 추가함으로써 이 버그를 우회합니다. + 지속적인 TUN 지원에 사용되는 다른 TUN 장치가 활성화된 상태에서 한 TUN 장치를 열면 기기의 VPNServices가 죽습니다. VPN을 다시 작동 시키려면 재부팅해야 합니다. OpenVPN for Android는 TUN 장치를 다시 열지 않으려고 시도합니다. 정말 필요하면 충돌이 발생하지 않도록 새로운 TUN 장치를 열기 전에 먼저 현재 TUN을 닫습니다. 이 경우 짧은 순간 VPN이 아닌 연결을 통해 패킷이 전송될 수 있습니다. 이 우회 방법으로도 VPNServices가 죽고 기기를 재부팅해야 하는 경우가 있습니다. + VPN은 부차적인 사용자에게는 전혀 작동하지 않습니다. + "여러 사용자가 VPN 앱을 사용하는 동안 모바일 연결/모바일 데이터 연결이 자주 끊어지는 것으로 보고합니다. 이 반응은 일부 모바일 공급자/기기 조합에만 영향을 미치는 것으로 보이며 지금까지 버그에 대한 원인/해결 방법을 알 수 없습니다." + VPN 없이 도달할 수 있는 목적지만 VPN을 통해서 도달할 수 있습니다. IPv6 VPN은 전혀 작동하지 않습니다. + 비 CIDR 경로 + VPN을 위한 프록시 동작 + VPN 앱들을 재설치 + %s 및 이전 버전 + %s의 사본 + 구성된 IP 주소로의 경로 + VPN 연결에 대한 잘못된 MSS 값 + 부차적인 태블릿 사용자들 + 사용자 지정 연결별 옵션을 지정하십시오. 조심해서 사용하십시오. + 사용자 지정 옵션 + 연결 항목 제거 + 모바일 네트워크에서 임의 연결 해제 + 원격 네트워크에 도달할 수 없음 + 지속적인 TUN 모드 + %s 및 이후 버전 + SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure로 연결 실패 + 새로운 OpenVPN for Android 버전들(0.6.29/2015년 3월)은 허용된 암호화 스위트(tls-cipher \"DEFAULT:!EXP:!PSK:!SRP:!kRSA\")에 더 안전한 기본값을 사용합니다. 안타깝게도 보안 수준이 낮은 암호화 스위트와 수출용 암호화 스위트를 생략하면, 특히 완벽 전달 보안(Diffie-Hellman)을 지원하지 않는 암호화 스위트를 생략하면 몇 가지 문제가 발생합니다. 이것은 보통 불필요한 요소를 제거한 SSL(예: MikroTik)을 쓰는 서버나 몇 임베디드 OS에서 tls-cipher을설정하여 TLS 보안을 강화하려는 좋은 의도를 가지고 했으나 불완전하게 실행됨으로써 발생합니다.\n이 문제를 해결하려면 서버에서 tls-cipher 설정을 tls-cipher \"DEFAULT:!EXP:!PSK:!SRP:!kRSA\"와 같은 적절한 기본값으로 설정하십시오. 클라이언트에서 문제를 우회하려면 안드로이드 클라이언트의 tls-cipher DEFAULT 사용자 정의 옵션을 추가하십시오. + 이 프로파일은 외부 앱(%s)에서 추가되었으며 사용자가 편집할 수 없음으로 표시되었습니다. + 인증서 폐기 목록 + OpenVPN 서비스 재시작 (앱이 메모리 부족으로 죽었거나 강제 종료된 것으로 추정) + 구성 가져오기에서 오류가 발생했습니다. 저장할 수 없습니다. + 검색 + (마지막 덤프는 %1$d시간 %2$d분 이전 (%3$s)) + 새 연결에 로그 지우기 + 연결 시간 초과 + 허용된 앱이 추가되지 않았습니다. 모든 앱을 허용하지 않으려면 허용된 앱 목록에 앱이 하나 이상 있어야 하므로 이 앱 자신(%s)을 추가합니다. + OpenVPN for Android는 자동으로 SD 카드에서 누락된 파일을 검색할 수 있습니다. 이 메시지를 탭하여 권한 요청을 시작하십시오. + 프로토콜 + 사용 + 이 장치의 고유 ABI 우선 순위(%1$s)와 고유 라이브러리가 보고한 ABI(%2$s)가 불일치 + 운영체제에 의해 취소된 VPN 권한(예: 다른 VPN 프로그램 시작됨), VPN 중지 + 피어 정보 푸시 + 서버에 추가 정보 전송 (예: SSL 버전 및 안드로이드 버전) + %1$s이 필요함 + 프로파일 %1$s의 암호를 입력하십시오 + 인라인 데이터 사용 + 구성 파일 내보내기 + tls-auth 파일이 누락되었습니다 + 사용자 인증서 또는 사용자 인증서 키 파일 누락됨 + CA 인증서 누락됨 + 인증서 폐기 목록 (선택 사항) + 로그 캐시 파일에서 항목(%d 개)을 다시 읽습니다 + 삼성 휴대폰이 가장 많이 판매되는 안드로이드폰 중 하나이지만, 삼성의 펌웨어는 가장 버그가 많은 안드로이드 펌웨어 중 하나입니다. 버그는 이러한 기기에서의 VPN 작업에만 국한되지 않지만 그 중 많은 수를 우회할 수 있습니다. 다음은 일부 버그에 대한 설명입니다.\n\nDNS는 VPN 범위의 DNS 서버가 아니면 작동하지 않습니다.\n\n많은 삼성 5.x 기기에서 허용/허용되지 않는 앱 기능이 작동하지 않습니다.\n삼성 6.x 기기에서는 VPN 앱이 절전 기능에서 제외되지 않으면 VPN이 작동하지 않는 것으로 보고됩니다. + 삼성 휴대폰 + VPN이 선택되지 않았습니다. + 기본 VPN + 기본 VPN이 필요한 장소(현재로는 부팅 중에 켜기와 연결 유지, 빠른 설정 타일)에서 사용될 VPN + 현재 선택된 VPN: \'%s\' + 다시 연결 + VPN 토글 + %s에 연결 + %s 연결 끊기 + 연결 시도 사이의 최대 시간을 입력하십시오. OpenVPN은 매 연결 시도 실패 후 대기 시간을 이 값까지 천천히 올립니다. 기본값은 300 초입니다. + 연결 시도 사이의 최대 시간 + 연결 시도 사이에 %s 초 기다림 + 네트워크 더보기 .. -> VPN을 확인하세요.]]> + OpenVPN에 대한 연결이 끊어졌습니다 (%s) + 정렬 변경 + 정렬 + 최근 사용 순으로 프로파일 정렬 + 이름 순으로 프로파일 정렬 + 구성이 2.3에서 제거될 것으로 표시되었고 2.4에서 완전히 제거된 tls-remote 옵션을 사용합니다 + AUTH_FAILED에 대한 동작 + 그래프 + 로그 스케일 사용 + 데이터가 충분하지 않습니다 + 시간당 평균 + 분당 평균 + 지난 5 분 + 들어옴 + 나감 + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-nl/strings-icsopenvpn.xml b/app/src/main/res/values-nl/strings-icsopenvpn.xml index 838ae5b9..05a1f54c 100755 --- a/app/src/main/res/values-nl/strings-icsopenvpn.xml +++ b/app/src/main/res/values-nl/strings-icsopenvpn.xml @@ -68,6 +68,7 @@ Verwacht TLS server-certificaat Controleert de externe server certificaathouder Controleer Certificaat Hostname + Specificeer de controle die gebruikt wordt om het externe certificaat DN te controleren (bijv. C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de) \n\nSpecificeer de complete DN of de RDN (openvpn.blinkt.de in het voorbeeld) of een RDN-voorvoegsel voor verificatie. \n\nWanneer het gebruikte RDN-voorvoegsel \"Server\" overeenkomt met \"Server-1\" en \"Server-2\"\n\nEen leeg tekstveld zorgt dat de RDN wordt gecontroleerd tegen de hostnaam van de server.\n\nVoor meer details zie de OpenVPN 2.3.1+ manpage onder -verify-x509-naam Externe certificaathouder Activeert TLS Key verificatie TLS Auth Bestand @@ -96,14 +97,20 @@ Aangepaste Opties VPN Instellingen Bewerken De VPN-profiel \'%s\' verwijderen? + Op sommige aangepaste ICS-afbeeldingen kunnen de rechten op /dev/tun verkeerd zijn, of de tun module kan volledig ontbreken. Voor CM9-afbeeldingen, probeer de optie herstel eigendom onder algemene instellingen Fout bij het openen van de tun interface "Fout:" Leeg maken Openen tun interface: Lokaal IPv4: %1$s/%2$d IPv6: %3$s MTU: %4$d + DNS Server: %1$s, Domein: %2$s Routes: %1$s %2$s Uitgesloten routes: %1$s %2$s VpnService routes geïnstalleerd: %1$s %2$s + Gekregen interface informatie %1$s en %2$s, ervan uitgaande dat tweede adres het peer-adres van remote is. Gebruik /32 netmask voor lokaal IP. De modus die door OpenVPN wordt gegeven is \"%3$s\". + Begrijp %1$s en %2$s niet als IP-route met CIDR-netmasker, en /32 als netmask gebruiken. + Gecorrigeerde route van %1$s/%2$s naar %3$s/%2$s + Geen toegang tot de Android Keychain certificaten. Dit kan veroorzaakt worden door een upgrade van de firmware or door het herstellen van een backup van de app/appinstellingen. Pas de VPN-configuratie aan en selecteer opnieuw het certificaat onder basisintellingen om de opslagtoestemming opnieuw te verlenen om het certificaat te laden. %1$s %2$s Logboek verzenden Verzenden @@ -114,21 +121,37 @@ Alweer? Maak je een grapje? Nee, tap mode wordt echt niet ondersteund en meer mails sturen met het verzoek of het ondersteund kan worden zal echt niet helpen, dus Neen. Veelgestelde vragen Loggegevens aan het kopiëren + Om een logboekvermelding te kopiëren, houd de vermelding lang ingedrukt. Om het hele logboek te kopiëren, gebruik de \'Verstuur Logboek\' optie. Gebruik de hardwaretoets als de knop niet zichtbaar is in de interface. Snelkoppeling naar start + U kunt een snelkoppeling plaatsen om OpenVPN vanaf uw startscherm te starten. Afhankelijk van uw startscherm moet u een snelkoppeling of een widget toevoegen. + Uw afbeelding ondersteunt geen VPNService API, sorry :( Codering Codering methode + Voer het encryptie-cijfer algoritme in dat door OpenVPN wordt gebruikt. Laat leeg om het standaard cijfer te gebruiken. + Voer de authenticatieverdeling in die gebruikt wordt voor OpenVPN. Laat leeg om de standaard verdeling te gebruiken. + Authenticatie/Encryptie + Bestandsbeheer + Fout bij het importeren van het bestand + Kan bestand niet importeren vanuit het bestandssysteem + [[Inline bestand data]] + Weigering om tun apparaat zonder IP-informatie te openen Importeer profiel van ovpn bestand Import + Kon het profiel niet lezen om te importeren Fout bij het lezen van het configuratiebestand Profiel toevoegen Kon het bestand %1$s, zoals aangegeven in de geïmporteerde configuratie niet vinden Geïmporteerde configuratie bestand uit %1$s + Uw configuratie heeft een paar configuratieopties die niet gekoppeld zijn aan User Interface configuraties. Deze opties werden toegevoegd als aanpasbare configuratieopties. De aanpasbare configuratie wordt hieronder weergegeven: Lezen van configuratie bestand afgesloten. + Verbindt niet met lokaal adres en poort Geen locale binding configuratie bestand importeren Beveiligingsoverwegingen + "Omdat OpenVPN beveiligingsgevoelig is, zijn enkele notities over beveiliging zinvol. Alle gegevens op de sdcard zijn inherent onzeker. Elke app kan het lezen (bijv. Dit programma heeft geen speciale sd-kaartrechten nodig). De gegevens van deze applicatie kunnen alleen worden gelezen door de toepassing zelf. Door de invoeroptie voor cacert/cert/key in het bestandsdialoog te gebruiken worden de gegevens opgeslagen in het VPN-profiel. De VPN-profielen zijn alleen toegankelijk door deze toepassing. (Vergeet niet de kopieën op de sd kaart daarna te verwijderen). Hoewel deze alleen door deze applicatie alleen toegankelijk zijn, is de data nog steeds ongecodeerd. Door de telefoon te rooten of andere exploits te gebruiken kan het mogelijk zijn om de gegevens terug te halen. Opgeslagen wachtwoorden worden ook in gewone tekst opgeslagen. Voor pkcs12-bestanden is het sterk aan te bevelen dat je ze importeert in de Android-keystore." Importeren Fout bij het weergeven van de certificaat selectie + Er is een uitzondering gevonden om het dialoogvenster Android 4.0+ certificaat te laten zien. Dit mag nooit gebeuren, aangezien dit een standaard functionaliteit van Android 4.0+ is. Misschien werkt uw Android ROM-ondersteuning voor certificaatopslag niet meer IPv4 IPv6 Wachten op status bericht… @@ -139,8 +162,10 @@ Privé Sleutel Wachtwoord Wachtwoord bestands pictogram + TLS Authenticatie/Encryptie Gegenereerde Configuratie Instellingen + Probeert de eigenaar van /dev/tun naar het systeem in te stellen. Sommige CM9-beelden hebben dit nodig om de VPNService API te laten werken. Vereist Root toegang. Verbeter eigendom van /dev/tun Toont het gegenereerde OpenVPN configuratiebestand Bewerken van \"%s\" @@ -148,11 +173,15 @@ Het inschakelen van deze optie zal opnieuw verbinden na het veranderen van de netwerk status (bijv. van WiFi naar mobiel) forceren Opnieuw verbinden na netwerkverandering Netwerk status: %s + De CA-certificaat wordt meestal teruggestuurd vanuit de Android-keystore. Geef een apart certificaat op als u certificaatverificatiefouten krijgt. Selecteer Toon logboekvenster Fout bij het ondertekenen met Android keystore sleutel %1$s: %2$s Verbindingswaarschuwing en meldingsgeluid IP en DNS + Basis + Route + Vreemde OpenVPN-instellingen. Normaal niet nodig. Geanvanceerd ICS Openvpn configuratie Snelle start @@ -178,14 +207,19 @@ OpenVPN - %s Aan het verbinden Wachten op antwoord van de server + Inloggen Clientconfiguratie ophalen IP-addressen toewijzen + Routes toevoegen Verbonden Verbinding verbreken Opnieuw aan het verbinden Afsluiten Niet actief + Hostnamen omzetten Aan het verbinden (TCP) + Inloggen mislukt + Wachten op bruikbaar netwerk Niet verbonden Verbinding maken met VPN %s Verbinding maken met VPN %s @@ -198,35 +232,57 @@ Verstuur configureerbestand Volledige DN RDN voorvoegsel + U kunt helpen met vertalen door naar https://crowdin.net/project/ics-openvpn/invite te gaan + Ik vertrouw deze applicatie. Toegestane apps: %s + Verbinding pauzeren als het scherm uit staat: minder dan %1$s in %2$ss Wachtwoord opslaan Pauzeer VPN Hervat VPN + VPN-onderbreking aangevraagd door gebruiker VPN gepauzeerd - scherm uit + Apparaatspecifieke trucks + Certificaatinformatie kan niet worden weergegeven + Applicatiegedrag VPN gedrag + Verandering aan VPN-profielen toestaan + Miniatuur van app die OpenVPN voor Android wilt gebruiken + "Vanaf Android 4.3 is de VPN-bevestiging beveiligd tegen apps die over andere apps tekenen. Dit betekent dat het dialoogvenster niet reageert op aanrakingen. Als u een app heeft die over andere apps tekent kan dit de oorzaak zijn. Als u een app vind die dit doet, neem dan contact op met de makers van de app. Dit probleem heeft betrekking op alle VPN applicaties op Android 4.3 en later. Zie ook <a href=\"https://github.com/schwabe/ics-openvpn/issues/185\">Issue 185<a> voor meer details." + VPN-bevestigingsdialoogvenster + U kunt ook een donatie sturen in de Play Store: Bedankt voor het doneren van %s! Log gewist. Toon wachtwoord + KeyChain toegangsfout: %s Kort ISO + Tijdsstempels Geen Upload Download VPN Status Toon opties Volledige licenties + VPN passeren voor lokale netwerken Gebruikersnaam/Wachtwoord bestand [Geïmporteerd uit: %s] + Sommige bestanden konden niet worden gevonden. Selecteer de bestanden om het profiel te importeren: + Om deze app te gebruiken heeft u een VPN aanbieder/VPN gateway nodig die OpenVPN ondersteunt (vaak aangeboden door uw werkgever). Kijk op https://community.openvpn.net/ voor meer informatie over OpenVPN en hoe u uw eigen OpenVPN server kunt opzetten. Importeer log: + Cliëntgedrag Aan het laden… Toegestane VPN apps: %1$s Niet toegestane VPN apps: %1$s + VPN wordt alleen voor geselecteerde apps gebruikt + Vermelding van de externe server verwijderen? Houden Verwijderen + U moet tenminste één externe server definiëren en inschakelen. Serverlijst Toegestane apps Geavanceerde instellingen TLS-instellingen + VPN profiel dupliceren Toon logboek %s en eerder Kopie van %s diff --git a/app/src/main/res/values-no/strings-icsopenvpn.xml b/app/src/main/res/values-no/strings-icsopenvpn.xml index 4ebf757a..5c29339d 100755 --- a/app/src/main/res/values-no/strings-icsopenvpn.xml +++ b/app/src/main/res/values-no/strings-icsopenvpn.xml @@ -99,6 +99,7 @@ Ruter: %1$s %2$s Ekskluderte ruter: %1$s %2$s VpnService-ruter som er installert: %1$s %2$s + Korrigert rute %1$s / %2$s til %3$s / %2$s %1$s %2$s Send loggfilen Send @@ -157,13 +158,16 @@ Nettverksstatus: %s Velg Vis logg-vindu + %10$s %9$s kjører på %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) Tilkoblingsvarsel og varslingslyd Norsk oversettelse av Jonny IP og DNS Grunnleggende Ruting + Obskure OpenVPN-innstillinger. Vanligvis ikke nødvendig. Avansert ICS Openvpn konfigurasjon + Ingen DNS-servere som brukes. Navneoppløsning fungerer ikke. Vurdere å angi tilpassede DNS-servere. Vær også oppmerksom på at Android vil fortsette å bruke proxy-innstillingene angitt for mobile/Wi-Fi-tilkoblingen når ingen DNS-servere er angitt. Hurtigstart Prøv å laste tun.ko kjernemodul før tilkobling. Krever at enheten er rootet. Last tun modul @@ -171,8 +175,10 @@ Bruker proxy %1$s %2$d Bruk systemet proxy Bruk global systemkonfigurasjon for HTTP/HTTPS proxy for å koble til. + Koble til ved oppstart Ignorer Start på nytt + Konfigurasjonsendringene vil brukes etter at VPN\'en er startet på nytt. Restarte VPN nå? Konfigurasjon endret Kopier varsler Ingen VPN-profiler er definert. @@ -181,6 +187,7 @@ OpenVPN Logg Importer OpenVPN konfigurasjon Batteriforbruk + Tilkoblingsforsøk OpenVPN krasjet uventet. Vennligst vurder bruk av Minidump-alternativet i hovedmenyen Send Minidump til utvikler Sender feilsøkingsinformasjon om siste krasj til utvikler @@ -222,4 +229,37 @@ Slett tillatte eksterne apper Laster… Tillatte VPN-apper: %1$s + Søk + Protokoll + Aktivert + Trenger %1$s + Eksporter konfigurasjonsfilen + Samsung telefoner + Ingen VPN valgt. + Standard VPN + Valgt VPN: \'%s\' + Koble til igjen + Veksle VPN + Koble til %s + Koble fra %s + Endre sortering + Sorter + Profiler sortert etter siste brukte + Profiler sortert etter navn + Graf + Bruk logaritmisk skala + Ikke nok data + Gjennomsnitt per time + Gjennomsnitt per minutt + Siste 5 minutter + Inn + Ut + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-pl/plurals-icsopenvpn.xml b/app/src/main/res/values-pl/plurals-icsopenvpn.xml index 70489fbc..906e4395 100755 --- a/app/src/main/res/values-pl/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-pl/plurals-icsopenvpn.xml @@ -1,3 +1,9 @@ - + + + Pozostał jeden miesiąc + Pozostało %d miesięcy + pozostało %d miesięcy + + diff --git a/app/src/main/res/values-pl/strings-icsopenvpn.xml b/app/src/main/res/values-pl/strings-icsopenvpn.xml index 40c9c522..414a0f11 100755 --- a/app/src/main/res/values-pl/strings-icsopenvpn.xml +++ b/app/src/main/res/values-pl/strings-icsopenvpn.xml @@ -252,6 +252,7 @@ Łączenie (TCP) Błąd autentykacji Czekam na sieć + ↓%2$s/s %1$s - ↑%4$s/s %3$s Niepołączony Łączę z VPN %s Łączę z VPN %s @@ -294,6 +295,7 @@ Zezwól na zmiany profili VPN Sprzętowy magazyn kluczy: Ikona aplikacji próbującej użyć OpenVPN + "Począwszy od Androida 4.3 potwiedzenie połączenia VPN jest strzeżone przed \"nakładaniem aplikacji\", co powoduje, że okno dialogowe nie reaguje na dotykowe dane wejściowe. Jeśli masz aplikację, która korzysta z nakładek, może to spowodować takie zachowanie. Problem ten dotyczy wszystkich aplikacji VPN na Androidzie 4.3 i nowszych wersjach. Zobacz także <a href=\"https://github.com/schwabe/ics-openvpn/issues/185\">Issue 185<a> aby uzyskać dodatkowe informacje " Potwierdzenie dla Android w wersji 4.3 i wyższych Alternatywnie, dotację możesz przesłać za pomocą Google Play: Dziękujemy za wsparcie %s! @@ -321,6 +323,7 @@ Dziennik importu: Określono topologię \"%3$s\", jednak ifconfig %1$s %2$s wygląda bardziej na adres IP z maską. Zakładam, że chodzi o topologię \"subnet\". Wartość nadpisywania MSS musi być liczbą całkowitą pomiędzy 0 i 9000 + Wartość nadpisywania MTU musi być liczbą całkowitą pomiędzy 64 a 9000 Ogłasza sesjom TCP przekazywanym przez tunel, że powinny ograniczyć wielkość pakietu tak, aby po enkapsulacji przez OpenVPN wynikowy rozmiar pakietu UDP wysyłanego przez VPN do peer\'a nie przekraczał tej liczby bajtów (domyślnie 1450) Zastępuje wartość MSS pakietu TCP Ustaw wartość MSS pakietu TCP @@ -357,8 +360,10 @@ OpenVPN dla Androida ostrzeże Cię o tym w logu.

Kiedy VPN ustawi serwer DNS Android nie będzie używał więcej proxy. Nie ma żadnego API do ustawienia proxy dla połączenia VPN.

Aplikacje VPN mogą przestać działać po odinstalowaniu i ponownej instalacji. W celu uzyskania szczegółów zobacz #80074 Brakuje konfiguracji tras dla adresu IP klienta oraz masek podsieci. OpenVPN rozwiązuje ten problem przez dodanie trasy odpowiedniej dla adresu IP klienta i maski jego podsieci + Otwieranie urządzenia tun, gdy inne urządzenie używane do obsługi persist-tun, jest otwarte, powoduje awarię VPNServices na urządzeniu. Ponowne uruchomienie urządzenia jest konieczne dla przywrócenia VPN. OpenVPN dla systemu Android próbuje uniknąć ponownego otwarcia urządzenia tun. Aby uniknąć awarii zamknij bieżący TUN przed otwarciem nowego TUN. Może to prowadzić do krótkiego momentu, gdzie pakiety są wysyłane poza siecią VPN. Nawet mimo zastosowania tego obejścia VPNServices czasami ulega awarii i wymaga ponownego uruchomienia urządzenia. VPN absolutnie nie działa dla dodatkowych użytkowników. "Jest grono użytkowników, którzy donoszą, iż podczas używania aplikacji VPN połączenie danych/komórkowe jest często zrywane. Zachowanie to wydaje się dotykać niewielkiej liczby urządzeń/dostawców danych komórkowych - na tę chwilę nieznana jest przyczyna, ani rozwiązanie problemu." + Przy użyciu VPN można dotrzeć tylko do miejsc, które są osiągalne bez sieci VPN. VPN protokołu IPv6 nie działa w ogóle. Trasy nie-CIDR Zachowanie Proxy w sieci VPN Ponowna instalacja aplikacji VPN @@ -403,6 +408,8 @@ OpenVPN dla Androida ostrzeże Cię o tym w logu.

Kiedy VPN ustawi serwer DNS Pomimo, że telefony marki Samsung są jednymi z najliczniej sprzedawanych urządzeń z Androidem, oprogramowanie układowe Samsunga jest jednocześnie jednym z posiadających najwięcej błędów. Błędy nie ograniczają się wyłącznie do operacji związanych z VPN a wiele z nich zostało rozwiązanych technikami tymczasowymi. Poniższa lista przedstawia kilka ze wspomnianych błędów.\n\nDNS nie działa poza zakresem VPN.\n\nNa wielu urządzeniach marki Samsung z Androidem 5.x aplikacje dozwolone/niedozwolone nie działają.\n\nNa urządzeniach marki Samsung z Androidem 6.x VPN może nie działać podczas aktywnego oszczędzania energii. Telefony Samsung Nie wybrano VPN. + Domyślny VPN + Obecnie wybrana sieć VPN: \'%s\' Podłącz ponownie Przełącz VPN Połącz z %s @@ -415,4 +422,22 @@ OpenVPN dla Androida ostrzeże Cię o tym w logu.

Kiedy VPN ustawi serwer DNS Sortowanie Profile posortowane według ostatnio używanych Profile sortowane według nazwy + Konfigurcja używa opcji tls-remote, która została zaniechana w wersji 2.3 i ostatecznie usunięta w 2.4 + Zachowanie na AUTH_FAILED + Grafika + Użyj skali logarytmicznej + Za mało danych + Średnia na godzinę + Średnia za minutę + Ostatnie 5 minut + W + Zewnątrz + %.0f bit/s + %.1f kbit/s + %.1f Mbit / s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-pt/plurals-icsopenvpn.xml b/app/src/main/res/values-pt/plurals-icsopenvpn.xml index 70489fbc..8e397d68 100755 --- a/app/src/main/res/values-pt/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-pt/plurals-icsopenvpn.xml @@ -1,3 +1,20 @@ - + + + Falta 1 mês + Faltam %d meses + + + Falta um dia + Faltam %d dias + + + Falta 1 hora + Faltam %d horas + + + Falta 1 minuto + Faltam %d minutos + + diff --git a/app/src/main/res/values-pt/strings-icsopenvpn.xml b/app/src/main/res/values-pt/strings-icsopenvpn.xml index 00523b59..52772eba 100755 --- a/app/src/main/res/values-pt/strings-icsopenvpn.xml +++ b/app/src/main/res/values-pt/strings-icsopenvpn.xml @@ -44,12 +44,14 @@ Por favor, digite um nome de perfil que não esteja já em uso Nome do perfil Tem de selecionar um certificado de utilizador + Deve selecionar um certificado Nenhum erro encontrado Erro na configuração Erro ao analisar o endereço IPv4 Erro ao analisar as rotas personalizadas (deixe em branco para consulta a pedido) Atalho do OpenVPN + Conectando-se à VPN… Perfil especificado no atalho não encontrado Prefixo de Host aleatório Adiciona 6 caracteres aleatórios ao nome do host @@ -66,10 +68,12 @@ Esperar certificado do servidor TLS Verifica o assunto DN do certificado do servidor remoto Verificar nome de host do certificado + Especifique a verificação usada para verificar o DN do certificado remoto (por exemplo, C = DE, L = Paderborn, OU = Avian IP Carriers, CN = openvpn.blinkt.de)\n\nEspecifique o DN completo ou o RDN (openvpn.blinkt.de no exemplo) ou um prefixo RDN para verificação. \n\nQuando utilizar o prefixo RDN \"Servidor\" corresponde ao \"Servidor-1\" e ao \"Servidor-2\"\n\nDeixando o campo de texto vazio verificará o RDN contra o nome do host do servidor.\n\nPara mais detalhes, veja a página de utilizador OpenVPN 2.3.1+ sob -verify-x509-name Assunto do certificado remoto Ativa a autenticação de chave TLS Ficheiro de autenticação TLS Solicita endereços IP, rotas e tempo do servidor. + Nenhuma informação é solicitada do servidor. As configurações precisam ser especificadas abaixo. Obter Configurações DNS Substituir configurações de DNS pelo servidor @@ -93,6 +97,7 @@ Opções personalizadas Editar definições VPN Remova o perfil VPN \'%s\'? + Em algumas imagens ICS personalizadas, a permissão em /dev/tun pode estar errada, ou o módulo tun pode estar a faltar completamente. Para imagens CM9, tente a opção de reparação em configurações gerais Falha ao abrir a interface tun "Erro: " Limpar @@ -119,6 +124,7 @@ Copia entradas de registo Para copiar uma única entrada do registo selecione e mantenha seleciona a respetiva entrada. Para copiar/enviar o registo completo use a opção enviar registo. Use o botão de menu do equipamento caso não esteja visível no GUI. Atalho para iniciar + Pode colocar um atalho para iniciar o OpenVPN na sua área de trabalho. Dependendo do seu programa de ecrã inicial, terá que adicionar um atalho ou um widget. A imagem não suporta a API VPNService, lamentamos :( Encriptação Digite o método de encriptação @@ -155,22 +161,32 @@ Senha de chave privada Senha ícone de ficheiro + Autenticação/encriptação TLS Config gerado Configurações + Tenta mudar o dono de /dev/tun para sistema. Algumas imagens CM9 precisam disso para fazer a API VPNService funcionar. Requer root. Corrija a propriedade de /dev/tun + Mostra o arquivo de configuração OpenVPN criado A editar \"%s\" A preparar a configuração... + Ativando essa opção forçará a reconexão se o estado da rede mudar (ex: WiFi de/para celular) Volte a ligar na mudança de rede Estado da rede: %s Selecione + Mostra a janela de log ao conectar. A janela de log sempre pode ser acessada pelo status da notificação. Mostrar a janela de log + %10$s %9$s rodando no %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) Aviso de ligação e som de notificação + Tradução em inglês por Arne Schwabe< arne@rfc2549.org> IP e DNS Básico Encaminhamento Definições obscuras OpenVPN. Raramente necessário. Avançado Configuração Openvpn ICS + Nenhum servidor de DNS sendo usado. A resolução do nome pode não funcionar. Considere configurar Servidores DNS personalizados. Observe também que o Android continuará usando suas configurações de proxy especificadas para sua conexão móvel / Wi-Fi quando nenhum servidor DNS estiver configurado. + Não foi possível adicionar o servidor de DNS \"%1$s\", rejeitado pelo sistema: %2$s + Não foi possível configurar o endereço de IP \"%1$s\", rejeitado pelo sistema: %2$s Início Rápido Tente carregar o módulo tun.ko do kernel antes de ligar. Necessita de acesso root ao dispositivo. Carregar o módulo tun diff --git a/app/src/main/res/values-ro/strings-icsopenvpn.xml b/app/src/main/res/values-ro/strings-icsopenvpn.xml index cafe3011..8ca5dce3 100755 --- a/app/src/main/res/values-ro/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ro/strings-icsopenvpn.xml @@ -38,7 +38,7 @@ Utilizator Parola Pentru configurarea statică Cheile TLS Auth vor fi utilizate ca şi chei statice - Configurare VPN + Configurați VPN-ul Adaugă profil Introduceţi un nume ce identifică profilul nou Vă rugăm să introduceţi un nume de profil unic diff --git a/app/src/main/res/values-ru/plurals-icsopenvpn.xml b/app/src/main/res/values-ru/plurals-icsopenvpn.xml index fc40574a..7cc8112c 100755 --- a/app/src/main/res/values-ru/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-ru/plurals-icsopenvpn.xml @@ -2,22 +2,22 @@ - Остался %d месяц + Остался один месяц Осталось %d месяца Осталось %d месяцев - Остался %d день + Остался один день Осталось %d дня Осталось %d дней - Остался %d час + Остался один час Осталось %d часа Осталось %d часов - Осталась %d минута + Осталась одна минута Осталось %d минуты Осталось %d минут diff --git a/app/src/main/res/values-ru/strings-icsopenvpn.xml b/app/src/main/res/values-ru/strings-icsopenvpn.xml index faa4ef22..f73a09f9 100755 --- a/app/src/main/res/values-ru/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ru/strings-icsopenvpn.xml @@ -77,7 +77,7 @@ Запрашивать параметры DNS Переопределить параметры DNS от сервера - Использовать свой DNS сервер + Использовать ваши DNS Домен поиска DNS-сервер для использования. DNS-сервер @@ -87,8 +87,8 @@ Игнорировать маршруты, посылаемые сервером. Перенаправляет весь трафик через VPN Использовать маршрут по умолчанию - Введите пользовательские маршруты. Только введите адрес назначения в формате CIDR. \"10.0.0.0/8 2002::/16\" будет использовано для 10.0.0.0/8 и 2002::/16 сетей через VPN. - Маршруты, которые не следует направлять через VPN. Используйте тот же синтаксис, как и в случае с другими маршрутами. + Введите пользовательские маршруты. Используйте только адрес назначения в формате CIDR. \"10.0.0.0/8 2002::/16\" направит сети 10.0.0.0/8 и 2002::/16 через VPN. + Маршруты, которые НЕ должны направляться через VPN. Используйте тот же синтаксис, что и для включенных маршрутов. Пользовательские маршруты Исключенные сети Уровень детализации журнала @@ -133,7 +133,7 @@ Аутентификация/шифрование Обзор файлов Встроенный файл - Ошибка при импорте файла + Ошибка импорта файла Не удалось импортировать файл из файловой системы [[Встроенный файл данных]] Отказ в открытии устройства tun без информации об IP-адресе @@ -152,7 +152,7 @@ Соображения безопасности "Так как OpenVPN чувствителен к безопасности, то уместны будут несколько замечаний на её счёт. Все данные на SD-карте по сути не защищены. Каждое приложение может прочесть их (например, эта программа не требует специальных привилегий на SD-карту). Данные этого приложения могут быть прочитаны только им самим. При использовании опции импорта сертификатов и ключей в диалоговом окне данные сохраняются в профиле VPN. Профили VPN доступны только этому приложению. (Не забудьте потом удалить копии на SD-карте). Несмотря на то, что данные доступны только этому приложению, они всё ещё не зашифрованы. При наличии прав администратора (рута) на телефоне или через некую уязвимость эти данные можно извлечь. Также сохранённые пароли хранятся в обычном текстовом виде. Настоятельно рекомендуется файлы pkcs12 импортировать в android keystore." Импорт - Ошибка вывода выбранного сертификата + Ошибка отображения выбора сертификата Произошла ошибка при попытке вызова системного диалога выбора сертификатов Android 4.0+. Этого не должно было случиться на стандартной прошивке. Может быть в вашей прошивке испорчено хранилище сертификатов IPv4 IPv6 @@ -220,7 +220,7 @@ Конфигурация маршрутизации/интерфейса Конфигурация маршрутизации и интерфейса производится не через традиционные ifconfig/route команды, а с помощью VPNService API. Это приводит к созданию другой конфигурации маршрутизации, отличной от конфигураций, используемых на других ОС. Конфигурация VPN-туннеля состоит из IP-адресов и сетей, которые должны направляться через этот интерфейс. Никаких особых партнерских адресов или адресов шлюза не требуется. Также не требуются и специальные маршруты для соединения с VPN-сервером (например, добавленные при использовании redirect-gateway). Следовательно, приложение будет игнорировать эти параметры при импорте конфигурации. Приложение с помощью VPNService API гарантирует, что подключение к серверу не направляется через VPN-туннель. Поддерживается направление через туннель только определенных сетей. Приложение пытается определить сети, которые не должны быть направлены через туннель (например, маршрут x.x.x.x y.y.y.y net_gateway) и вычисляет список маршрутов, в который не включаются эти маршруты, чтобы эмулировать поведение других платформ. Окна журналов и логов показывают конфигурацию сервиса VPN после установления соединения. Не использовать обычное соединение без VPN при переподключении OpenVPN. - Постоянный туннель + Постоянный tun Журнал OpenVPN Импорт конфигурации OpenVPN Потребление батареи @@ -281,7 +281,7 @@ Очистить список авторизованных внешних приложений?\nСписок разрешенных приложений:\n\n%s Приостанавливать VPN, если экран выключен и передано меньше 64kb данных за 60 сек. Когда включена опция \"Постоянный туннель\", приостановка VPN оставит ваше устройство без сетевого подключения. Без опции \"Постоянный туннель\" устройство не будет иметь VPN-соединения/защиты. Приостановить VPN-соединение при выключенном экране - Приостановка соединения при выключенном экране: меньше, чем %1$s in %2$ss + Приостановка соединения при выключенном экране: меньше, чем %1$s за %2$sс Внимание: Постоянный туннель не включен для этого VPN. Трафик будет использовать обычное интернет соединение, когда экран выключен. Сохранить пароль Приостановить VPN diff --git a/app/src/main/res/values-tr/strings-icsopenvpn.xml b/app/src/main/res/values-tr/strings-icsopenvpn.xml index a8429009..048e3ccd 100755 --- a/app/src/main/res/values-tr/strings-icsopenvpn.xml +++ b/app/src/main/res/values-tr/strings-icsopenvpn.xml @@ -409,7 +409,7 @@ Samsung telefonlar Seçili VPN yok. Öntanımlı VPN - Varsayılan olarak bir VPN gereken yerlerde VPN kullanılır. Bunlar şu anda: önyükleme sırasında, Her Zaman Açık ve Hızlı Ayarlar Döşemesi içindir. + VPN, varsayılan bir VPN\'in gerekli olduğu yerlerde kullanılır. Bunlar şu anda: önyükleme sırasında, Her Zaman Açık ve Hızlı Ayarlar Döşemesi içindir. Şu anda seçili VPN: \'%s\' Yeniden bağlan VPN\'i Aç/Kapat @@ -442,4 +442,23 @@ %.1f kB %.1f MB %.1f GB + Bağlantı istatistikleri + Süren OpenVPN bağlantısının devam eden istatistikleri + Bağlantı durumu değişimi + OpenVPN bağlantısının durum değişiklikleri (Bağlantı, kimlik doğrulama,…) + + Sertifika imzasında zayıf (MD5) karması (SSL_CTX_use_certificate md çok zayıf) + + OpenSSL Hız Testi + OpenSSL şifre isimleri + OpenSSL Kripto Hız testi + OpenSSL bir hata döndürdü + Test çalışıyor… + Seçilen algoritmaları test edin + OpenVPN 3 C++ uygulaması statik anahtarları desteklemez. Lütfen genel ayarlar altında + OpenVPN 2.x\'e geçin. + + PKCS12 dosyalarını doğrudan OpenVPN 3 C++ uygulamasıyla kullanmak desteklenmiyor. + Lütfen, pkcs12 dosyalarını Android anahtar deposuna aktarın veya genel ayarlar altında OpenVPN 2.x\'e geçin. + diff --git a/app/src/main/res/values-uk/strings-icsopenvpn.xml b/app/src/main/res/values-uk/strings-icsopenvpn.xml index 206457d9..574e96b4 100755 --- a/app/src/main/res/values-uk/strings-icsopenvpn.xml +++ b/app/src/main/res/values-uk/strings-icsopenvpn.xml @@ -32,7 +32,7 @@ TLS напрямок Введіть адресу IPv6/маску в CIDR форматі (напр., 2000:dd::23/64) Введіть адресу IPv4/маску в CIDR форматі (напр., 1.2.3.4/24) - IPv4-адреса + IPv4-адреси IPv6-адреса Введіть додаткові параметри OpenVPN. Використовуйте цю можливість з великою обережністю. Якщо ви вважаєте, що відсутній важливий параметр, то зв\'яжіться з автором Ім\'я користувача @@ -252,6 +252,7 @@ Підключення (TCP) Помилка автентифікації Очікування на використання мережі + ↓%2$s %1$s - ↑%4$s %3$s Не підключено Підключення до VPN %s Підключення до VPN %s @@ -278,7 +279,7 @@ Не дозволяється використовувати зовнішнє API Дозволенi додатки: %s Очистити список дозволених зовнішніх програм \nПоточний список дозволених програм:\n\n%s - \"Пауза VPN, коли екран вимкнений і менш ніж 64 кб були передані за 60 секунд. Якщо увімкена опція \"Постійний tun\", то Пауза VPN залишить ваш пристрій БЕЗ мережевого підключення. Без опції \"Постійний tun\", пристрій використовує нормальне (незахище) підключення до інтернету, коли VPN в паузі. + Призупинити VPN, коли екран вимкнений і менш ніж 64 кб були передані за 60 секунд. Якщо увімкнена опція \"Постійний tun\", то призупинення VPN залишить ваш пристрій БЕЗ підключення до мережі. Без опції \"Постійний tun\", пристрій не використовує підключення/захист VPN. Пауза VPN з\'єднання після вимкнення екрану Призупинення зв\'язку в екрані вимкненого стану: менше %1$s у %2$sс. Попередження: Постійний tun не увімкнений для цього VPN. Трафік буде використовувати звичайне інтернет-з\'єднання, коли екран вимкнений. @@ -321,7 +322,8 @@ Щоб користуватися цією програмою, Вам знадобиться VPN провайдер/шлюз з підтримкою OpenVPN (часто наданий роботодавцем). Для отримання інформації з налаштування власного OpenVPN сервера: http://community.openvpn.net/ Журнал імпорту : Vpn топологія \"%3$s\" визначена, але ifconfig %1$s %2$s більше схожий на IP-адресу з маскою мережі. Припускаемо, що це топологія \"мережі\". - Значення MSS являє собою ціле число від 0 до 9000 + Значення MSS має бути цілим числом в діапазоні від 0 до 9000 + Значення MTU має бути цілим числом в діапазоні від 64 до 9000 Зміни в TCP з\'єднанні, які проходять через тунель, так що отриманий в результаті розмір пакета UDP, після инкапсуляції по OpenVPN обмежується цим значенням. (За замовчуванням 1450) Зміна значення MSS навантаження TCP Встановка значення MSS навантаження TCP @@ -377,6 +379,7 @@ Зберігати tun режим %s і подальше Підключення не вдається з \"SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure\" + Новіші версії OpenVPN для Android (0.6.29 / березень 2015 р.) використовують більш безпечниі налаштування за промовчанням для дозволених шифрованих наборів (tls-шифр \"DEFAULT:! EXP:! PSK:! SRP:! KRSA\"). На жаль, виключення менш безпечних та експортних наборів шифрів, особливо тих, які не підтримують Perfect Forward Secrecy (Diffie-Hellman), викликають певні проблеми. Це, як правило, зумовлене добромисною, але погано виконаною спробою посилити захист TLS встановленням tls-cipher на сервері або деяких вбудованих ОС із урізаним SSL (наприклад, MikroTik).\nЩоб вирішити цю проблему, встановіть tls-cipher налаштування на сервері на розумні за промовчанням, як tls-cipher \"DEFAULT:! EXP:! PSK:! SRP:! kRSA\". Щоб вирішити проблему у клієнта, додайте користувацький параметр tls-cipher DEFAULT на клієнті Android. Цей профіль був доданий з зовнішнього додатку (%s) і був відзначений як таким, що не керується користувачем. Список відкликаних сертифікатів Перезапуск OpenVPN Service (Додаток зупинився або закрився через нестачу пам\'яті) @@ -404,14 +407,38 @@ Навіть не зважаючи на те, що телефони Samsung є одними з найбільш популярних телефонів на Android, прошивка від Samsung також є однією з найбільш дирявими прошивками на Android. Ці помилки не обмежуються лише VPN операціями на цих пристроях, але багато з них можна уникнути. Дальше деякі з цих помилок описані. \n\nDNS не працює, якщо сервер DNS в межах віртуальної приватної мережі. \n\nНа багатьох пристроях Samsung 5.x функція дозволених/заборонених програм не працює. \n\nНа Samsung 6.x VPN не працює, якщо додаток VPN не звільняється від PowerSave функцій. телефони Samsung VPN не вибрано. + VPN за промовчанням + VPN, що буде використовуватися за промовчанням в тих місцях, де потрібно. А саме: при завантаженні, для «Постійного VPN» та для перемикача в «Швидких налаштуваннях». + Наразі вибраний VPN: \'%s\' Перепідключитись + Переключити VPN Підключення до %s Відключення %s + Введіть максимальний час між спробами з\'єднання. OpenVPN поступово підвищить час очікування після невдалої спроби з\'єднання до цього значення. Значення за промовчанням до 300 с. Максимальний час між спробами підключення Очікування %ss секунд між спробами підключення + Мережі ще .. -> VPN]]> Підключення до OpenVPN закрито (%s) Змінити сортування Cортувати Профілі відсортовано за часом використовувався Профілі відсортовані за назвою + Налаштування містять параметр tls-remote, який був заборонений в версії 2.3 і остаточно видалений в 2.4 + Поведінка при AUTH_FAILED + Графік + Використовувати логарифмічну шкалу + Недостатньо даних + В середньому за годину + В середньому за хвилину + Останні 5 хвилин + Вхідний + Вихідний + %.0f біт/с + %.1f Кбіт/с + %.1f Мбіт/с + %.1f Гбіт/с + %.0f Б + %.1f КБ + %.1f МБ + %.1f ГБ diff --git a/app/src/main/res/values-v21/refs.xml b/app/src/main/res/values-v21/refs.xml index 1af5ba02..ae9be13f 100644 --- a/app/src/main/res/values-v21/refs.xml +++ b/app/src/main/res/values-v21/refs.xml @@ -12,16 +12,16 @@ @drawable/ic_check_white_24dp @drawable/ic_filter_list_white_24dp @drawable/ic_delete_white_24dp - + @drawable/ic_content_copy_white_24dp @drawable/ic_delete_grey600_24dp @drawable/ic_edit_white_24dp - + @drawable/ic_archive_white_24dp @drawable/ic_edit_grey600_24dp - - + @drawable/ic_sort_white_24dp \ No newline at end of file diff --git a/app/src/main/res/values-vi/strings-icsopenvpn.xml b/app/src/main/res/values-vi/strings-icsopenvpn.xml index 9ca9bc4c..f38aaf3e 100755 --- a/app/src/main/res/values-vi/strings-icsopenvpn.xml +++ b/app/src/main/res/values-vi/strings-icsopenvpn.xml @@ -418,5 +418,28 @@ Hãy nhập tối đa thời gian giữa các kết nối lại. OpenVPN sẽ dần dần tăng thời gian chờ đợi của mình sau khi cố kết nối không thành công đến giá trị này. Mặc định là hệ thống 300. Thời gian tối đa giữa kết nối lại Vui lòng chờ %ss giây để kết nối + + Kết nối với OpenVPN đã đóng (%s) + Thay đổi sắp xếp Sắp xếp + Hồ sơ đã sắp xếp theo lần sử dụng gần đây nhất + Hồ sơ sắp xếp theo tên + Cấu hình dùng tùy chọn tls-remote đã bị hạn chế trong 2.3 và cuối cùng bị gỡ bỏ trong 2.4 + Hành vi trong XÁC THỰC_LỖI + Biểu đồ + Dùng thang đo logarit + Không đủ dữ liệu + Trung bình mỗi giờ + Trung bình mỗi phút + 5 phút gần nhất + Vào + Ra + %.0f bit/giây + %.1f kbit/giây + %.1f Mbit/giây + %.1f Gbit/giây + %.0f B + %.1f kB + %.1f MB + %.1f GB diff --git a/app/src/main/res/values-zh-rCN/plurals-icsopenvpn.xml b/app/src/main/res/values-zh-rCN/plurals-icsopenvpn.xml index 70489fbc..8aa121e6 100755 --- a/app/src/main/res/values-zh-rCN/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-zh-rCN/plurals-icsopenvpn.xml @@ -1,3 +1,16 @@ - + + + 剩下 %d 个月 + + + 剩下 %d 天 + + + 剩下 %d 小时 + + + 剩下 %d 分钟 + + 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 d37b9b57..061a9827 100755 --- a/app/src/main/res/values-zh-rCN/strings-icsopenvpn.xml +++ b/app/src/main/res/values-zh-rCN/strings-icsopenvpn.xml @@ -6,14 +6,14 @@ --> - 服务器地址 - Server Port: + 服务器地址: + 服务器端口: 位置 无法读取目录 选择 取消 - 未收到数据 - 启用 LZO 压缩算法 + 没有数据 + LZO 压缩算法 没有证书 客户端证书 客户端证书密钥 @@ -29,106 +29,200 @@ 请选择… 你必须选择一个文件 使用 TLS 认证 + TLS 位置 输入 CIDR 格式的 IPv6 地址/网络掩码(例如 2000:dd::23/64) 输入 CIDR 格式的 IPv4 地址/网络掩码(例如 1.2.3.4/24) IPv4 地址 IPv6 地址 - 请谨慎输入 OpenVPN 的自定义选项。此外请注意许多与 tun 模块有关的 OpenVPN 设置由于系统 VPN 功能的设计而不能得到支持。如果您觉得缺少一个很重要的选项,请与作者联系。 + 输入 OpenVPN 的自定义选项。请谨慎使用此功能。此外请注意许多与 tun 模块有关的 OpenVPN 设置由于系统 VPN 功能的设计而不能得到支持。如果您觉得缺少一个很重要的选项,请与作者联系。 用户名 密码 - 静态配置中 TLS 身份验证密钥将被用作静态密钥 + 在静态配置中 TLS 身份验证密钥将被用作静态密钥 配置 VPN 添加配置文件 输入新配置文件的名字 - 请输入一个唯一的配置文件名称 + 请输入一个独一无二的配置文件名称 配置文件名称 您必须选择一个用户证书 + 你必须选择一个CA证书 + 没有找到错误 + 配置错误 无法解析 IPv4 地址 无法解析自定义路由 (根据需求留空) OpenVPN 主屏幕快捷方式 + 正在连接到 VPN %s + 未找到快捷方式指定的配置文件 + 随机主机前缀 + 在主机名前添加6个随机字符 + 启用自定义选项 + (此处)指定自定义选项。请谨慎使用! + 路由被安卓系统拒绝 + 断开 断开VPN - 确认取消 + 清除日志 + 确认取消? + 断开连接的VPN/取消连接尝试? + 删除VPN 检查服务器是否使用 TLS 服务器端扩展 (--remote-cert-tlsserver server) 需要 TLS 服务器证书 检查远程服务器证书的 DN 属性 证书主机名检查 勾选此项将验证远程证书的 DN 属性(例:C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de)\n\n输入完整的 DN 或者 RDN 以便进行验证。\n\nRDN前缀 \"Server\" 可以匹配 \"Server-1\" 以及 \"SERVER-2\"\n\n若留空则将仅验证 RDN 而不验证主机名。\n\n有关更多信息请查看 OpenVPN 2.3.1+ 参考手册的 --verify-x509-name 小节 - 远程证书主题 + 远程证书账户 + 启用TLS密钥验证 + TLS认证文件 从服务器请求 IP 地址、 路由规则和计时选项。 - 没有从服务器请求信息。设置需要在下方被指定。 + 将不会从服务器请求信息。需要手动在下方配置设置。 Pull 设置 - 无法使用主 DNS 服务器时会使用辅助 DNS 服务器。 + DNS + 由服务器下发DNS设置 + 使用您的DNS服务器 + 搜索域名 + 要使用的DNS服务器。 + 主DNS服务器 + 如果无法到达正常的DNS服务器,则使用辅助DNS服务器。 + 备用DNS服务器 + 忽略推送的路由 不使用服务器推送的路由 - 重定向所有流量到VPN + 通过VPN重定向所有流量 + 使用默认路由 输入自定义路由。目标地址只能用CIDR格式。\"10.0.0.0/8 2002::/16\" 将会通过VPN重定向到10.0.0.0/8 和 2002::/16 网络。 - 不应该通过VPN路由的路线。使用自定义路由相同的语法。 - 排除的路线 + 设置要不通过VPN路由的路线。使用与自定义路由相同的语法。 + 自定义路由 + 排除的网络 + 日志记录级别 + 允许来自任何IP的认证数据包 允许不固定服务器 + 自定义选项 + 编辑VPN设置 移除 VPN 配置文件 \'%s\' 吗? - 在某些自定义 ICS 系统版本上,/dev/tun 的权限可能会有错误,或者根本就没有该文件。CM9 系统用户请尝试通过本程序设置中的修复选项进行权限修复。 + 在某些自定义 ICS 系统版本上,/dev/tun 的权限可能会有错误,或者根本就没有tun模块。CM9 系统用户请尝试本程序设置中的修复权限选项。 打开 tun 接口失败 错误: + 清除 正在打开 tun 设备: + 本地IPv4:%1$s/%2$d IPv6:%3$s MTU:%4$d DNS 服务器: %1$s, 域名: %2$s - 路线: %1$s %2$s + 路由: %1$s %2$s 排除的路由: %1$s %2$s VpnService安装路线 : %1$s %2$s 已获得接口信息 %1$s 以及 %2$s,将第二个地址作为远程地址。使用 /32 作为本地掩码。OpenVPN 给出的模式是 \"%3$s\"。 无法将 %1$s 和 %2$s 作为 CIDR 形式的路由,将使用 /32 的子网掩码。 纠正路由 %1$s/%2$s 为 %3$s/%2$s 不能访问 Android 密钥链证书。这可能是由于固件升级或通过还原备份的应用程序/软件设置造成的。请编辑 VPN 配置文件并在基本设置中重新选择证书以重新创建证书访问权限。 + %1$s %2$s + 发送日志文件 + 发送 + ICS OpenVPN日志文件 + 将日志复制到剪贴板 + Tap模式 Tap 模式在未 root 的机器上不可用。因此本程序无法提供 tap 模块支持 还来? 您在开玩笑嘛? tap 连接模式是不支持的,不要再发邮件问这些问题了。 这已经是第三次有人问这个问题了。好吧,虽然确实可以在 TAP 设备上写一个 TAP 模拟器,给发送出去的数据包添加第二层网络头,并去掉收到的数据包中的第二层网络头,但是这个 TAP 模拟器可能还需要实现 ARP 甚至 DHCP 客户端功能。我目前不知道有谁在做这方面的工作。如果你想开展这方面的编码工作的话,请联系我。 + 常见问题 + 正在复制日志 若要复制单条日志请在相应条目上轻按即可。若要复制/发送全部日志请使用发送日志功能。如果该功能在界面中没有显示,请使用设备原生的菜单按钮。 - 你可以在桌面上放置一个启动 OpenVPN 的图标。如果你的桌面程序支持,你可以在桌面上放置 OpenVPN 的启动图标,或者是 OpenVPN 的桌面挂件 - 很遗憾,您目前的系统不支持 VPN 服务接口 + 快捷方式启动 + 你可以在桌面上放置一个启动 OpenVPN 的图标。如果你的桌面程序支持,你可以在桌面上放置 OpenVPN 的启动图标,或者是 OpenVPN 的桌面挂小部件。 + 很遗憾,您目前的系统不支持 VPN 服务接口 :( + 加密 + 输入加密方式 输入 OpenVPN 所使用的加密密码算法。留空以使用默认算法。 输入 OpenVPN 使用的认证摘要。留空则使用默认的摘要。 - 内联文件 - [[内联文件数据]] + 认证/加密 + 文件浏览器 + 内置文件 + 导入文件时出错 + 无法从文件系统导入文件 + [[内置的文件数据]] 无 IP 信息,拒绝打开 tun 设备 + 从ovpn文件导入配置文件 + 导入 + 无法读取要导入的配置文件 + 读取配置文件时出错 + 添加配置文件 + 在导入的配置文件中找不到文件%1$s + 从源代码%1$s导入配置文件 您的配置文件中有几个配置项无法在配置菜单中查看和修改,这些配置项将会当成自定义配置选项。下面是这些自定义的配置选项: + 配置文件读取完毕。 + 不要绑定到本地地址和端口 无本地绑定 + 导入配置文件 + 安全注意事项 “OpenVPN 是非常注重安全的,所以在此提供一些安全方面的建议。所有保存在存储卡上的数据都是不安全的,任何应用都可以读取存储卡上的文件,即使这个应用没有‘写入存储卡’的权限也是如此。应用自身的数据只能被应用自己读取。在选择 CA 证书、证书文件或者密钥文件的时候请使用导入功能,这样这些数据就会保存在 OpenVPN 自身的数据文件中,保证不会被其他的应用恶意读取。当然导入证书之后记得要把证书从存储卡上删除掉。不过,虽然这些数据不能被其他应用读取,但是这些数据是明文保存的,如果你的系统是 rooted 的,那么这些数据将能够被任何拥有 root 权限的应用轻松地读取。保存在 OpenVPN 中的密码也是以明文保存的,如果设备被 rooted 了,这些密码也有可能被其他应用恶意读取。强烈建议使用 pkcs12 证书并将证书导入到 Android 自己的证书管理系统里。” + 导入 + 显示证书选择错误 尝试显示 Android 4.0 + 证书选择对话框时出现异常。Android 4.0 以上的系统不可能出现该问题,因为这是标准的系统功能。可能您当前 ROM 中的证书存储已经损坏。 + IPv4 + IPv6 + 正在等待状态消息... + 导入配置文件 + 导入配置文件%d 图像已损坏 <p>HTC官方固件可能存在异常的路由问题并会导致数据流不通过隧道传输(详见BUG追踪<a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">Issue 18</a>)。</p><p>据报导,旧版的SONY Xperia Arc S和Xperia Ray的官方固件完全不包含VPNService(详见BUG追踪<a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">Issue 29</a>)。</p><p>在自制固件中,tun 模块可能会有缺失,或是未被设置正确的权限。部分CM9固件需要启用“特定设备HACKS”项下的“修复/dev/tun的权限”的选项。</p><p>最重要的是:若您的设备的固件存在问题,请直接向您的设备供应商反馈。越多人向供应商反映问题,问题越有可能得到解决。</p> + PKCS12 文件加密密钥 + 私钥密码 + 密码 + 文件图标 + TLS认证/加密 + 生成的配置 设置 尝试设定 /dev/tun 的属主为 system。一些 CM9 ROM 需要它以使 VPNService API 工作。本操作需要 root 权限。 修复 /dev/tun 的权限 + 显示生成的OpenVPN配置文件 + 正在编辑“ %s ” + 生成配置中... 启用该选项以在网络变化(例如在蜂窝数据和 WiFi 之间切换)时强制重新连接 + 当网络更改时重新连接 + 网络状态:%s Android 密钥库通常会自带 CA 证书。如果您获取的证书发生验证错误,请单独指定一个证书。 + 选择 在 Android 密钥库中未找到任何 CA 证书。可能验证失败。 连接时显示日志窗口。日志窗口可始终从通知栏访问。 + 显示日志窗口 %10$s %9$s running on %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) 与 Android 密钥库 %1$s 签名时出错: %2$s VPN 连接警告会告诉你有程序正要拦截所有的网络流量,这是为了确保 VPN 服务的 API 不被恶意应用滥用。\nVPN 连接通知(通知栏上的钥匙图标)是 Android 系统内建的,如果当前有 VPN 连接,Android 系统就会自动显示这个通知图标。一些系统上还会在 VPN 连接建立的时候发出提示音。Android 这么做的原因是为了保护你不受恶意应用的欺骗。 连接警告和通知声音 中文翻译:Christopher Meng <trans@cicku.me> + IP和DNS + 基本设置 + 路由 + 模糊OpenVPN设置。通常不需要。 + 高级 ICS Openvpn 配置 没有使用 DNS 服务器,无法解析域名,请考虑设置一个 DNS 服务器。请注意,即使你没有设置 DNS 服务器,你为移动网络以及 Wi-Fi 设置的代理服务器配置也是有效的。 无法添加 DNS 服务器 \"%1$s\",%2$s 拒绝了您的操作。 无法配置 IP 地址 %1$s,被系统拒绝:%2$s <p>获取你的 VPN 配置文件,可以是在电脑上正在使用的 OpenVPN 客户端配置文件,也可以向你的 VPN 服务商索取配置文件。</p><p>如果配置文件只有一个,可以把配置文件发到你自己的邮箱然后从手机上下载。如果配置文件有很多个,可以将它们复制到存储卡内。</p><p>从邮件中下载附件,或者在 VPN 列表中点击文件夹图标来导入配置文件。</p><p>如果提示找不到文件,那就将缺失的文件复制到存储卡内。</p><p>点击保存,将配置文件保存到你的 VPN 列表中。</p><p>在 VPN 列表中点击 VPN 的连接的名字,就可以连接到 VPN 了。</p><p>如果发生错误,可以看日志窗口中的日志,然后设法解决问题。</p> + 快速开始 + 尝试在连接之前加载 tun.ko 内核模块。需要已root的设备。 + 加载tun模块 + 将PKCS12从配置导入到Android Keystore + 获取代理设置时出错:%s 使用代理 %1$s %2$d 使用系统代理 使用系统设置连接 HTTP/HTTPS 代理服务器。 如果在系统启动时OpenVPN处于活动状态,那么它会连接指定的VPN。在Android 5.0上使用这个选项前,请阅读连接警告的常见问题。 - 启动时连接 - 配置的变更将在重启 VPN 后生效,是否立即重启? + 在系统启动时自动连接 + 忽略 + 重新启动 + 配置文件的变更将在重新连接 VPN 后生效,是否立即(重新)连接? + 配置已更改 无法判断最后一次连接使用的是哪个配置文件,所以无法编辑配置文件 重复的通知 当 Android 系统的内存(RAM)即将耗尽的时候,不再需要的应用和服务将被关闭以腾出内存空间,这项机制也会影响到 VPN 进程。为了保证 OpenVPN 及其连接不被关闭,OpenVPN 服务会以较高的优先级运行,而为了以较高的优先级运行,OpenVPN 必须在状态栏显示一个图标。正如前面的问题中说过的,系统的“钥匙”图标是系统内建的,仅仅显示这个“钥匙”图标并不能让 OpenVPN 以更高的优先级运行。 - 没有定义 VPN 配置文件 + VPN 配置文件未定义 点击 <img src=\"ic_menu_add\"/> 图标添加新的 VPN 配置 使用 <img src=\"ic_menu_archive\"/> 图标导入存储卡中已有的配置文件(.ovpn 或 .conf)。 - 请确保阅读常见问题解答。这是一个快速向导。 + 确保已经阅读FAQ部分。这里有一个快速向导。 路由/接口配置 的路由和接口配置不通过传统的ifconfig /路由的命令而将用VPNService API来完成。这导致了比在其它操作系统不同的路由配置。 \ n此VPN隧道的配置包括IP地址,并应被指定到该接口的网络。特别是,没有同行伙伴地址或网关地址是必要的或需要。特殊的路由到达VPN服务器不需要任何(例如,当使用重定向网关添加)。导入配置时,应用程序会因此忽略这些设置。该应用程序可确保与连接到服务器没有通过VPN隧道路由的VPNService API。\ n此VPNService API不允许指定的网络,不应该通过VPN路由。作为一种变通方法的应用程序会检测网络,不应该被路由到隧道(如路由XXXX YYYY net_gateway),并计算一组路由排除这种路线效仿其他平台的行为。日志窗口显示VPNService的在建立连接的配置\ nBehind的场景:安卓4.4+确实使用策略路由。使用route / ifconfig命令不会显示已安装的路径。而使用IP规则,iptables的-t轧-L + 当OpenVPN正在重新连接时,不要回退到没有VPN连接的状态。 + 保持tun连接 OpenVPN 日志 导入 OpenVPN 配置文件 电池消耗 @@ -160,13 +254,14 @@ 连接中(TCP) 验证失败 等待可用网络 + ↓%2$s %1$s-↑%4$s %3$s 未连接 正在连接 VPN %s 正在连接 VPN %s 某些版本的 Android 4.1 存在问题,如果密钥库证书的名称包含非字母和数字字符(如空格、 下划线或短划线)。请尝试重新导入不包含特殊字符的证书 加密算法(cipher) 数据包验证 - 数据包验证方式 + 输入数据包验证方式 由 %s 构建 调试版本 正式版本 @@ -178,18 +273,18 @@ 您导入的配置包含不再使用的 tls-remote 选项,该选项使用了不同的 DN 格式。 RDN (通用名称) RDN 前缀 - tls-remote(不再使用) + tls-remote(不再被使用) 你可以通过访问 http://crowdin.net/project/ics-openvpn/invite 来帮助翻译 %1$s 正在试图控制 %2$s 如果继续,你将允许该应用完全控制 OpenVPN for Android,并拦截所有网络流量。除非你信任该应用,否则请不要继续。如果该应用是恶意应用,你需要自行承担所有的后果。 我信任此应用。 没有允许使用外部 API 的应用 - 已授权的应用:%s + 经 VPN 代理的应用程序: %s 清除已授权的应用列表?\n当前已授权的应用:\n\n%s 当屏幕关闭且 60 秒内传输数据量小于 64kB 时暂停 VPN。当启用“持久性 Tun”选项时,暂停 VPN 将使设备处于无网络连接的状态。未启用“持久性 Tun”时,设备将没有 VPN 连接保护。 屏幕关闭后暂停 VPN 连接 屏幕关闭时暂停连接:若在%2$s秒内少于%1$s - 警告:该 VPN 没有启用“持久化 tun 设备”,当屏幕关闭时,网络流量将不走 VPN 隧道,而是走 Wi-Fi 或者移动网络。 + 警告:该 VPN 没有启用“保持tun连接”这一选项,当屏幕关闭时,网络流量将不通过 VPN 隧道,而是通过 Wi-Fi 或者移动网络。 保存密码 暂停 VPN 继续 VPN @@ -202,9 +297,9 @@ 允许更改 VPN 配置 硬件密钥库: 应用程序试图使用 OpenVPN 为 Android 的图标 - "入手 Android 4.3 VPN 确认被防范\"覆盖应用程序\"。这将导致在不发生反应,触摸输入的对话框中。如果您有一个应用程序,使用覆盖它可能会导致这种行为。如果你发现违规应用程序联系的应用程序的作者。这个问题影响到所有 VPN 应用程序的 Android 4.3 及更高版本。请参阅 < href =\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\"> 问题 185 < > 有关其他详细信息" + "自 Android 4.3 开始,VPN 确认被防范\"覆盖应用程序\"。这将导致在不发生反应,触摸输入的对话框中。如果您有一个应用程序,使用覆盖它可能会导致这种行为。如果你发现违规应用程序联系的应用程序的作者。这个问题将影响到运行在 Android 4.3 及更高版本上的所有 VPN 应用程序。有关其他详细信息请参阅 < href =\"http://code.google.com/p/ics-openvpn/issues/detail?id=185\"> issue 185 < > " Vpn 确认对话框的 Android 4.3 及更高版本 - 或者你可以给我捐赠与播放存储: + 或者你可以通过GooglePlay来捐赠我: 感谢捐赠 %s! 日志已清除。 显示密码 @@ -222,27 +317,28 @@ 如果您的 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] - 找不到一些文件。请选择要导入的配置文件的文件: + [导入: %s] + 有些文件未找到。请选择要导入的配置文件的文件: 若要使用此应用程序需要支持 OpenVPN (通常由您的雇主提供) 的 VPN 提供商/VPN 网关。查阅 http://community.openvpn.net/ OpenVPN 和如何设置您自己的 OpenVPN 服务器的详细信息。 导入日志: VPN拓扑“%3$s”指定的,但使用ifconfig %1$s %2$s看起来更像是一个网络掩码的IP地址。假设“子网”的拓扑结构。 mssfix 值必须是一个介于 0 和 9000 之间的整数 + MTU覆盖的值必须是64到9000之间的整数 公布于运行在他们应该限制其发送分组大小,使得后的OpenVPN已包封它们,将得到的UDP包大小的OpenVPN发送到其对等体将不超过此字节数隧道TCP会话。 (默认为1450) 重写TCP有效载荷的MSS值 - 设置的 TCP MSS 负载 + 设置 TCP MSS 负载 客户端行为 - 明确允许外部应用程序 + 清除允许的外部应用程序 加载中... - 允许 VPN 应用程序: %1$s - 不允许VPN应用:%1$s - 从应用程序允许禁止列表中移除它,不再安装包 %s - VPN 用于所有的应用程序,但排除选定 + 经 VPN 代理的应用程序: %1$s + 不允许通过VPN的应用:%1$s + 程序 %s 已经从设备上卸载,正在将其从应用过滤规则中移除。 + 将VPN 用于所有的应用程序,但排除选定 VPN 是只用于所选的应用程序 删除远程服务器的条目吗? - Thorny + 保存 删除 添加新的远程服务器 连接时随机选择配置文件 @@ -265,7 +361,7 @@ 早期的KitKat版本在TCP连接上设置了错误的MSS值 (#61948)。OpenVPN将自动启动mssfix选项来解决这个Bug。 在DNS服务没有设置的情况下,安卓会继续使用手机wifi的代理设置。 安卓OpenVPN会在日志文件中留下警告信息。在VPN设置DNS服务时,安卓不是代理;安卓系统里没有为vpn连接设置代理的程序接口。 在被卸载或重新安装时,VPN程序会停止工作;详细信息请参看 #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 + 配置的客户端IP及其网络掩码中的IP不会代理到VPN。 OpenVPN通过显式地添加一个可应对客户端IP及其网络掩码的路由来解决这个错误 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是不会起作用的。 有多个用户报告说,在使用VPN应用时,移动连接/移动数据连接经常会掉线。该行为似乎只影响一些移动运营商/设备组合,目前为止尚未确定原因及bug解决方案。 @@ -315,6 +411,9 @@ 三星手机几乎是最热销的安卓机,同时三星的固件也是bug最多的 Android 固件。Bug 并不局限于运行在这些设备上的VPN,但其中许多可以是可以想办法绕开的。下面列出几个已知Bug:\n\nDNS 不工作,除非其在VPN 地址池内.\n\n很多三星5.X设备上 允许/禁止 应用程序的特性并不能工作。 \n在三星 6.x 机器上只有VPN应用被加入省电模式白名单之后VPN才能工作。 三星手机 没有选定的 VPN。 + 默认VPN + VPN 在 VPN 需要默认使用在的地方。这些对于目前上启动,总是在和快速设置平铺。 + 目前选择的VPN:\'%s\' 重新连接 VPN切换 连接到%s @@ -322,4 +421,29 @@ 输入连接重试时间间隔的最大值。OpenVPN在每次不成功的连接尝试后都会慢慢提高等待时间,直到提高到这个值后停止。默认值300秒。 连接重试最长间隔 连接重试期间已等待 %s 秒 + 网络更多.. - > VPNS]]> + 连接到OpenVPN已关闭(%s) + 更改排序 + 排序 + 根据最近使用的配置排序 + 按名字排列配置文件 + 配置使用选项 tls 远程在 2.3 中已过时,最后在 2.4 中删除 + AUTH_FAILED + 图像 + 使用对数刻度 + 没有足够的数据 + 平均每小时 + 平均每分钟 + 最后5分钟 + 接收 + 发送 + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + %.0f B + %.1f kB + %.1f MB + %.1f GB 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 8ca37880..ba2e7d8d 100755 --- a/app/src/main/res/values-zh-rTW/strings-icsopenvpn.xml +++ b/app/src/main/res/values-zh-rTW/strings-icsopenvpn.xml @@ -119,6 +119,7 @@ Tap 模式 點擊模式是不可能的非根VPN API。因此,該應用程序不能提供自來水的支持 再一次?你在開玩笑吧?這真的不支援 tap 模式,就算再寄電子郵件詢問能不能支援也是沒用的。 + 第三次嗎?實際上,一個可以寫基於屯,並添加 2 層資訊發送帶 2 層資訊上水龍頭模擬器接收。但這個水龍頭模擬器還必須實施 ARP 和可能 DHCP 用戶端。我不知道的任何人做任何工作在這個方向。與我聯繫,如果你想要開始對此編碼。 FAQ 複製記錄項目 若要複製單筆記錄,在此記錄項目上點選。若要複製/送出整筆記錄,使用送出記錄選項。如果這個按鈕在畫面中無法顯示,請使用實體的選單按鈕。 @@ -223,6 +224,7 @@ OpenVPN 運作記錄 匯入 OpenVPN 配置 電池消耗 + 在我個人的測試中的 OpenVPN 高電池消耗的主要原因是保活資料包。大多數的 OpenVPN 伺服器有一個配置指令像 \' keepalive 10 60\',這會導致用戶端和伺服器交換保活資料包每十秒。< P > 雖然這些資料包是小和不使用太多的交通,它們保持移動無線電網路忙,增加了能源消耗。(請參見 < href =\"HTTP://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\"> 無線電狀態機 |Android 開發者 < /a >) < p > 此 keepalive 設置不能更改用戶端上。只有 OpenVPN 的系統管理員可以更改的設置。< P > 不幸的 udp 使用保活大於 60 秒可以導致一些 NAT 閘道來斷開連接由於不活動超時。用不了多久使用 TCP 保持活著超時工作,但隧道 TCP 通過 TCP 表現極為不佳與高資料包丟失連接上。(請參閱 < href =\"HTTP://sites.inka.de/bigred/devel/tcp-tcp.html\"> 為什麼 TCP 在 TCP 是一個壞點子 < /a >) 網路共用的功能 (透過 Wi-Fi、USB 或藍牙) 和 VPNService API (此程式使用) 不一起作用。更多細節請看 <a href=\"https://github.com/schwabe/ics-openvpn/issues/34\">issue #34</a> VPN 與網路共用 連線重試次數 @@ -250,6 +252,7 @@ 連線中 (TCP) 身份驗證失敗 等待可使用的網路 + ↓%2$s/秒 %1$s - ↑%4$s/秒 %3$s 未連線 正在連接至 VPN %s 正在連接至 VPN %s @@ -322,6 +325,7 @@ http://crowdin.net/project/ics-openvpn/invite 匯入日誌: VPN拓撲“%3$s”規定,但使用ifconfig %1$s %2$s看起來更像是一個網絡掩碼的IP地址。假設“子網”的拓撲結構。 MSS的覆蓋值必須在0到9000的整數 + MSS的覆蓋值必須在0到9000的整數 宣布運行在他們應當限制其發送的包大小,使得後的OpenVPN已包封它們,將所得的UDP包大小的OpenVPN給對端發送將不超過此字節數的隧道的TCP會話。 (默認為1450) 覆寫TCP 裝載資料 (payload) 的最大分段大小 (MSS) 值 設定 TCP 裝載資料 (payload) 的最大分段大小 (MSS) @@ -348,6 +352,7 @@ http://crowdin.net/project/ics-openvpn/invite 重複的 VPN 設定檔 複製設定檔︰ %s 顯示記錄 + 安卓系統的多個 OpenVPN 用戶端存在。最常見是 OpenVPN 為 Android (此用戶端),OpenVPN 連接和 OpenVPN 設置。 < p > 用戶端可以分為兩組: OpenVPN 為 Android 和 OpenVPN 連接使用官方的 VPNService API (安卓 4.0 +),需要無根、 無使用根 < p > 的 OpenVPN 設置 OpenVPN 的 Android 是開源用戶端和開發的 Arne 米爾克。 它針對更高級的使用者,並提供許多設置和能力,從檔導入設定檔,配置更改內部應用程式的設定檔。用戶端基於 OpenVPN 的社區版本。它基於 OpenVPN 2.x 原始程式碼。此用戶端可以被看作是半正式的社區用戶端。< p > OpenVPN 連接是由 OpenVPN 技術公司開發的非開源用戶端用戶端縮進是一般使用的用戶端和更多針對普通使用者,並允許的 OpenVPN 設定檔導入。此用戶端基於 OpenVPN c + + 重新實現的 OpenVPN 協定 (這要求允許 OpenVPN 技術,公司將發佈 iOS OpenVPN 應用程式)。此用戶端是最古老的用戶端和也的使用者介面對於開放源碼 OpenVPN OpenVPN 技術 < p > OpenVPN 設置的官方用戶端。與安卓系統的 OpenVPN 它需要根和不使用 VPNService API。它不依賴于安卓 4.0 + OpenVPN Android 用戶端之間的差異 忽略多點傳送路徑:%s Android 只支援無類別域間 (CIDR) 路由到此 VPN。因為非無類別域間 (CIDR) 路由幾乎不會被使用,OpenVPN for Android 將使用 /32 非無類別域間 (CIDR) 路由處理這個警告。 @@ -355,7 +360,9 @@ http://crowdin.net/project/ics-openvpn/invite 早期的 KitKat 版本在 TCP 連線中,設定錯誤的最大分段大小 (MSS) 值 (#61948)。試著開啟 mssfix 選項來繞開這個 bug。 Android 沒有 DNS 伺服器設定時,會繼續使用你指定的行動/Wi-Fi 連線代理設定。OpenVPN for Android 會在日誌中記錄警告訊息。

當 VPN 有設定 DNS 伺服器時,因為,Android API 中無法為 VPN 連線設定代理,所以,將不會使用代理設定。

當解除安裝或重新安裝,VPN 應用程式也會停止運作。詳細資訊起參閱 #80074 + 台灣繁體中文 VPN 不會對次級使用者作用。 + Vpn是幹嗎? 非無類別域間 (CIDR) 路由 VPN 的代理行為 重新安裝 VPN 應用程式 @@ -363,9 +370,11 @@ http://crowdin.net/project/ics-openvpn/invite %s 的副本 路由到設定的 IP 位址 VPN 連線錯誤的最大分段大小 (MSS) 值 + 二级平板电脑用户 指定自訂連線的特定選項,請小心使用 自定義選項 刪除連線項目 + 了解! 遠端網路無法連線 保持 tun 模式 %s 及更高版本 @@ -393,6 +402,8 @@ http://crowdin.net/project/ics-openvpn/invite 憑證撤銷清單 (可選) 三星手機 沒有 VPN 被選擇 + 預設 VPN + VPN 在 VPN 需要預設使用在的地方。這些對於目前上啟動,總是在和快速設置平鋪。 重新連線 切換 VPN 連線到 %s diff --git a/app/src/main/res/values/refs.xml b/app/src/main/res/values/refs.xml index 2b00d5b5..c968b05c 100644 --- a/app/src/main/res/values/refs.xml +++ b/app/src/main/res/values/refs.xml @@ -13,15 +13,15 @@ @android:drawable/ic_menu_view @android:drawable/ic_menu_delete @android:drawable/ic_menu_edit - - + @drawable/ic_menu_archive + @drawable/vpn_item_settings @android:drawable/ic_menu_add @android:drawable/ic_dialog_alert @android:drawable/ic_menu_add - + @drawable/ic_menu_archive @android:drawable/ic_menu_delete - - + @drawable/ic_menu_copy_holo_light + @drawable/ic_menu_log @android:drawable/ic_menu_sort_by_size \ No newline at end of file diff --git a/app/src/main/res/values/strings-icsopenvpn.xml b/app/src/main/res/values/strings-icsopenvpn.xml index 52abd9a5..5094b909 100755 --- a/app/src/main/res/values/strings-icsopenvpn.xml +++ b/app/src/main/res/values/strings-icsopenvpn.xml @@ -436,16 +436,34 @@ %.1f kbit/s %.1f Mbit/s %.1f Gbit/s - <p>Starting with OpenSSL version 1.1, OpenSSL rejects weak signatures in certificates like MD5.</p><p><b>MD5 signatures are insecure and should not be used anymore.</b> MD5 collisions can be created in <a href="https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html">few hours at a minimal cost.</a>. You should update the VPN certificates as soon as possible.</p><p>Unfortunately, older easy-rsa distributions included the config option "default_md md5". If you are using an old easy-rsa version, update to the <a href="https://github.com/OpenVPN/easy-rsa/releases">latest version</a>) or change md5 to sha256 and regenerate your certificates.</p><p>If you really want to use old and broken certificates use the custom configuration option tls-cipher "DEFAULT:@SECLEVEL=0" under advanced configuration or as additional line in your imported configuration</p> - -%.0f B + <p>Starting with OpenSSL version 1.1, OpenSSL rejects weak signatures in certificates like + MD5.</p><p><b>MD5 signatures are completely insecure and should not be used anymore.</b> MD5 + collisions can be created in <a + href="https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html">few hours at a minimal cost.</a>. + You should update the VPN certificates as soon as possible.</p><p>Unfortunately, older easy-rsa + distributions included the config option "default_md md5". If you are using an old easy-rsa version, update to + the <a href="https://github.com/OpenVPN/easy-rsa/releases">latest version</a>) or change md5 to sha256 and + regenerate your certificates.</p><p>If you really want to use old and broken certificates use the custom + configuration option tls-cipher "DEFAULT:@SECLEVEL=0" under advanced configuration or as additional line in your + imported configuration</p> + + %.0f B %.1f kB %.1f MB %.1f GB Connection statistics Ongoing statistics of the established OpenVPN connection Connection status change - Status changes of the OpenVPN connection (Connecting, authenticating,…) + Status changes of the OpenVPN connection (Connecting, authenticating,…) Weak (MD5) hashes in certificate signature (SSL_CTX_use_certificate md too weak) + OpenSSL Speed Test + OpenSSL cipher names + OpenSSL Crypto Speed test + OpenSSL returned an error + Running test… + Test selected algorithms + An external app tries to control %s. The app requesting access cannot be determined. Allowing this app grants ALL apps access. + The OpenVPN 3 C++ implementation does not support static keys. Please change to OpenVPN 2.x under general settings. + Using PKCS12 files directly with OpenVPN 3 C++ implementation is not supported. Please import the pkcs12 files into the Android keystore or change to OpenVPN 2.x under general settings. diff --git a/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java index 850983a9..8896cd5d 100644 --- a/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java +++ b/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java @@ -63,16 +63,17 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable if(!setConfig(configstr)) return; setUserPW(); + VpnStatus.logInfo(platform()); VpnStatus.logInfo(copyright()); - StatusPoller statuspoller = new StatusPoller(5000); + StatusPoller statuspoller = new StatusPoller(OpenVPNManagement.mBytecountInterval*1000); new Thread(statuspoller,"Status Poller").start(); ClientAPI_Status status = connect(); if(status.getError()) { VpnStatus.logError(String.format("connect() error: %s: %s",status.getStatus(),status.getMessage())); } else { - VpnStatus.logInfo("OpenVPN3 thread finished"); + VpnStatus.logDebug("OpenVPN3 thread finished"); } statuspoller.stop(); } @@ -103,7 +104,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable if(ipv6) mService.addRoutev6(address + "/" + prefix_length,"tun"); else - mService.addRoute(new CIDRIP(address, prefix_length)); + mService.addRoute(new CIDRIP(address, prefix_length), true); return true; } @@ -112,8 +113,8 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable if(ipv6) mService.addRoutev6(address + "/" + prefix_length, "wifi0"); else { - //TODO - mService.addRoute(address, String.valueOf(prefix_length), "1.2.3.4" , "wifi0"); + CIDRIP route = new CIDRIP(address, prefix_length); + mService.addRoute(route, false); } return true; } @@ -133,7 +134,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public boolean tun_builder_set_session_name(String name) { - VpnStatus.logInfo("We should call this session" + name); + VpnStatus.logDebug("We should call this session" + name); return true; } @@ -164,7 +165,12 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public boolean tun_builder_reroute_gw(boolean ipv4, boolean ipv6, long flags) { - //ignore + if (ipv4) + mService.addRoute("0.0.0.0", "0.0.0.0", "127.0.0.1", OpenVPNService.VPNSERVICE_TUN); + + if (ipv6) + mService.addRoutev6("::/0", OpenVPNService.VPNSERVICE_TUN); + return true; } @@ -179,11 +185,12 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable config.setContent(vpnconfig); config.setTunPersist(mVp.mPersistTun); config.setGuiVersion(mVp.getVersionEnvString(mService)); + //config.setPlatformVersion(mVp.getPlatformVersionEnvString()); config.setExternalPkiAlias("extpki"); ClientAPI_EvalConfig ec = eval_config(config); if(ec.getExternalPki()) { - VpnStatus.logError("OpenVPN seem to think as external PKI"); + VpnStatus.logDebug("OpenVPN3 core assumes an external PKI config"); } if (ec.getError()) { VpnStatus.logError("OpenVPN config file parse error: " + ec.getMessage()); @@ -196,7 +203,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public void external_pki_cert_request(ClientAPI_ExternalPKICertRequest certreq) { - VpnStatus.logError("EXT PKI CERT"); + VpnStatus.logDebug("Got external PKI certificate request from OpenVPN core"); String[] ks = mVp.getKeyStoreCertificates((Context) mService); if(ks==null) { certreq.setError(true); @@ -215,7 +222,8 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public void external_pki_sign_request(ClientAPI_ExternalPKISignRequest signreq) { - signreq.setSig(mVp.getSignedData(signreq.getData())); + VpnStatus.logDebug("Got external PKI signing request from OpenVPN core"); + signreq.setSig(mVp.getSignedData(signreq.getData(), false)); } void setUserPW() { @@ -244,12 +252,13 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public boolean stopVPN(boolean replaceConnection) { + stop(); return false; } @Override public void networkChange(boolean sameNetwork) { - + reconnect(1); } @Override @@ -288,6 +297,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public void stop() { super.stop(); + mService.openvpnStopped(); } @Override -- cgit v1.2.3 From 25339acbb45d6a0e54a446a632570daae2471481 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 1 Feb 2018 17:03:13 +0100 Subject: #8832 update resources and set to latest submodule commits --- app/src/main/res/menu/logmenu.xml | 8 +- app/src/main/res/values-ja/strings-icsopenvpn.xml | 4 + app/src/main/res/values-ko/strings-icsopenvpn.xml | 29 +- app/src/main/res/values-nl/strings-icsopenvpn.xml | 328 ++++++++++++++++------ app/src/main/res/values-ru/strings-icsopenvpn.xml | 17 ++ app/src/main/res/values-sv/strings-icsopenvpn.xml | 11 + app/src/main/res/values-tr/strings-icsopenvpn.xml | 1 + app/src/main/res/values-uk/plurals-icsopenvpn.xml | 23 +- app/src/main/res/values-uk/strings-icsopenvpn.xml | 18 ++ app/src/main/res/values-v21/refs.xml | 10 +- app/src/main/res/values/refs.xml | 10 +- 11 files changed, 362 insertions(+), 97 deletions(-) (limited to 'app/src') diff --git a/app/src/main/res/menu/logmenu.xml b/app/src/main/res/menu/logmenu.xml index cb9a86f0..4c8daf35 100644 --- a/app/src/main/res/menu/logmenu.xml +++ b/app/src/main/res/menu/logmenu.xml @@ -37,6 +37,8 @@ android:id="@+id/edit_vpn" android:alphabeticShortcut="e" android:icon="@drawable/ic_menu_edit" - android:showAsAction="ifRoom" - android:title="@string/edit_vpn"/> - \ No newline at end of file + android:showAsAction="withText|ifRoom" + android:title="@string/edit_vpn" + android:visible="false"/> + + diff --git a/app/src/main/res/values-ja/strings-icsopenvpn.xml b/app/src/main/res/values-ja/strings-icsopenvpn.xml index 0f55b892..c491ce93 100755 --- a/app/src/main/res/values-ja/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ja/strings-icsopenvpn.xml @@ -481,4 +481,8 @@ Android 4.4以上はポリシールーティングを使用します。route/ifc %.1f kB %.1f MB %.1f GB + OpenSSLスピードテスト + OpenSSLがエラーを返しました + テストを実行中... + 外部アプリが%sを制御しようとしています。アクセスをリクエストしているアプリは特定できません。このアプリを許可すると、すべてのアプリがアクセス許可されます。 diff --git a/app/src/main/res/values-ko/strings-icsopenvpn.xml b/app/src/main/res/values-ko/strings-icsopenvpn.xml index 6a35b580..e610bf79 100755 --- a/app/src/main/res/values-ko/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ko/strings-icsopenvpn.xml @@ -257,7 +257,7 @@ VPN %s 연결중 VPN %s 연결중 일부 버전의 안드로이드 4.1에서는 키 저장소 인증서의 이름에 비영숫자 문자(공백, 밑줄 또는 대시)가 포함된 경우 문제가 있습니다. 특수 문자 없는 인증서를 다시 가져와 보세요. - 암호화 암호 + 암호화 알고리즘 패킷 인증 패킷 인증 방법 입력 %s가 빌드 @@ -438,8 +438,35 @@ %.1f kbit/s %.1f Mbit/s %.1f Gbit/s + <p>OpenSSL 1.1 버전부터, OpenSSL은 MD5와 같은, 인증서의 약한 서명을 + 거부합니다.</p><p><b>MD5 서명은 완전히 불안전하고 더이상 사용하지 않아야 합니다.</b> MD5 + 충돌은 <a + href=\"https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html\">매우 적은 비용으로 + 수 시간 안에</a> 만들 수 있습니다. + 가능한 한 빨리 VPN 인증서를 업데이트해야 합니다.</p><p>불행하게도 오래된 easy-rsa 배포판은 + 구성 옵션 \"default_md md5\"가 포함되어 있습니다. 만약 오래된 easy-rsa 버전을 + 사용하신다면 <a href=\"https://github.com/OpenVPN/easy-rsa/releases\">최신 버전</a>으로 업데이트하시거나 + md5를 sha256으로 바꾸고 당신의 인증서를 + 재생성하세요.</p><p>정말 오래되고 깨진 인증서를 사용하고 싶으시다면 + 사용자 지정 구성 옵션 tls-cipher \"DEFAULT:@SECLEVEL=0\"를 고급 구성에서 설정하거나 + 불러오는 구성 파일에 추가해 넣으세요.</p> + %.0f B %.1f kB %.1f MB %.1f GB + 연결 통계 + 수립된 OpenVPN 연결의 진행 통계 + 연결 상태 변화 + OpenVPN 연결의 상태 변화 (연결중, 인증중,…) + 인증서 서명에 약한 (MD5) 해시 사용 (SSL_CTX_use_certificate md too weak) + OpenSSL 속도 테스트 + OpenSSL 암호화 알고리즘 이름 + OpenSSL 암호화 속도 테스트 + OpenSSL이 오류를 반환함 + 테스트 수행 중… + 선택한 알고리즘 테스트 + 어떤 외부 앱이 %s를 제어하려고 합니다. 접근을 요청하는 앱을 정해 놓을 수 없습니다. 이 앱을 허용하면 모든 앱의 접근을 승인하게 됩니다. + OpenVPN 3 C++ 구현은 고정 키를 지원하지 않습니다. 일반 설정에서 OpenVPN 2.x로 변경해 주세요. + OpenVPN 3 C++ 구현과 함께 PKCS12 파일을 직접 사용하는 것은 지원되지 않습니다. PKCS12 파일을 안드로이드 키 저장소로 가져 오거나 일반 설정에서 OpenVPN 2.x으로 변경하세요. diff --git a/app/src/main/res/values-nl/strings-icsopenvpn.xml b/app/src/main/res/values-nl/strings-icsopenvpn.xml index 05a1f54c..737cc2d3 100755 --- a/app/src/main/res/values-nl/strings-icsopenvpn.xml +++ b/app/src/main/res/values-nl/strings-icsopenvpn.xml @@ -12,14 +12,14 @@ Map is onleesbaar Selecteer Annuleer - Geen Gegevens + Geen Data LZO Compressie Geen Certificaat Client Certificaat Client Certificaat Sleutel PKCS12 Bestand CA Certificaat - Je moet een certificaat selecteren + U moet een certificaat selecteren De broncode en bugs zijn te vinden op https://github.com/schwabe/ics-openvpn/ Het programma gebruikt de volgende componenten. Zie de broncode voor volledige details over de licenties. Over @@ -27,24 +27,24 @@ Type PKCS12 Wachtwoord Selecteer… - Je moet een bestand selecteren + U moet een bestand selecteren Gebruik TLS autentificatie TLS Richting - Voer een IPv6 Adres/Netmask in met het CIDR Formaat (b.v. 2000:dd::23/64) - Voer een IPv4 Adres/Netmask in met het CIDR Formaat (b.v. 1.2.3.4/24) - IPv6 Adres - IPv4 Adres - Geavanceerde OpenVPN opties. Veel van de tun gerelateerde OpenVPN instellingen worden niet ondersteund. Als u denkt dat een belangrijke optie ontbreekt, neem dan contact op met de auteur. + Voer IPv6-adres/Netmask in CIDR-indeling in (bijv. 2000:dd::23/64) + Voer IPv4-adres/Netmask in CIDR-indeling in (bijv. 1.2.3.4/24) + IPv4 Adres + IPv6 Adres + Geavanceerde OpenVPN opties. Wees voorzichtig. Veel van de tun gerelateerde OpenVPN instellingen worden niet ondersteund. Als u denkt dat een belangrijke optie ontbreekt, neem dan contact op met de auteur Gebruikersnaam - wachtwoord + Wachtwoord Voor de statische configuratie worden de TLS Auth keys als statische sleutels gebruikt - VPN configureren + Configureer de VPN Profiel toevoegen Voer een naam in voor het nieuwe Profiel - Profielnaam is al in gebruik - Profiel name - Geen gebruikerscertificaat geselecteerd - Je moet een CA certificaat selecteren + Voer een unieke profielnaam in + Profielnaam + U moet een gebruikerscertificaat selecteren + U moet een CA-certificaat selecteren Geen fout. Fout in de configuratie Fout bij inlezen van IPv4-adres @@ -55,51 +55,51 @@ Het profiel zoals aangegeven in de snelkoppeling kon niet gevonden worden. Willekeurig Host Voorvoegsel Voegt 6 willekeurige tekens toe voor de hostname - Eigen configuratie opties - Geef je eigen configuratieopties aan. Wees voorzichtig! + Aangepaste opties inschakelen + Geef aangepaste opties op. Wees voorzichtig! Route geweigerd door Android Verbinding verbreken VPN verbinding verbreken logboek wissen Annuleer bevestiging Sluit de verbonden VPN af/annuleer de verbindingspoging? - VPN wissen + VPN verwijderen Controleert of de server een certificaat met TLS Server extensions gebruikt (--remote-cert-tls server) Verwacht TLS server-certificaat - Controleert de externe server certificaathouder + Controleert de DN van het externe servercertificaat Controleer Certificaat Hostname - Specificeer de controle die gebruikt wordt om het externe certificaat DN te controleren (bijv. C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de) \n\nSpecificeer de complete DN of de RDN (openvpn.blinkt.de in het voorbeeld) of een RDN-voorvoegsel voor verificatie. \n\nWanneer het gebruikte RDN-voorvoegsel \"Server\" overeenkomt met \"Server-1\" en \"Server-2\"\n\nEen leeg tekstveld zorgt dat de RDN wordt gecontroleerd tegen de hostnaam van de server.\n\nVoor meer details zie de OpenVPN 2.3.1+ manpage onder -verify-x509-naam + Specificeer de controle die gebruikt wordt om het externe certificaat DN te verifiëren (bijv. C=DE, L=Paderborn, OU=Avian IP Carriers, CN=openvpn.blinkt.de)\n\nSpecificeer de volledige DN of de RDN (openvpn.blinkt.de in het voorbeeld) of een RDN-voorvoegsel voor verificatie.\n\nWanneer het gebruikte RDN-voorvoegsel \"Server\" overeenkomt met \"Server-1\" en \"Server-2\"\n\nEen leeg tekstveld zorgt dat de RDN wordt gecontroleerd tegen de hostnaam van de server.\n\nVoor meer details zie de OpenVPN 2.3.1+ manpage onder --verify-x509-name Externe certificaathouder - Activeert TLS Key verificatie + Activeert TLS Key Authenticatie TLS Auth Bestand - Vraag IP adres, routes en timing opties van de server. - De server vraagt geen informatie op. Instellingen moeten onderaan worden gespecificeerd. - Pull Instellingen + Verzoek IP adres, routes en timing opties van de server. + Er wordt geen informatie gevraagd van de server. Instellingen moeten hieronder worden gespecificeerd. + Verkrijg Instellingen DNS DNS Instellingen van Server Overschrijven Gebruik eigen DNS Servers - Zoekd domein - Primaire DNS server + Zoek domein + DNS server die moet worden gebruikt. DNS Server - Secundaire DNS server. Deze wordt gebruikt voor het geval dat de primaire DNS server niet bereikbaar is + Secundaire DNS server die gebruikt wordt wanneer de primaire DNS server niet bereikbaar is. Backup DNS server Negeer ontvangen routes Negeer routes ontvangen van de server. Leid al het Verkeer over de VPN Gebruik standaard Route - Aangepaste routes invoeren. Voer alleen de bestemming in CIDR-formaat. \"10.0.0.0/8 2002::/16\" zou de netwerken 10.0.0.0/8 en 2002::/16 via de VPN routeren. + Aangepaste routes invoeren. Voer alleen de bestemming in CIDR-formaat in. \"10.0.0.0/8 2002::/16\" zou de netwerken 10.0.0.0/8 en 2002::/16 via de VPN routeren. Routes die niet via de VPN moeten worden gerouteerd. Gebruik dezelfde syntaxis als voor opgenomen routes. - Eigen routes + Aangepaste routes Uitgesloten netwerken - Logging nivo - Geverifieerde pakketen zijn vanuit elk IP toegestaan + Logboek registratie niveau + Laat geauthenticeerde pakketten toe vanaf elk IP-adres Zwevende server toestaan Aangepaste Opties VPN Instellingen Bewerken - De VPN-profiel \'%s\' verwijderen? - Op sommige aangepaste ICS-afbeeldingen kunnen de rechten op /dev/tun verkeerd zijn, of de tun module kan volledig ontbreken. Voor CM9-afbeeldingen, probeer de optie herstel eigendom onder algemene instellingen - Fout bij het openen van de tun interface - "Fout:" + Verwijder het VPN-profiel \'%s\'? + Op sommige aangepaste ICS-ROM\'s kunnen de rechten op /dev/tun verkeerd zijn, of de tun module kan volledig ontbreken. Voor CM9-ROM\'s, probeer de optie herstel eigenaar onder algemene instellingen + Kon de tun interface niet openen + "Fout: " Leeg maken Openen tun interface: Lokaal IPv4: %1$s/%2$d IPv6: %3$s MTU: %4$d @@ -107,57 +107,60 @@ Routes: %1$s %2$s Uitgesloten routes: %1$s %2$s VpnService routes geïnstalleerd: %1$s %2$s - Gekregen interface informatie %1$s en %2$s, ervan uitgaande dat tweede adres het peer-adres van remote is. Gebruik /32 netmask voor lokaal IP. De modus die door OpenVPN wordt gegeven is \"%3$s\". - Begrijp %1$s en %2$s niet als IP-route met CIDR-netmasker, en /32 als netmask gebruiken. + Verkreeg interface informatie %1$s en %2$s, ervan uitgaande dat tweede adres het peer-adres van remote is. Gebruik /32 netmask voor lokale IP. De modus die door OpenVPN wordt gegeven is \"%3$s\". + Kan %1$s en %2$s niet als IP-route met CIDR-netmask begrijpen met /32 als netmask. Gecorrigeerde route van %1$s/%2$s naar %3$s/%2$s Geen toegang tot de Android Keychain certificaten. Dit kan veroorzaakt worden door een upgrade van de firmware or door het herstellen van een backup van de app/appinstellingen. Pas de VPN-configuratie aan en selecteer opnieuw het certificaat onder basisintellingen om de opslagtoestemming opnieuw te verlenen om het certificaat te laden. %1$s %2$s - Logboek verzenden - Verzenden - ICS OpenVPN logbestand - Kopiëer de log ingave naar het clip bord + Verzend logboek + Verzend + ICS OpenVPN logboek + Logboekmelding gekopieerd naar klembord Tap mode - De VPN API van Android werkt zonder rooten van de telefoon en ondersteunt alleen de tun modus. Daarom is de tap modus niet mogelijk met deze app. - Alweer? Maak je een grapje? Nee, tap mode wordt echt niet ondersteund en meer mails sturen met het verzoek of het ondersteund kan worden zal echt niet helpen, dus Neen. - Veelgestelde vragen + Tap mode is niet mogelijk met de niet-root VPN API. Daarom kan deze applicatie geen tap ondersteuning bieden + Alweer? Maak je een grap? Nee, tap mode wordt echt niet ondersteund en meer mails sturen met het verzoek of het ondersteund kan worden zal echt niet helpen. + Een derde keer? Eigenlijk zou men een tap-emulator kunnen schrijven gebaseerd op tun die layer2-informatie zou toevoegen bij versturen en strip layer2-informatie bij ontvangst. Maar deze tap-emulator zou ook ARP en mogelijk een DHCP-client moeten implementeren. Ik ben me niet bewust van iemand die enig werk in deze richting doet. Neem contact met me op als je dit wilt gaan programmeren. + FAQ Loggegevens aan het kopiëren - Om een logboekvermelding te kopiëren, houd de vermelding lang ingedrukt. Om het hele logboek te kopiëren, gebruik de \'Verstuur Logboek\' optie. Gebruik de hardwaretoets als de knop niet zichtbaar is in de interface. + Om een enkel logboekitem te kopiëren, houd de vermelding lang ingedrukt. Om het hele logboek te kopiëren, gebruik de \'Verzend Logboek\' optie. Gebruik de hardwaretoets als de knop niet zichtbaar is in de interface. Snelkoppeling naar start U kunt een snelkoppeling plaatsen om OpenVPN vanaf uw startscherm te starten. Afhankelijk van uw startscherm moet u een snelkoppeling of een widget toevoegen. Uw afbeelding ondersteunt geen VPNService API, sorry :( - Codering - Codering methode + Encryptie + Voer encryptiemethode in Voer het encryptie-cijfer algoritme in dat door OpenVPN wordt gebruikt. Laat leeg om het standaard cijfer te gebruiken. Voer de authenticatieverdeling in die gebruikt wordt voor OpenVPN. Laat leeg om de standaard verdeling te gebruiken. Authenticatie/Encryptie - Bestandsbeheer + Bestandsverkenner + Inline bestand Fout bij het importeren van het bestand Kan bestand niet importeren vanuit het bestandssysteem - [[Inline bestand data]] + [[Inline bestandsgegevens]] Weigering om tun apparaat zonder IP-informatie te openen - Importeer profiel van ovpn bestand - Import + Profiel importeren uit ovpn-bestand + Importeer Kon het profiel niet lezen om te importeren Fout bij het lezen van het configuratiebestand Profiel toevoegen Kon het bestand %1$s, zoals aangegeven in de geïmporteerde configuratie niet vinden - Geïmporteerde configuratie bestand uit %1$s - Uw configuratie heeft een paar configuratieopties die niet gekoppeld zijn aan User Interface configuraties. Deze opties werden toegevoegd als aanpasbare configuratieopties. De aanpasbare configuratie wordt hieronder weergegeven: - Lezen van configuratie bestand afgesloten. - Verbindt niet met lokaal adres en poort - Geen locale binding - configuratie bestand importeren + Configuratiebestand importeren uit bron %1$s + Uw configuratie heeft een paar configuratieopties die niet gekoppeld zijn aan gebruikersinterface configuraties. Deze opties werden toegevoegd als aanpasbare configuratieopties. De aanpasbare configuratie wordt hieronder weergegeven: + Klaar met lezen van configuratiebestand. + Bind niet aan lokaal adres en poort + Geen lokale binding + Importeer configuratiebestand Beveiligingsoverwegingen - "Omdat OpenVPN beveiligingsgevoelig is, zijn enkele notities over beveiliging zinvol. Alle gegevens op de sdcard zijn inherent onzeker. Elke app kan het lezen (bijv. Dit programma heeft geen speciale sd-kaartrechten nodig). De gegevens van deze applicatie kunnen alleen worden gelezen door de toepassing zelf. Door de invoeroptie voor cacert/cert/key in het bestandsdialoog te gebruiken worden de gegevens opgeslagen in het VPN-profiel. De VPN-profielen zijn alleen toegankelijk door deze toepassing. (Vergeet niet de kopieën op de sd kaart daarna te verwijderen). Hoewel deze alleen door deze applicatie alleen toegankelijk zijn, is de data nog steeds ongecodeerd. Door de telefoon te rooten of andere exploits te gebruiken kan het mogelijk zijn om de gegevens terug te halen. Opgeslagen wachtwoorden worden ook in gewone tekst opgeslagen. Voor pkcs12-bestanden is het sterk aan te bevelen dat je ze importeert in de Android-keystore." + "Omdat OpenVPN beveiligingsgevoelig is, zijn enkele opmerkingen over beveiliging verstandig. Alle gegevens op de sdcard zijn onveilig. Elke app kan het lezen (dit programma vereist bijvoorbeeld geen speciale SD-kaartrechten). De gegevens van deze app kunnen alleen worden gelezen door deze app zelf. Door de importoptie voor cacert/cert/key in het bestandsdialoogvenster te gebruiken, worden de gegevens opgeslagen in het VPN-profiel. De VPN-profielen zijn alleen toegankelijk voor deze app. (Vergeet niet om de kopieën op de SD-kaart achteraf te verwijderen). Hoewel deze gegevens alleen toegankelijk zijn voor deze app, zijn ze nog steeds niet geëncrypteerd. Door het rooten van de telefoon of andere exploits is het mogelijk om de gegevens op te halen. Opgeslagen wachtwoorden worden ook als niet-gecodeerde tekst opgeslagen. Voor pkcs12 bestanden is het sterk aanbevolen dat je ze importeert in de Android keystore." Importeren Fout bij het weergeven van de certificaat selectie - Er is een uitzondering gevonden om het dialoogvenster Android 4.0+ certificaat te laten zien. Dit mag nooit gebeuren, aangezien dit een standaard functionaliteit van Android 4.0+ is. Misschien werkt uw Android ROM-ondersteuning voor certificaatopslag niet meer + Er is een uitzondering opgetreden bij het weergeven van het dialoogvenster voor het selecteren van certificaten voor Android 4.0+. Dit zou nooit mogen gebeuren omdat dit een standaardfunctie is van Android 4.0+. Misschien werkt uw Android ROM-ondersteuning voor het opslaan van certificaten niet meer IPv4 IPv6 Wachten op status bericht… Geïmporteerd profiel Geïmporteerd profiel %d - Niet Werkende Afbeeldingen + Niet Werkende ROM\'s + <p> Officiële HTC-ROM\'s hebben een vreemd routeringsprobleem waardoor verkeer niet door de tunnel kan stromen (zie ook <a href=\"https://github.com/schwabe/ics-openvpn/issues/18\">Issue 18</a> in de bug-tracker.) </p><p> Van de officiële SONY-ROM\'s van Xperia Arc S en Xperia Ray is gemeld dat de VPNService volledig mist van de ROM. (Zie ook <a href=\"https://github.com/schwabe/ics-openvpn/issues/29\">Issue 29</a> in de bug-tracker.) </p><p>Aan aangepaste build-ROM\'s ontbreekt de tun-module of zijn de rechten van /dev/tun mogelijk onjuist. Sommige CM9-ROM\'s hebben de optie \'Eigenaar bevestigen\' onder \'Apparaatspecifieke hacks\' ingeschakeld nodig.</p><p>Het belangrijkste is: als uw apparaat een kapotte Android-ROM heeft, moet u dit melden aan uw leverancier. Hoe meer mensen een probleem melden aan de leverancier, des te groter de kans is dat ze het probleem oplossen.</p> PKCS12 Bestand Encryptie Sleutel Privé Sleutel Wachtwoord Wachtwoord @@ -165,49 +168,78 @@ TLS Authenticatie/Encryptie Gegenereerde Configuratie Instellingen - Probeert de eigenaar van /dev/tun naar het systeem in te stellen. Sommige CM9-beelden hebben dit nodig om de VPNService API te laten werken. Vereist Root toegang. - Verbeter eigendom van /dev/tun + Probeert de eigenaar van /dev/tun naar het systeem in te stellen. Sommige CM9-ROM\'s hebben dit nodig om de VPNService API te laten werken. Vereist root toegang. + Herstel eigenaar van /dev/tun Toont het gegenereerde OpenVPN configuratiebestand Bewerken van \"%s\" - Opbouwen configuratie… + Configuratie bouwen… Het inschakelen van deze optie zal opnieuw verbinden na het veranderen van de netwerk status (bijv. van WiFi naar mobiel) forceren Opnieuw verbinden na netwerkverandering Netwerk status: %s De CA-certificaat wordt meestal teruggestuurd vanuit de Android-keystore. Geef een apart certificaat op als u certificaatverificatiefouten krijgt. Selecteer + Geen CA-certificaat geretourneerd tijdens het lezen van de Android keystore. Verificatie zal waarschijnlijk mislukken. + Toont het logboekvenster bij verbinden. Het logboekvenster is altijd toegankelijk via de meldingsstatus. Toon logboekvenster + %10$s %9$s draait op %3$s %1$s (%2$s), Android %6$s (%7$s) API %4$d, ABI %5$s, (%8$s) Fout bij het ondertekenen met Android keystore sleutel %1$s: %2$s + De VPN-verbindingswaarschuwing die aangeeft dat deze app al het verkeer kan onderscheppen, wordt door het systeem opgelegd om misbruik van de VPNService-API te voorkomen.\nDe VPN-verbindingsmelding (het sleutelsymbool) wordt ook door het Android-systeem opgelegd om een ​​actieve VPN-verbinding te signaleren. Op sommige ROM\'s speelt deze melding een geluid af.\nAndroid heeft deze systeemdialogen voor uw eigen veiligheid geïntroduceerd en ervoor gezorgd dat deze niet kunnen worden omzeild. (Bij sommige ROM\'s bevat dit helaas een meldingsgeluid) Verbindingswaarschuwing en meldingsgeluid + Nederlandse vertaling door de gebruikers op crowdin.com IP en DNS Basis - Route + Routing Vreemde OpenVPN-instellingen. Normaal niet nodig. - Geanvanceerd + Geavanceerd ICS Openvpn configuratie + Er worden geen DNS-servers gebruikt. Naamomzetting werkt mogelijk niet. Overweeg om aangepaste DNS-servers in te stellen. Houd er ook rekening mee dat Android uw proxy-instellingen gebruikt die zijn opgegeven voor uw mobiele/Wi-Fi-verbinding wanneer er geen DNS-servers zijn ingesteld. + Kon DNS-server \"%1$s\" niet toevoegen, geweigerd door het systeem: %2$s + Kan IP-adres \'%1$s\' niet configureren, geweigerd door het systeem: %2$s + <p>Ontvang een werkende config (getest op je computer of gedownload van je provider/organisatie) </p><p>Als het een enkel bestand is zonder extra pem/pkcs12-bestanden, kun je jezelf het bestand e-mailen en de bijlage openen. Als je meerdere bestanden hebt zet ze dan op je sd-kaart.</p><p>Klik op de e-mailbijlage/Gebruik het mappictogram in de vpn-lijst om het configuratiebestand te importeren</p><p>Als er fouten zijn over ontbrekende bestanden plaats dan de ontbrekende bestanden op je sd-kaart.</p><p>Klik op het opslaan symbool om de geïmporteerde VPN aan uw VPN-lijst toe te voegen</p><p>Verbind de VPN door op de naam van de VPN</p><p> te klikken. Als er fouten of waarschuwingen in het logboek zijn, probeer dan de waarschuwingen/fouten te begrijpen en probeer ze op te lossen</p> Snelle start + Probeer de tun.ko kernelmodule te laden voordat u probeert verbinding te maken. Apparaat moet rooted zijn. Laad tun module - Fout bij het opvragen van proxy-instellingen: %s + Importeer PKCS12 van configuratie naar Android Keystore + Fout bij het verkrijgen van proxy-instellingen: %s + Proxy %1$s %2$d is in gebruik Gebruik systeemproxy - Gebruik de systeemconfiguratie voor HTTP/HTTPS proxys om te verbinden. - Verbinden bij het opstarten + Gebruik de systeemconfiguratie voor HTTP/HTTPS proxies om te verbinden. + OpenVPN verbindt met de opgegeven VPN als deze actief was bij het opstarten van het systeem. Lees de FAQ over verbindingswaarschuwingen voordat u deze optie gebruikt op Android < 5.0. + Verbinden bij opstarten Negeren Opnieuw starten + Configuratiewijzigingen worden toegepast na het herstarten van de VPN. (Her)start het VPN nu? Configuratie gewijzigd + Kan het laatst verbonden profiel niet bepalen om te bewerken + Dubbele notificaties + Als Android met weinig systeemgeheugen (RAM) staat, worden apps en services die momenteel niet nodig zijn uit het actieve geheugen verwijderd. Hiermee wordt een doorlopende VPN-verbinding beëindigd. Om ervoor te zorgen dat de verbinding/OpenVPN overleeft, wordt de service met een hogere prioriteit uitgevoerd. Om met een hogere prioriteit uit te voeren, moet de toepassing een melding weergeven. Het sleutel notificatie icoon wordt door het systeem opgelegd zoals beschreven in het vorige FAQ item. Het telt niet als app-melding met als doel om als hogere prioriteit uitgevoerd te worden. Geen VPN-profielen gedefinieerd. + Gebruik het pictogram <img src=\"ic_menu_add\"/> om een ​​nieuwe VPN toe te voegen + Gebruik het pictogram <img src=\"ic_menu_archive\"/> om een ​​bestaand (.ovpn of .conf) profiel te importeren van uw sdcard. + Bekijk ook de FAQ. Er is een snelstartgids. + Routing/Interface-configuratie + De routerings- en interfaceconfiguratie wordt niet uitgevoerd via traditionele ifconfig/route-opdrachten, maar met behulp van de VPNService-API. Dit resulteert in een andere routeringsconfiguratie dan in andere besturingssystemen. \nDe configuratie van de VPN-tunnel bestaat uit het IP-adres en de netwerken die via deze interface moeten worden gerouteerd. Er is met name geen peer-partneradres of gateway-adres nodig of vereist. Speciale routes om de VPN-server te bereiken (bijvoorbeeld toegevoegd bij gebruik van redirect-gateway) zijn ook niet nodig. De toepassing zal bijgevolg deze instellingen negeren bij het importeren van een configuratie. De app zorgt er met de VPNService API voor dat de verbinding met de server niet wordt gerouteerd via de VPN-tunnel. \nDe VPNService API staat geen specificatie van netwerken toe die niet via de VPN moeten worden gerouteerd. Als een tijdelijke oplossing probeert de app netwerken te detecteren die niet via een tunnel moeten worden gerouteerd (bijvoorbeeld route xxxx yyyy net_gateway) en wordt een reeks routes berekend die deze routes uitsluiten om het gedrag van andere platforms te emuleren. Het logvenster toont de configuratie van de VPNService bij het tot stand brengen van een verbinding. \n Achter de schermen: Android 4.4+ gebruikt beleidsroutering. Met behulp van route/ifconfig worden de geïnstalleerde routes niet weergegeven. Gebruik ip-rule ipv, iptables -t mangle -L Niet terugvallen op geen VPN-verbinding wanneer OpenVPN opnieuw aan het verbinden is. Persistent tun - OpenVPN log + OpenVPN logboek Importeer OpenVPN configuratie Batterijverbruik - De Android Tethering feature (via WiFi, USB of Bluetooth) en de VPNService API (die gebruikt wordt door dit programma) werken niet samen. Voor meer details, zie <a href=\"https://github.com/schwabe/ics-openvpn/issues/34\">issue #34</a> + In mijn persoonlijke tests zijn de keepalive-pakketten de belangrijkste reden voor een hoog batterijverbruik van OpenVPN. De meeste OpenVPN-servers hebben een configuratierichtlijn zoals \'keepalive 10 60\', waardoor de client en de server elke tien seconden keepalive-pakketten uitwisselen. <p> Hoewel deze pakketten klein zijn en weinig verkeer gebruiken, houden ze het mobiele radionetwerk bezig en verhogen ze het energieverbruik. (Zie ook <a href=\"http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine\">De Radio Status Machine | Android Ontwikkelaars</a>) <p> Deze keepalive-instelling kan niet worden gewijzigd op de client. Alleen de systeembeheerder van OpenVPN kan de instelling wijzigen. <p> Helaas kan het gebruik van een keepalive van meer dan 60 seconden met UDP ertoe leiden dat sommige NAT-gateways de verbinding verbreken vanwege een time-out wegens inactiviteit. TCP gebruiken met een lange keep-alive time-out werkt, maar TCP over TCP tunneling presteert extreem slecht bij verbindingen met een hoog pakketverlies. (Zie <a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">Waarom TCP via TCP een slechte gedachte is</a>) + De Android Tethering functie (via WiFi, USB of Bluetooth) en de VPNService API (die gebruikt wordt door deze app) werken niet samen. Zie <a href=\"https://github.com/schwabe/ics-openvpn/issues/34\">issue #34</a> voor meer informatie VPN en Tethering - Verbinding pogingen + Verbindingspogingen Instellingen voor opnieuw verbinden + Aantal seconden te wachten tussen verbindingspogingen. Seconden tussen verbindingen + OpenVPN is onverwacht gecrasht. Overweeg de optie Minidump verzenden in het hoofdmenu + Verzend Minidump naar ontwikkelaar + Stuurt foutopsporingsinformatie over de laatste crash naar de ontwikkelaar OpenVPN - %s - Aan het verbinden - Wachten op antwoord van de server - Inloggen + %1$s - %2$s + %1$s - %3$s, %2$s + Bezig met verbinden + Wachten op antwoord van server + Authenticeren Clientconfiguratie ophalen IP-addressen toewijzen Routes toevoegen @@ -217,12 +249,17 @@ Afsluiten Niet actief Hostnamen omzetten - Aan het verbinden (TCP) - Inloggen mislukt + Bezig met verbinden (TCP) + Authenticeren mislukt Wachten op bruikbaar netwerk + ↓%2$s %1$s - ↑%4$s %3$s Niet verbonden - Verbinding maken met VPN %s - Verbinding maken met VPN %s + Verbinden met VPN %s + Verbinden met VPN %s + Sommige versies van Android 4.1 hebben problemen als de naam van het keystore-certificaat niet-alfanumerieke tekens bevat (zoals spaties, onderstrepingstekens of streepjes). Probeer het certificaat opnieuw te importeren zonder speciale tekens + Encryptiecijfer + Packet-authenticatie + Voer de methode voor pakketauthenticatie in gebouwd door %s debug build officiële build @@ -231,11 +268,21 @@ Toevoegen Verstuur configureerbestand Volledige DN + Uw geïmporteerde configuratie gebruikte de oude AFGEKEURDE tls-remote optie die een ander DN-formaat gebruikt. + RDN (algemene naam) RDN voorvoegsel + tls-remote (VEROUDERD) U kunt helpen met vertalen door naar https://crowdin.net/project/ics-openvpn/invite te gaan + %1$s probeert %2$s te beheren + Door verder te gaan, geeft u de toepassing toestemming om OpenVPN voor Android volledig te beheren en om alle netwerkverkeer te onderscheppen.NIET accepteren, tenzij u de toepassing vertrouwt. Anders loopt u het risico dat uw gegevens worden aangetast door kwaadaardige software.\" Ik vertrouw deze applicatie. + Geen app toegestaan ​​om externe API te gebruiken Toegestane apps: %s + Lijst met toegestane externe apps wissen?\nHuidige lijst met toegestane apps:\n\n%s + Pauzeer VPN wanneer het scherm is uitgeschakeld en minder dan 64 kB gegevens overgedragen in 60s. Wanneer de \"Persistent Tun\" optie is ingeschakeld, pauzeert de VPN uw apparaat zonder netwerkverbinding. Zonder de \"Persistent Tun\" optie heeft het apparaat geen VPN-verbinding/bescherming. + Pauzeer de VPN-verbinding na het uitschakelen van het scherm Verbinding pauzeren als het scherm uit staat: minder dan %1$s in %2$ss + Waarschuwing: Persistent tun is niet ingeschakeld voor deze VPN. Verkeer gebruikt de normale internetverbinding wanneer het scherm is uitgeschakeld. Wachtwoord opslaan Pauzeer VPN Hervat VPN @@ -246,58 +293,175 @@ Applicatiegedrag VPN gedrag Verandering aan VPN-profielen toestaan + Hardware Keystore: Miniatuur van app die OpenVPN voor Android wilt gebruiken "Vanaf Android 4.3 is de VPN-bevestiging beveiligd tegen apps die over andere apps tekenen. Dit betekent dat het dialoogvenster niet reageert op aanrakingen. Als u een app heeft die over andere apps tekent kan dit de oorzaak zijn. Als u een app vind die dit doet, neem dan contact op met de makers van de app. Dit probleem heeft betrekking op alle VPN applicaties op Android 4.3 en later. Zie ook <a href=\"https://github.com/schwabe/ics-openvpn/issues/185\">Issue 185<a> voor meer details." VPN-bevestigingsdialoogvenster U kunt ook een donatie sturen in de Play Store: Bedankt voor het doneren van %s! - Log gewist. + Logboek gewist. Toon wachtwoord KeyChain toegangsfout: %s Kort ISO - Tijdsstempels + Tijdstempels Geen Upload Download VPN Status Toon opties + Niet-afgehandelde uitzondering: %1$s\n\n%2$s + %3$s: %1$s\n\n%2$s + Als u uw Android-apparaat hebt geroot, kun je de <a href=\"http://xposed.info/\">Xposed framework</a> en de <a href=\"http://repo.xposed.info/module/de.blinkt.vpndialogxposed\">VPN Dialoog bevestigings module</a> op eigen risico installeren\" Volledige licenties + Netwerken die rechtstreeks zijn verbonden met de lokale interfaces, worden niet via de VPN gerouteerd. Als u deze optie uitschakelt, worden alle verkeer gericht op lokale netwerken omgeleid naar de VPN. VPN passeren voor lokale netwerken Gebruikersnaam/Wachtwoord bestand [Geïmporteerd uit: %s] Sommige bestanden konden niet worden gevonden. Selecteer de bestanden om het profiel te importeren: Om deze app te gebruiken heeft u een VPN aanbieder/VPN gateway nodig die OpenVPN ondersteunt (vaak aangeboden door uw werkgever). Kijk op https://community.openvpn.net/ voor meer informatie over OpenVPN en hoe u uw eigen OpenVPN server kunt opzetten. - Importeer log: + Importeer logboek: + Vpn-topologie \"%3$s\" opgegeven, maar ifconfig %1$s %2$s lijkt meer op een IP-adres met een netwerkmask. Uitgaande van \"subnet\" topologie. + De overschrijvingswaarde van MSS moet een geheel getal tussen 0 en 9000 zijn + De MTU overschrijfwaarde moet een geheel getal tussen 64 en 9000 zijn + Kondig aan TCP-sessies die over de tunnel lopen aan dat ze hun verzendpakketgroottes zodanig moeten beperken dat nadat OpenVPN ze heeft ingekapseld, de resulterende UDP-pakketgrootte die OpenVPN naar zijn peer stuurt, dit aantal bytes niet overschrijdt. (standaard is 1450) + Overschrijf de MSS-waarde van de TCP-payload + MSS waarde van TCP-payload instellen Cliëntgedrag - Aan het laden… + Verwijder toegestane externe apps + Laden… Toegestane VPN apps: %1$s Niet toegestane VPN apps: %1$s + Pakket %s is niet meer geïnstalleerd en wordt verwijderd uit de lijst met toegestane/niet toegestane apps + VPN wordt gebruikt voor alle apps, maar exclusief geselecteerd VPN wordt alleen voor geselecteerde apps gebruikt - Vermelding van de externe server verwijderen? + Externe server verwijderen? Houden Verwijderen + Nieuwe externe verbinding toevoegen + Gebruik verbindingen in willekeurige volgorde bij verbinden U moet tenminste één externe server definiëren en inschakelen. Serverlijst Toegestane apps Geavanceerde instellingen + Payload opties TLS-instellingen + Geen externe verbinding gedefinieerd VPN profiel dupliceren + Profiel dupliceren: %s Toon logboek + Er bestaan ​​meerdere OpenVPN-clients voor Android. De meest voorkomende zijn OpenVPN voor Android (deze client), OpenVPN Connect en OpenVPN-instellingen.<p>De clients kunnen in twee groepen worden gegroepeerd: OpenVPN voor Android en OpenVPN Connect gebruiken de officiële VPNService API (Android 4.0+) en vereisen geen root en OpenVPN Instellingen die vereist root.<p>OpenVPN voor Android is een open source-client en ontwikkeld door Arne Schwabe. Het is gericht op meer geavanceerde gebruikers, biedt veel instellingen, de mogelijkheid om profielen uit bestanden te importeren en profielen in de app te configureren/wijzigen. De client is gebaseerd op de communityversie van OpenVPN. Het is gebaseerd op de OpenVPN 2.x-broncode. Deze client kan worden gezien als de semi-officiële client van de community. <p>OpenVPN Connect is een niet-open-sourceclient die is ontwikkeld door OpenVPN Technologies, Inc. Die client is meer gericht op de gemiddelde gebruiker en staat de import van OpenVPN-profielen toe. Deze client is gebaseerd op de OpenVPN C++ herimplementatie van het OpenVPN-protocol (Dit was vereist om OpenVPN Technologies, Inc een iOS OpenVPN-app te kunnen laten publiceren). Deze client is de officiële client van de OpenVPN-technologieën <p> OpenVPN-instellingen is de oudste van de clients en ook een gebruikersinterface voor Open Source OpenVPN. In tegenstelling tot OpenVPN voor Android is root vereist en wordt de VPNService-API niet gebruikt. Het is niet afhankelijk van Android 4.0+ + Verschillen tussen de OpenVPN Android-clients + Multicast-route negeren: %s + Android ondersteunt alleen CIDR-routes naar de VPN. Omdat niet-CIDR routes bijna nooit worden gebruikt, zal OpenVPN voor Android een /32 gebruiken voor routes die geen CIDR zijn en een waarschuwing geven. + Tethering werkt terwijl de VPN actief is. De tethered-verbinding maakt GEEN gebruik van de VPN. + Vroege KitKat-versie heeft de verkeerde MSS-waarde ingesteld voor TCP-verbindingen (#61948). Probeer de mssfix-optie in te schakelen om deze bug te omzeilen. + Android blijft uw proxy-instellingen gebruiken die zijn opgegeven voor de mobiel/wifi-verbinding wanneer er geen DNS-servers zijn ingesteld. OpenVPN voor Android waarschuwt u hierover in het logboek.

Wanneer een VPN een DNS-server instelt, gebruikt Android geen proxy. Er is geen API om een ​​proxy in te stellen voor een VPN-verbinding.

+ VPN-apps werken mogelijk niet meer wanneer ze worden verwijderd en opnieuw worden geïnstalleerd. Voor details zie #80074 + Het geconfigureerde client-IP en de IP\'s in het netwerkmask worden niet naar de VPN gerouteerd. OpenVPN werkt om deze bug heen door expliciet een route toe te voegen die overeenkomt met het IP-adres van de client en zijn netmask + Als een tun-apparaat wordt geopend terwijl een ander tun-apparaat actief is, deze wordt gebruikt voor ondersteuning voor persist-tun, crasht het de VPNServices op het apparaat. Opnieuw opstarten is vereist om VPN opnieuw te laten werken. OpenVPN voor Android probeert te voorkomen dat het tun-apparaat opnieuw wordt geopend en als het echt nodig is, sluit het eerst de huidige TUN voordat het nieuwe TUN-apparaat wordt geopend om te voorkomen dat het crasht. Dit kan leiden tot een kort venster waarin pakketten via de niet-VPN-verbinding worden verzonden. Zelfs met deze tijdelijke oplossing crasht de VPNServices soms en is het opnieuw opstarten van het apparaat vereist. + VPN werkt niet helemaal voor secundaire gebruikers. + "Meerdere gebruikers melden dat de mobiele verbinding/mobiele gegevensverbinding vaak wordt verbroken tijdens het gebruik van de VPN-app. Het gedrag lijkt alleen maar op een combinatie van enkele mobiele providers/apparaten van invloed te zijn en tot nu toe kon geen oorzaak/oplossing voor de bug worden geïdentificeerd." + Alleen de bestemming kan worden bereikt via de VPN die bereikbaar is zonder VPN. IPv6 VPN\'s werken helemaal niet. + Niet CIDR-routes + Proxy-gedrag voor VPN\'s + Herinstalleren van VPN-apps %s en eerder Kopie van %s + Route naar het geconfigureerde IP-adres + Verkeerde MSS-waarde voor VPN-verbinding Secundaire tabletgebruikers + Specificeer aangepaste verbindingsopties. Gebruik voorzichtig + Aangepaste Opties + Verwijder de verbinding + Willekeurige verbroken verbinding met mobiel netwerk + Externe netwerken niet bereikbaar + Persistente tun mode %s en hoger + Verbindingen mislukken met SSL23_GET_SERVER_HELLO:sslv3 waarschuwing voor handshake + Nieuwere OpenVPN voor Android-versies (0.6.29/maart 2015) gebruiken een veiligere standaard voor de toegestane coderingssuites (tls-cipher \"DEFAULT:!EXP:!PSK:!SRP:!KRSA\"). Helaas, het weglaten van de minder veilige cipher suites en export cipher suites, met name het weglaten van cipher suites die geen ondersteuning bieden voor Perfect Forward Secrecy (Diffie-Hellman) veroorzaakt een aantal problemen. Dit wordt meestal veroorzaakt door een goedbedoelde maar slecht uitgevoerde poging om de beveiliging van TLS te verbeteren door tls-cipher op de server in te stellen of door een aantal ingesloten besturingssystemen met uitgeklede SSL (bijv. MikroTik). \nOm dit probleem op te lossen stelt u het tls-cijfer in instellingen op de server naar redelijke standaard zoals tls-cipher \"DEFAULT:!EXP:!PSK:!SRP:!kRSA\". Om het probleem op de client te omzeilen, voegt u de aangepaste optie tls-cipher DEFAULT toe aan de Android-client. + Dit profiel is toegevoegd vanuit een externe app (%s) en is gemarkeerd als niet bewerkbaar door de gebruiker. + Certificaatintrekkingslijst + OpenVPN-service herstarten (App vastgelopen, deze is waarschijnlijk gecrasht of gestopt vanwege te weinig vrij geheugen) + Het importeren van de configuratie leverde een fout op, kan deze niet opslaan Zoeken + (Laatste dump is %1$d:%2$du oud (%3$s)) + Logboek wissen bij nieuwe verbinding + Verbinding Timeout + Geen toegestane app toegevoegd. Onszelf toevoegen (%s) om ten minste één app in de lijst met toegestane apps te hebben om niet alle apps te accepteren + OpenVPN voor Android kan proberen om ontbrekende bestand(en) op de sdcard automatisch te vinden. Tik op dit bericht om het toestemmingsverzoek te starten. Protocol Ingeschakeld + Voorkeurs native ABI-prioriteit van dit apparaat (%1$s) en ABI gerapporteerd door native bibliotheken (%2$s) komen niet overeen + VPN-machtiging ingetrokken door OS (bijv. andere VPN-app gestart), VPN wordt gestopt + Push Peer-info + Verzend extra informatie naar de server, bijvoorbeeld SSL-versie en Android-versie + %1$s is nodig + Voer het wachtwoord in voor profiel %1$s + Gebruik inline gegevens + Exporteer configuratiebestand + tls-auth-bestand ontbreekt + Ontbrekend gebruikerscertificaat of gebruikerscertificaatsleutelbestand + Ontbrekend CA-certificaat + Certifcate Intrekkingslijst (optioneel) + Herlas (%d) logboekitems uit logboekcachebestand + Hoewel Samsung-telefoons tot de meest verkochte Android-telefoons behoren, behoort de firmware van Samsung ook tot de meest buggy-Android-firmware. De bugs zijn niet beperkt tot de VPN-werking op deze apparaten, maar veel van deze kunnen worden omzeild. Hieronder worden enkele van deze bugs beschreven.\n\nDNS werkt alleen als de DNS-server zich in het VPN-bereik bevindt.\n\nOp veel Samsung 5.x-apparaten werkt de functie toegestane/niet-toegestane apps niet.\nOp Samsung 6.x VPN meldt dat het niet werkt tenzij de VPN-app is vrijgesteld van Powersave-functies. Samsung telefoons Geen VPN geselecteerd. + Standaard VPN + VPN gebruikt op plaatsen waar een standaard VPN nodig is. Deze bevinden zich momenteel in het opstartproces, voor Always-On en de Quick Settings Tile. + Momenteel geselecteerde VPN: \'%s\' Opnieuw verbinden + Schakel VPN in/uit Verbinden met %s Verbinding met %s verbreken + Voer de maximale tijd in tussen verbindingspogingen. OpenVPN verhoogt langzaam de wachttijd na een niet-succesvolle verbindingspoging tot deze waarde. Standaard ingesteld op 300s. + Maximale tijd tussen verbindingspogingen + %ss seconden aan het wachten tussen verbindingspoging + Netwerken meer ... -> VPNS]]> + Verbinding met OpenVPN gesloten (%s) Verander sortering Sorteer Profielen gesorteerd op laatst recent gebruikte Profielen gesorteerd op naam + Config gebruikt de optie tls-remote die in 2.3 is verouderd en uiteindelijk is verwijderd in 2.4 + Gedrag op AUTH_FAILED + Grafiek + Gebruik logaritmische schaal + Niet genoeg data + Gemiddeld per uur + Gemiddeld per minuut + Laatste 5 minuten + In + Uit + %.0f bit/s + %.1f kbit/s + %.1f Mbit/s + %.1f Gbit/s + <p>Beginnend met OpenSSL version 1.1, OpenSSL verwerpt zwakke handtekeningen in certificaten zoals + MD5.</p><p><b>MD5 handtekeningen zijn volledig onveilig en zouden niet meer mogen worden gebruikt.</b> MD5 + botsingen kunnen worden gemaakt in <a + href=\"https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html\">enkele uren tegen minimale kosten.</a>. + Je moet de VPN-certificaten zo snel mogelijk bijwerken.</p><p>Helaas bevatten oudere easy-rsa-distributies de configuratieoptie \"default_md md5\". Als je een oude easy-rsa-versie gebruikt, update dan naar + <a href=\"https://github.com/OpenVPN/easy-rsa/releases\">laatste versie</a>) of verander md5 naar sha256 en + regenereer je certificaten.</p><p>Als je echt oude en gebroken certificaten wilt gebruiken, gebruik dan de aangepaste configuratie-optie tls-cipher \"DEFAULT:@SECLEVEL=0\" onder geavanceerde configuratie of als een extra regel in uw geïmporteerd configuratiebestand</p> + + %.0f B + %.1f kB + %.1f MB + %.1f GB + Verbindingsstatistieken + Lopende statistieken van de tot stand gebrachte OpenVPN-verbinding + Verbindingsstatus wijzigen + Statuswijzigingen van de OpenVPN-verbinding (Verbinden, authenticeren,…) + Zwakke (MD5) hashes in certificaathandtekening (SSL_CTX_use_certificate md too weak) + OpenSSL Snelheidstest + OpenSSL cipher namen + OpenSSL Crypto snelheidstest + OpenSSL heeft een fout geretourneerd + Testen… + Test geselecteerde algoritmes + Een externe app probeert %s te besturen. De app die om toegang vraagt, kan niet worden vastgesteld. Als u deze app toestaat, krijgen ALLE apps toegang. + De OpenVPN 3 C++ -implementatie ondersteunt geen statische sleutels. Verander naar OpenVPN 2.x onder algemene instellingen. + PKCS12-bestanden rechtstreeks gebruiken met OpenVPN 3 C++ -implementatie wordt niet ondersteund. Importeer de pkcs12-bestanden in de Android keystore of verander naar OpenVPN 2.x onder algemene instellingen. diff --git a/app/src/main/res/values-ru/strings-icsopenvpn.xml b/app/src/main/res/values-ru/strings-icsopenvpn.xml index f73a09f9..73acc96a 100755 --- a/app/src/main/res/values-ru/strings-icsopenvpn.xml +++ b/app/src/main/res/values-ru/strings-icsopenvpn.xml @@ -438,8 +438,25 @@ %.1f Кбит/с %.1f Мбит/с %.1f Гбит/с + <p> Начиная с OpenSSL версии 1.1, OpenSSL отклоняет слабые подписи в таких сертификатах, как MD5.</p><p><b>MD5, подписи полностью небезопасны и больше не должны использоваться.</b> Столкновения MD5 могут быть созданы в <a + href=\"https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html\"> через несколько часов с минимальными затратами.</a>. Вы должны как можно скорее обновить сертификаты VPN. </p><p>К сожалению, старые дистрибутивы easy-rsa включали опцию конфигурации «default_md md5». Если вы используете старую версию easy-rsa, обновите ее до <a href=\"https://github.com/OpenVPN/easy-rsa/releases\">latest версии</a>) или измените md5 на sha256 и восстановите свои сертификаты.</p><p>Если вы действительно хотите использовать старые и поврежденные сертификаты, используйте настраиваемый параметр конфигурации tls-cipher «DEFAULT: @SECLEVEL = 0 \"в расширенной конфигурации или в качестве дополнительной строки в вашей импортированной конфигурации</p> + %.0f Б %.1f КБ %.1f МБ %.1f ГБ + Статистика подключения + Текущая статистика установленного соединения OpenVPN + Изменение статуса соединения + Изменения состояния соединения OpenVPN (подключение, аутентификация,...) + Слабые (MD5) хэши в сигнатуре сертификата (SSL_CTX_use_certificate md слишком слабый) + Тест скорости OpenSSL + Имена шифров OpenSSL + Тест скорости OpenSSL Crypto + OpenSSL возвратил ошибку + Запуск теста… + Тестирование выбранных алгоритмов + Внешнее приложение пытается контролировать %s. Приложение, запрашивающее доступ, не может быть определено. Разрешение этого приложения предоставляет доступ всем приложениям. + Реализация OpenVPN 3 C ++ не поддерживает статические ключи. Перейдите в OpenVPN 2.x под общие настройки. + Использование файлов PKCS12 напрямую с помощью OpenVPN 3 C ++ не поддерживается. Импортируйте файлы pkcs12 в хранилище ключей Android или замените OpenVPN 2.x на общие настройки. diff --git a/app/src/main/res/values-sv/strings-icsopenvpn.xml b/app/src/main/res/values-sv/strings-icsopenvpn.xml index 585844fa..c39906be 100755 --- a/app/src/main/res/values-sv/strings-icsopenvpn.xml +++ b/app/src/main/res/values-sv/strings-icsopenvpn.xml @@ -442,4 +442,15 @@ %.1f kB %.1f MB %.1f GB + Anslutningsstatistik + Löpande statistik för den etablerade OpenVPN-anslutningen + Statusändringar för OpenVPN-anslutningen (Anslutning, autentisering,...) + Svag (MD5) hashes i certifikat signatur (SSL_CTX_use_certificate md för svag) + OpenSSL-hastighetstest + OpenSSL-ciffernamn + OpenSSL returnerade ett fel + Kör test… + Testa valda algoritmer + En extern app försöker kontrollera %s. Appen som begär åtkomst kan inte bestämmas. Tillåtelse av den här appen ger åtkomst till ALLA program. + OpenVPN 3 C ++-implementeringen stöder inte statiska nycklar. Ändra till OpenVPN 2.x under allmänna inställningar. diff --git a/app/src/main/res/values-tr/strings-icsopenvpn.xml b/app/src/main/res/values-tr/strings-icsopenvpn.xml index 048e3ccd..5f82c364 100755 --- a/app/src/main/res/values-tr/strings-icsopenvpn.xml +++ b/app/src/main/res/values-tr/strings-icsopenvpn.xml @@ -455,6 +455,7 @@ OpenSSL bir hata döndürdü Test çalışıyor… Seçilen algoritmaları test edin + Harici bir uygulama, %s denetlemeyi deniyor. Erişim isteyen uygulama belirlenemedi. Uygulamaya TÜM uygulamalara erişim izni veriliyor. OpenVPN 3 C++ uygulaması statik anahtarları desteklemez. Lütfen genel ayarlar altında OpenVPN 2.x\'e geçin. diff --git a/app/src/main/res/values-uk/plurals-icsopenvpn.xml b/app/src/main/res/values-uk/plurals-icsopenvpn.xml index 70489fbc..0fa0f62e 100755 --- a/app/src/main/res/values-uk/plurals-icsopenvpn.xml +++ b/app/src/main/res/values-uk/plurals-icsopenvpn.xml @@ -1,3 +1,24 @@ - + + + Залишився один місяць + Залишось %d місяці + Залишось %d місяці(-ів) + + + Залишився один день + Залишилось %d дні + Залишилось %d днів + + + Залишилась одна година + Залишилось %d години + Залишилось %d годин + + + Залишилася одна хвилина + Залишилось %d хвилини + Залишилось %d хвилин + + diff --git a/app/src/main/res/values-uk/strings-icsopenvpn.xml b/app/src/main/res/values-uk/strings-icsopenvpn.xml index 574e96b4..61c350af 100755 --- a/app/src/main/res/values-uk/strings-icsopenvpn.xml +++ b/app/src/main/res/values-uk/strings-icsopenvpn.xml @@ -392,6 +392,7 @@ OpenVPN для Android може спробувати знайти відсутні файли на Sd карті автоматично. Натисніть на це повідомлення, щоб отримати права на дозвіл. Протокол Ввімкнено + Preferred native ABI precedence of this device (%1$s) and ABI reported by native libraries (%2$s) mismatch Дозвіл VPN відкликано ОС (наприклад, інша програма VPN запущена), зупинка VPN Отримати інформацію про піра Надіслати додаткову інформацію на сервер, наприклад версію SSL та Android @@ -437,8 +438,25 @@ %.1f Кбіт/с %.1f Мбіт/с %.1f Гбіт/с + <p> Починаючи з OpenSSL версії 1.1, OpenSSL відкидає слабкі підписи в таких сертифікатах, як MD5.</p><p><b>MD5, підписи повністю небезпечні і більше не повинні використовуватись.</b> Колізії MD5 можуть бути створені в <a + href=\"https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html\"> через декілька годин з мінімальними затратами.</a>. Ви повинні якнайшвидше оновити сертифікати VPN. </p><p>Нажаль, старі дистрибутиви easy-rsa включали опцію конфігурації «default_md md5». Якщо ви використовуєте стару версію easy-rsa, оновітб її до <a href=\"https://github.com/OpenVPN/easy-rsa/releases\">latest версії</a>) або змініть md5 на sha256 та відновіть свої сертификати.</p><p>Якщо ви дійсно хочете використовувати старі та пошкоджені сертификати, використовуйте налаштовуваний параметр конфігурації tls-cipher «DEFAULT: @SECLEVEL = 0 \"в розширеній конфігурації або в якості додаткового рядку в вашій імпортованій конфігурації</p> + %.0f Б %.1f КБ %.1f МБ %.1f ГБ + Статистика з\'єднання + Поточна статистика встановленого з\'єднання OpenVPN + Зміна статусу з\'єднання + Зміни статусу з\'єднання OpenVPN (підключення, автентифікація,...) + Слабкі (MD5) хеші в підписі сертифікату (SSL_CTX_use_certificate md надто слабкий) + Тест швидкості OpenSSL + Назви шифрів OpenSSL + Тест швидкості OpenSSL Crypto + OpenSSL повернув помилку + Запуск тесту… + Тестування вибраних алгоритмів + Зовнішній застосунок намагається контролювати %s. Застосунок, що запитує про доступ, не може бути визначений. Дозвіл цьому застосунку надає доступ всім додаткам. + Реалізація OpenVPN 3 C ++ не підтримує статичні ключи. Перейдіть в OpenVPN 2.x під загальними налаштуваннями. + Використання файлів PKCS12 напряму за допомогою OpenVPN 3 C ++ не підтримується. Імпортуйте файли pkcs12 в сховище ключів Android або замініть OpenVPN 2.x на загальні налаштування. diff --git a/app/src/main/res/values-v21/refs.xml b/app/src/main/res/values-v21/refs.xml index ae9be13f..1af5ba02 100644 --- a/app/src/main/res/values-v21/refs.xml +++ b/app/src/main/res/values-v21/refs.xml @@ -12,16 +12,16 @@ @drawable/ic_check_white_24dp @drawable/ic_filter_list_white_24dp @drawable/ic_delete_white_24dp - @drawable/ic_content_copy_white_24dp + @drawable/ic_delete_grey600_24dp @drawable/ic_edit_white_24dp - @drawable/ic_archive_white_24dp + @drawable/ic_edit_grey600_24dp - @drawable/ic_add_circle_outline_white_24dp - @drawable/ic_warning_black_36dp + + \ No newline at end of file diff --git a/app/src/main/res/values/refs.xml b/app/src/main/res/values/refs.xml index c968b05c..2b00d5b5 100644 --- a/app/src/main/res/values/refs.xml +++ b/app/src/main/res/values/refs.xml @@ -13,15 +13,15 @@ @android:drawable/ic_menu_view @android:drawable/ic_menu_delete @android:drawable/ic_menu_edit - @drawable/ic_menu_archive - @drawable/vpn_item_settings + + @android:drawable/ic_menu_add @android:drawable/ic_dialog_alert @android:drawable/ic_menu_add - @drawable/ic_menu_archive + @android:drawable/ic_menu_delete - @drawable/ic_menu_copy_holo_light - @drawable/ic_menu_log + + @android:drawable/ic_menu_sort_by_size \ No newline at end of file -- cgit v1.2.3 From 081daed0cc9ea93a81b16f096b0df66e5c8dc45b Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 2 Feb 2018 00:35:20 +0100 Subject: #8832 add missing resource references --- app/src/main/res/values-v21/refs.xml | 10 +++++----- app/src/main/res/values/refs.xml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'app/src') diff --git a/app/src/main/res/values-v21/refs.xml b/app/src/main/res/values-v21/refs.xml index 1af5ba02..ae9be13f 100644 --- a/app/src/main/res/values-v21/refs.xml +++ b/app/src/main/res/values-v21/refs.xml @@ -12,16 +12,16 @@ @drawable/ic_check_white_24dp @drawable/ic_filter_list_white_24dp @drawable/ic_delete_white_24dp - + @drawable/ic_content_copy_white_24dp @drawable/ic_delete_grey600_24dp @drawable/ic_edit_white_24dp - + @drawable/ic_archive_white_24dp @drawable/ic_edit_grey600_24dp - - + @drawable/ic_sort_white_24dp \ No newline at end of file diff --git a/app/src/main/res/values/refs.xml b/app/src/main/res/values/refs.xml index 2b00d5b5..c968b05c 100644 --- a/app/src/main/res/values/refs.xml +++ b/app/src/main/res/values/refs.xml @@ -13,15 +13,15 @@ @android:drawable/ic_menu_view @android:drawable/ic_menu_delete @android:drawable/ic_menu_edit - - + @drawable/ic_menu_archive + @drawable/vpn_item_settings @android:drawable/ic_menu_add @android:drawable/ic_dialog_alert @android:drawable/ic_menu_add - + @drawable/ic_menu_archive @android:drawable/ic_menu_delete - - + @drawable/ic_menu_copy_holo_light + @drawable/ic_menu_log @android:drawable/ic_menu_sort_by_size \ No newline at end of file -- cgit v1.2.3 From 49c3d78764d2fdbc0e58bce62a2ea8439e89d7e7 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 5 Feb 2018 14:07:39 +0100 Subject: 8832 custom build script that builds first :ics-openvpn:main and afterwards :app --- app/src/main/cpp | 1 + 1 file changed, 1 insertion(+) create mode 120000 app/src/main/cpp (limited to 'app/src') diff --git a/app/src/main/cpp b/app/src/main/cpp new file mode 120000 index 00000000..e445d43e --- /dev/null +++ b/app/src/main/cpp @@ -0,0 +1 @@ +../../../ics-openvpn/main/src/main/cpp/ \ No newline at end of file -- cgit v1.2.3 From d4633f0549b3c3c23e27fba3ab14d1a1a62978af Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 6 Feb 2018 14:09:37 +0100 Subject: #8832 more upsteam changes --- app/src/main/java/de/blinkt/openvpn/VpnProfile.java | 20 ++++---------------- .../java/de/blinkt/openvpn/core/NativeUtils.java | 7 +++++++ .../blinkt/openvpn/core/OpenVpnManagementThread.java | 19 +++++++------------ .../java/de/blinkt/openvpn/core/OpenVPNThreadv3.java | 3 ++- 4 files changed, 20 insertions(+), 29 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index 1d6f41cd..1cef6670 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -5,7 +5,6 @@ package de.blinkt.openvpn; -import de.blinkt.openvpn.core.Preferences; import se.leap.bitmaskclient.BuildConfig; import se.leap.bitmaskclient.R; @@ -23,6 +22,7 @@ import android.support.annotation.NonNull; import android.text.TextUtils; import android.util.Base64; +import de.blinkt.openvpn.core.*; import org.spongycastle.util.io.pem.PemObject; import org.spongycastle.util.io.pem.PemWriter; @@ -35,11 +35,7 @@ import java.io.Serializable; import java.io.StringWriter; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.Signature; -import java.security.SignatureException; +import java.security.*; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; @@ -54,14 +50,6 @@ import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; -import de.blinkt.openvpn.core.Connection; -import de.blinkt.openvpn.core.NativeUtils; -import de.blinkt.openvpn.core.OpenVPNService; -import de.blinkt.openvpn.core.PasswordCache; -import de.blinkt.openvpn.core.VPNLaunchHelper; -import de.blinkt.openvpn.core.VpnStatus; -import de.blinkt.openvpn.core.X509Utils; - public class VpnProfile implements Serializable, Cloneable { // Note that this class cannot be moved to core where it belongs since // the profile loading depends on it being here @@ -289,7 +277,7 @@ public class VpnProfile implements Serializable, Cloneable { public static boolean doUseOpenVPN3(Context c) { SharedPreferences prefs = Preferences.getDefaultSharedPreferences(c); boolean useOpenVPN3 = prefs.getBoolean("ovpn3", false); - if ("noovpn3".equals(BuildConfig.FLAVOR)) + if (!BuildConfig.openvpn3) useOpenVPN3 = false; return useOpenVPN3; } @@ -1091,7 +1079,7 @@ public class VpnProfile implements Serializable, Cloneable { return mPrivateKey; } - public String getSignedData(String b64data, boolean ecdsa) { + public String getSignedData(String b64data) { PrivateKey privkey = getKeystoreKey(); byte[] data = Base64.decode(b64data, Base64.DEFAULT); diff --git a/app/src/main/java/de/blinkt/openvpn/core/NativeUtils.java b/app/src/main/java/de/blinkt/openvpn/core/NativeUtils.java index ea003d41..70c7455a 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/NativeUtils.java +++ b/app/src/main/java/de/blinkt/openvpn/core/NativeUtils.java @@ -18,6 +18,13 @@ public class NativeUtils { public static native String getNativeAPI(); + + public final static int[] openSSLlengths = { + 16, 64, 256, 1024, 8 * 1024, 16 * 1024 + }; + + public static native double[] getOpenSSLSpeed(String algorithm, int testnum); + static { System.loadLibrary("opvpnutil"); if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN) diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 1124c5b7..2b6df9af 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -148,6 +148,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { // Closing one of the two sockets also closes the other //mServerSocketLocal.close(); + managmentCommand("version 2\n"); while (true) { @@ -259,11 +260,8 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { case "LOG": processLogMessage(argument); break; - case "RSA_SIGN": - processSignCommand(argument, false); - break; - case "ECDSA_SIGN": - processSignCommand(argument, true); + case "PK_SIGN": + processSignCommand(argument); break; default: VpnStatus.logWarning("MGMT: Got unrecognized command" + command); @@ -634,20 +632,17 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { releaseHold(); } - private void processSignCommand(String b64data, boolean ecdsa) { + private void processSignCommand(String b64data) { - String signed_string = mProfile.getSignedData(b64data, ecdsa); - String signcmd = "rsa-sig\n"; - if (ecdsa) - signcmd = "ecdsa-sig\n"; + String signed_string = mProfile.getSignedData(b64data); if (signed_string == null) { - managmentCommand(signcmd); + managmentCommand("pk-sig\n"); managmentCommand("\nEND\n"); stopOpenVPN(); return; } - managmentCommand(signcmd); + managmentCommand("pk-sig\n"); managmentCommand(signed_string); managmentCommand("\nEND\n"); } diff --git a/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java index 8896cd5d..54029628 100644 --- a/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java +++ b/app/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java @@ -66,6 +66,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable VpnStatus.logInfo(platform()); VpnStatus.logInfo(copyright()); + StatusPoller statuspoller = new StatusPoller(OpenVPNManagement.mBytecountInterval*1000); new Thread(statuspoller,"Status Poller").start(); @@ -223,7 +224,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public void external_pki_sign_request(ClientAPI_ExternalPKISignRequest signreq) { VpnStatus.logDebug("Got external PKI signing request from OpenVPN core"); - signreq.setSig(mVp.getSignedData(signreq.getData(), false)); + signreq.setSig(mVp.getSignedData(signreq.getData())); } void setUserPW() { -- cgit v1.2.3 From d2d61a16fd2a3ea0fd42073de98d1311b184444d Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 6 Feb 2018 14:31:07 +0100 Subject: fix build after reenabling copy classes from ics-openvpn build job --- app/src/main/java/de/blinkt/openvpn/LaunchVPN.java | 2 ++ app/src/main/java/de/blinkt/openvpn/VpnProfile.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (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 4fff3071..b2bf6b46 100644 --- a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java +++ b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java @@ -5,6 +5,8 @@ package de.blinkt.openvpn; +import se.leap.bitmaskclient.R; + import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index 1cef6670..4becdc32 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -5,9 +5,10 @@ package de.blinkt.openvpn; -import se.leap.bitmaskclient.BuildConfig; import se.leap.bitmaskclient.R; +import se.leap.bitmaskclient.BuildConfig; + import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; -- cgit v1.2.3