From bb2fff07c050e24b2291ca13575f1b1cfa6085c1 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 13 Apr 2023 14:38:18 +0200 Subject: add required extra options for obfs4-hop pt --- .../java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/src/main/java/se/leap') 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; -- cgit v1.2.3