[tor-commits] [orbot/master] update torrc and torrcdiag when you need to
n8fr8 at torproject.org
n8fr8 at torproject.org
Thu Jun 12 12:29:50 UTC 2014
commit 917ec8d7a086c4ecd4edae4b6f19815c49795edb
Author: Nathan Freitas <nathan at freitas.net>
Date: Wed Jun 11 22:03:57 2014 -0400
update torrc and torrcdiag when you need to
---
.../torproject/android/service/TorResourceInstaller.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/org/torproject/android/service/TorResourceInstaller.java b/src/org/torproject/android/service/TorResourceInstaller.java
index 414c33c..c2fcb6a 100644
--- a/src/org/torproject/android/service/TorResourceInstaller.java
+++ b/src/org/torproject/android/service/TorResourceInstaller.java
@@ -135,6 +135,19 @@ public class TorResourceInstaller implements TorServiceConstants {
streamToFile(sbis,outFile,true,false);
}
+ is = context.getResources().openRawResource(R.raw.torrcdiag);
+ outFile = new File(installFolder, TORRCDIAG_ASSET_KEY);
+ shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
+ streamToFile(is,outFile, false, false);
+
+ if (extraLines != null && extraLines.length() > 0)
+ {
+ StringBufferInputStream sbis = new StringBufferInputStream('\n' + extraLines + '\n');
+ streamToFile(sbis,outFile,true,false);
+ }
+
+ shell.close();
+
return true;
}
More information about the tor-commits
mailing list