renable polipo
This commit is contained in:
parent
90d77ce4be
commit
d56fdb20aa
|
@ -20,6 +20,7 @@ android {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.android.support:appcompat-v7:23.+'
|
compile 'com.android.support:appcompat-v7:23.+'
|
||||||
|
// compile group: 'org.littleshoot', name: 'littleproxy', version: '1.1.0-beta1'
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
testCompile 'junit:junit:4.12'
|
testCompile 'junit:junit:4.12'
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
@ -69,12 +70,15 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import java.util.Queue;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLEngine;
|
||||||
|
|
||||||
public class TorService extends Service implements TorServiceConstants, OrbotConstants, EventHandler
|
public class TorService extends Service implements TorServiceConstants, OrbotConstants, EventHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -85,7 +89,8 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
||||||
private TorControlConnection conn = null;
|
private TorControlConnection conn = null;
|
||||||
private Socket torConnSocket = null;
|
private Socket torConnSocket = null;
|
||||||
private int mLastProcessId = -1;
|
private int mLastProcessId = -1;
|
||||||
|
|
||||||
|
|
||||||
private int mPortHTTP = HTTP_PROXY_PORT_DEFAULT;
|
private int mPortHTTP = HTTP_PROXY_PORT_DEFAULT;
|
||||||
private int mPortSOCKS = SOCKS_PROXY_PORT_DEFAULT;
|
private int mPortSOCKS = SOCKS_PROXY_PORT_DEFAULT;
|
||||||
|
|
||||||
|
@ -504,13 +509,14 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
||||||
Log.w(OrbotConstants.TAG,"could not kill obfsclient",e);
|
Log.w(OrbotConstants.TAG,"could not kill obfsclient",e);
|
||||||
cannotKillFile = fileObfsclient;
|
cannotKillFile = fileObfsclient;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TorServiceUtils.killProcess(filePolipo);
|
TorServiceUtils.killProcess(filePolipo);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w(OrbotConstants.TAG,"could not kill polipo",e);
|
Log.w(OrbotConstants.TAG,"could not kill polipo",e);
|
||||||
cannotKillFile = filePolipo;
|
cannotKillFile = filePolipo;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TorServiceUtils.killProcess(fileTor);
|
TorServiceUtils.killProcess(fileTor);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -782,7 +788,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (mPortHTTP != -1)
|
if (mPortHTTP != -1)
|
||||||
runPolipoShellCmd();
|
runPolipoShellCmd();
|
||||||
|
|
||||||
if (Prefs.useRoot() && Prefs.useTransparentProxying())
|
if (Prefs.useRoot() && Prefs.useTransparentProxying())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue