diff --git a/src/frontends/android/res/layout/profile_detail_view.xml b/src/frontends/android/res/layout/profile_detail_view.xml
index 089f0655b..57d5606ff 100644
--- a/src/frontends/android/res/layout/profile_detail_view.xml
+++ b/src/frontends/android/res/layout/profile_detail_view.xml
@@ -179,6 +179,24 @@
android:inputType="number|textNoSuggestions"
android:hint="@string/profile_use_default_hint" />
+
+
+
+
+
+
diff --git a/src/frontends/android/res/values-de/strings.xml b/src/frontends/android/res/values-de/strings.xml
index 6cdb5b37d..6cd5ba50a 100644
--- a/src/frontends/android/res/values-de/strings.xml
+++ b/src/frontends/android/res/values-de/strings.xml
@@ -67,6 +67,9 @@
MTU:
Server Port:
(Standardwert verwenden)
+ Split-Tunneling:
+ Blockiere IPv4 Verkehr der nicht für das VPN bestimmt ist
+ Blockiere IPv6 Verkehr der nicht für das VPN bestimmt ist
Bitte geben Sie hier die Gateway-Adresse ein
Bitte geben Sie hier Ihren Benutzernamen ein
diff --git a/src/frontends/android/res/values-pl/strings.xml b/src/frontends/android/res/values-pl/strings.xml
index 87c6a2726..fb2aba003 100644
--- a/src/frontends/android/res/values-pl/strings.xml
+++ b/src/frontends/android/res/values-pl/strings.xml
@@ -67,6 +67,9 @@
MTU:
Server port:
(use default)
+ Split tunneling:
+ Block IPv4 traffic not destined for the VPN
+ Block IPv6 traffic not destined for the VPN
Wprowadź adres bramki
Wprowadź swoją nazwę użytkownika
diff --git a/src/frontends/android/res/values-ru/strings.xml b/src/frontends/android/res/values-ru/strings.xml
index 4164f61ca..eabfc084b 100644
--- a/src/frontends/android/res/values-ru/strings.xml
+++ b/src/frontends/android/res/values-ru/strings.xml
@@ -64,6 +64,9 @@
MTU:
Server port:
(use default)
+ Split tunneling:
+ Block IPv4 traffic not destined for the VPN
+ Block IPv6 traffic not destined for the VPN
Пожалуйста введите адрес шлюза
Пожалуйста введите имя пользователя
diff --git a/src/frontends/android/res/values-ua/strings.xml b/src/frontends/android/res/values-ua/strings.xml
index 7e3a73531..d7c238370 100644
--- a/src/frontends/android/res/values-ua/strings.xml
+++ b/src/frontends/android/res/values-ua/strings.xml
@@ -65,6 +65,9 @@
MTU:
Server port:
(use default)
+ Split tunneling:
+ Block IPv4 traffic not destined for the VPN
+ Block IPv6 traffic not destined for the VPN
Введіть адресу шлюза тут
Введіть ім\'я користувача тут
diff --git a/src/frontends/android/res/values/strings.xml b/src/frontends/android/res/values/strings.xml
index 3c067611d..5c8ebab57 100644
--- a/src/frontends/android/res/values/strings.xml
+++ b/src/frontends/android/res/values/strings.xml
@@ -67,6 +67,9 @@
MTU:
Server port:
(use default)
+ Split tunneling:
+ Block IPv4 traffic not destined for the VPN
+ Block IPv6 traffic not destined for the VPN
Please enter the gateway address here
Please enter your username here
diff --git a/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java b/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java
index ff1625c62..a8b3daa06 100644
--- a/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java
+++ b/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java
@@ -85,6 +85,8 @@ public class VpnProfileDetailActivity extends Activity
private ViewGroup mAdvancedSettings;
private EditText mMTU;
private EditText mPort;
+ private CheckBox mBlockIPv4;
+ private CheckBox mBlockIPv6;
@Override
public void onCreate(Bundle savedInstanceState)
@@ -119,6 +121,8 @@ public class VpnProfileDetailActivity extends Activity
mMTU = (EditText)findViewById(R.id.mtu);
mPort = (EditText)findViewById(R.id.port);
+ mBlockIPv4 = (CheckBox)findViewById(R.id.split_tunneling_v4);
+ mBlockIPv6 = (CheckBox)findViewById(R.id.split_tunneling_v6);
mSelectVpnType.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
@@ -344,7 +348,8 @@ public class VpnProfileDetailActivity extends Activity
boolean show = mShowAdvanced.isChecked();
if (!show && mProfile != null)
{
- show = mProfile.getMTU() != null || mProfile.getPort() != null;
+ Integer st = mProfile.getSplitTunneling();
+ show = mProfile.getMTU() != null || mProfile.getPort() != null || (st != null && st != 0);
}
mShowAdvanced.setVisibility(!show ? View.VISIBLE : View.GONE);
mAdvancedSettings.setVisibility(show ? View.VISIBLE : View.GONE);
@@ -445,6 +450,10 @@ public class VpnProfileDetailActivity extends Activity
mProfile.setCertificateAlias(certAlias);
mProfile.setMTU(getInteger(mMTU));
mProfile.setPort(getInteger(mPort));
+ int st = 0;
+ st |= mBlockIPv4.isChecked() ? VpnProfile.SPLIT_TUNNELING_BLOCK_IPV4 : 0;
+ st |= mBlockIPv6.isChecked() ? VpnProfile.SPLIT_TUNNELING_BLOCK_IPV6 : 0;
+ mProfile.setSplitTunneling(st == 0 ? null : st);
}
/**
@@ -469,6 +478,8 @@ public class VpnProfileDetailActivity extends Activity
mPassword.setText(mProfile.getPassword());
mMTU.setText(mProfile.getMTU() != null ? mProfile.getMTU().toString() : null);
mPort.setText(mProfile.getPort() != null ? mProfile.getPort().toString() : null);
+ mBlockIPv4.setChecked(mProfile.getSplitTunneling() != null ? (mProfile.getSplitTunneling() & VpnProfile.SPLIT_TUNNELING_BLOCK_IPV4) != 0 : false);
+ mBlockIPv6.setChecked(mProfile.getSplitTunneling() != null ? (mProfile.getSplitTunneling() & VpnProfile.SPLIT_TUNNELING_BLOCK_IPV6) != 0 : false);
useralias = mProfile.getUserCertificateAlias();
alias = mProfile.getCertificateAlias();
getActionBar().setTitle(mProfile.getName());