summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-14 18:27:48 +0100
committercyBerta <cyberta@riseup.net>2021-11-14 18:27:48 +0100
commita48c6c1c719247e4663d946e4ee56bfada98b5e6 (patch)
tree9d36b07cc83f286d2495c14178e69fde4abff0f7 /app/src/main
parentbbf53b0a888656c7ce2652e4cb02811170da8d3d (diff)
allow ipv6 only openvpn gateways
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
index 6fffb403..245c7b8b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
@@ -162,16 +162,18 @@ public class VpnConfigGenerator {
StringBuilder stringBuilder = new StringBuilder();
try {
- String ipAddress = gateway.getString(IP_ADDRESS);
+ String ipAddress = null;
JSONObject capabilities = gateway.getJSONObject(CAPABILITIES);
switch (apiVersion) {
default:
case 1:
case 2:
+ ipAddress = gateway.getString(IP_ADDRESS);
gatewayConfigApiv1(stringBuilder, ipAddress, capabilities);
break;
case 3:
case 4:
+ ipAddress = gateway.optString(IP_ADDRESS);
String ipAddress6 = gateway.optString(IP_ADDRESS6);
String[] ipAddresses = ipAddress6.isEmpty() ?
new String[]{ipAddress} :