diff options
author | cyBerta <cyberta@riseup.net> | 2023-04-13 14:38:18 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-04-13 16:47:13 +0200 |
commit | bb2fff07c050e24b2291ca13575f1b1cfa6085c1 (patch) | |
tree | 26ad57a6b1d0da0db7b25d874d20e4d67ad9ced5 /app | |
parent | 649e6487fb045ab8df0144579f74ab7123e2cbc6 (diff) |
add required extra options for obfs4-hop pt
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java | 10 |
1 files changed, 10 insertions, 0 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 4d90798d..90ffb6b0 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java @@ -381,6 +381,7 @@ public class VpnConfigGenerator { stringBuilder.append(getRouteString(ipAddress, transport)); stringBuilder.append(getRemoteString(ipAddress, transport)); + stringBuilder.append(getExtraOptions(transport)); } public String getRemoteString(String ipAddress, Transport transport) { @@ -401,6 +402,15 @@ public class VpnConfigGenerator { return REMOTE + " " + DISPATCHER_IP + " " + DISPATCHER_PORT + " tcp" + newLine; } + public String getExtraOptions(Transport transport) { + if (transport.getTransportType() == OBFS4_HOP) { + return "replay-window 65535" + newLine + + "ping-restart 300" + newLine + + "tun-mtu 48000" + newLine; + } + return ""; + } + public String getRouteString(String ipAddress, Transport transport) { if (useObfuscationPinning) { return "route " + obfuscationPinningIP + " 255.255.255.255 net_gateway" + newLine; |