summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/connection/Connection.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/connection/Connection.java b/app/src/main/java/de/blinkt/openvpn/core/connection/Connection.java
index 6dc78a30..0b28cbca 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/connection/Connection.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/connection/Connection.java
@@ -55,8 +55,11 @@ public abstract class Connection implements Serializable, Cloneable {
return protocol;
}
}
+
+ // !! Never use valueOf() to instantiate this enum, use fromString() !!
public enum TransportType {
OBFS4("obfs4"),
+ // dashes are not allowed in enums, so obfs4-hop becomes obfs4Hop -.-
OBFS4_HOP("obfs4Hop"),
OPENVPN("openvpn"),
@@ -70,6 +73,9 @@ public abstract class Connection implements Serializable, Cloneable {
@Override
public String toString() {
+ if (this == OBFS4_HOP) {
+ return "obfs4-hop";
+ }
return transport;
}