[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] more fixes for VPN but not quite ready yet



commit 3ef94e009cc0764d53351d514beb887361b481c4
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Thu Nov 13 13:40:50 2014 -0500

    more fixes for VPN but not quite ready yet
---
 src/org/torproject/android/vpn/OrbotVpnService.java |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/org/torproject/android/vpn/OrbotVpnService.java b/src/org/torproject/android/vpn/OrbotVpnService.java
index b147e7d..39c9549 100644
--- a/src/org/torproject/android/vpn/OrbotVpnService.java
+++ b/src/org/torproject/android/vpn/OrbotVpnService.java
@@ -16,6 +16,7 @@
 
 package org.torproject.android.vpn;
 
+import java.io.IOException;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.Locale;
@@ -98,6 +99,14 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
     	
         if (mProxyServer != null)
         	mProxyServer.stop();
+        
+        if (mInterface != null)
+			try {
+				mInterface.close();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
     }
 
     @Override
@@ -136,7 +145,7 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
 			        //builder.addRoute("192.168.43.0",8);
 			        builder.addDnsServer("8.8.8.8");
 			        
-			        // Create a new interface using the builder and save the parameters.
+			         // Create a new interface using the builder and save the parameters.
 			        mInterface = builder.setSession(mSessionName)
 			                .setConfigureIntent(mConfigureIntent)
 			                .establish();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits