fix bug with wrong apps being transproxied (typo!)
This commit is contained in:
parent
312c6da2c7
commit
e13d228dfc
|
@ -344,8 +344,6 @@ public class TorTransProxy implements TorServiceConstants {
|
||||||
|
|
||||||
String srcChainName = "OUTPUT";
|
String srcChainName = "OUTPUT";
|
||||||
|
|
||||||
int torUid = context.getApplicationInfo().uid;
|
|
||||||
|
|
||||||
//run the delete commands in a separate process as it might error out
|
//run the delete commands in a separate process as it might error out
|
||||||
//String[] cmdExecClear = {script.toString()};
|
//String[] cmdExecClear = {script.toString()};
|
||||||
//code = TorServiceUtils.doShellCommand(cmdExecClear, res, runRoot, waitFor);
|
//code = TorServiceUtils.doShellCommand(cmdExecClear, res, runRoot, waitFor);
|
||||||
|
@ -407,7 +405,7 @@ public class TorTransProxy implements TorServiceConstants {
|
||||||
script.append(" -t nat");
|
script.append(" -t nat");
|
||||||
script.append(" -A ").append(srcChainName);
|
script.append(" -A ").append(srcChainName);
|
||||||
script.append(" -p udp");
|
script.append(" -p udp");
|
||||||
script.append(" -m owner ! --uid-owner ");
|
script.append(" -m owner --uid-owner ");
|
||||||
script.append(tApp.getUid());
|
script.append(tApp.getUid());
|
||||||
script.append(" -m udp --dport ");
|
script.append(" -m udp --dport ");
|
||||||
script.append(STANDARD_DNS_PORT);
|
script.append(STANDARD_DNS_PORT);
|
||||||
|
@ -441,9 +439,12 @@ public class TorTransProxy implements TorServiceConstants {
|
||||||
{
|
{
|
||||||
SimpleCommand cmd = new SimpleCommand(cmdString + "|| exit");
|
SimpleCommand cmd = new SimpleCommand(cmdString + "|| exit");
|
||||||
shell.add(cmd);
|
shell.add(cmd);
|
||||||
logMessage(cmdString);// + "; exit=" + cmd.getExitCode() + ";output=" + cmd.getOutput());
|
int exitCode = cmd.getExitCode();
|
||||||
|
String output = cmd.getOutput();
|
||||||
|
|
||||||
return cmd.getExitCode();
|
logMessage(cmdString + "; exit=" + exitCode + ";output=" + output);
|
||||||
|
|
||||||
|
return exitCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue