From 97ca6fbd05ff456d4c8ece7259f5049f3bf4e4ff Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Tue, 28 Oct 2014 01:05:53 -0400 Subject: [PATCH] set MTU back to 1500 default --- src/org/torproject/android/vpn/OrbotVpnService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/torproject/android/vpn/OrbotVpnService.java b/src/org/torproject/android/vpn/OrbotVpnService.java index 42a3a539..b147e7df 100644 --- a/src/org/torproject/android/vpn/OrbotVpnService.java +++ b/src/org/torproject/android/vpn/OrbotVpnService.java @@ -52,6 +52,8 @@ public class OrbotVpnService extends VpnService implements Handler.Callback { private int mSocksProxyPort = 9999; private ProxyServer mProxyServer; + private final static int VPN_MTU = 1500; + @Override public int onStartCommand(Intent intent, int flags, int startId) { @@ -125,7 +127,7 @@ public class OrbotVpnService extends VpnService implements Handler.Callback { Builder builder = new Builder(); - builder.setMtu(3000); + builder.setMtu(VPN_MTU); builder.addAddress("10.0.0.1",8); builder.setSession("OrbotVPN"); builder.addRoute("0.0.0.0",0); @@ -141,7 +143,7 @@ public class OrbotVpnService extends VpnService implements Handler.Callback { try { - Tun2Socks.Start(mInterface, 3000, "10.0.0.2", "255.255.255.0", "localhost:" + TorServiceConstants.PORT_SOCKS_DEFAULT, "50.116.51.157:7300", true); + Tun2Socks.Start(mInterface, VPN_MTU, "10.0.0.2", "255.255.255.0", "localhost:" + TorServiceConstants.PORT_SOCKS_DEFAULT, "50.116.51.157:7300", true); } catch (Exception e) {