diff options
author | cyBerta <cyberta@riseup.net> | 2023-03-31 15:46:09 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-04-13 16:47:13 +0200 |
commit | f6017ab12d0c472ab4f22e81d9a768ad2510b134 (patch) | |
tree | 8a38157b4218b54a12f3990beaa2852917f4de1d /app/src/main/java/de/blinkt/openvpn/core/connection | |
parent | a4deca391ce064510002e24ba9f18d965f0dee59 (diff) |
don't handle obfs4 over kcp as a separate pluggable transport, instead 'tcp' and 'kcp' become valid protocols for obfs4
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/core/connection')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/connection/Connection.java | 21 |
1 files changed, 18 insertions, 3 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 f60e7333..137b3f16 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 @@ -37,10 +37,25 @@ public abstract class Connection implements Serializable, Cloneable { ORBOT } + public enum TransportProtocol { + UDP("udp"), + TCP("tcp"), + KCP("kcp"); + + String protocol; + + TransportProtocol(String transportProtocol) { + this.protocol = transportProtocol; + } + + @Override + public String toString() { + return protocol; + } + } public enum TransportType { OBFS4("obfs4"), OPENVPN("openvpn"), - OBFS4_KCP("obfs4-1"), PT("metaTransport"); @@ -56,11 +71,11 @@ public abstract class Connection implements Serializable, Cloneable { } public boolean isPluggableTransport() { - return this == OBFS4 || this == OBFS4_KCP || this == PT; + return this == OBFS4 || this == PT; } public TransportType getMetaType() { - if (this == OBFS4 || this == OBFS4_KCP || this == PT) { + if (this == OBFS4 || this == PT) { return PT; } return OPENVPN; |