commit 917ec8d7a086c4ecd4edae4b6f19815c49795edb
Author: Nathan Freitas <[email protected]>
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;
}
_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits