[tor-commits] [orbot/master] generate nonsense named auth_privates locally when OrbotService is running

n8fr8 at torproject.org n8fr8 at torproject.org
Wed Dec 22 21:55:06 UTC 2021


commit f13b53b8384eff025501efcb187c45ad3140e801
Author: bim <dsnake at protonmail.com>
Date:   Thu Jan 28 16:04:26 2021 -0500

    generate nonsense named auth_privates locally when OrbotService is running
---
 .../src/main/java/org/torproject/android/service/OrbotService.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
index 9a401ac6..7f6612a9 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
@@ -1452,10 +1452,11 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
             }
             torrc.append("ClientOnionAuthDir " + mV3AuthBasePath.getAbsolutePath()).append('\n');
             try {
+                int i = 0;
                 while (v3auths.moveToNext()) {
                     String domain = v3auths.getString(v3auths.getColumnIndex(V3ClientAuth.DOMAIN));
                     String hash = v3auths.getString(v3auths.getColumnIndex(V3ClientAuth.HASH));
-                    File authFile = new File(mV3AuthBasePath, domain + ".auth_private");
+                    File authFile = new File(mV3AuthBasePath, (i++) + ".auth_private");
                     authFile.createNewFile();
                     FileOutputStream fos = new FileOutputStream(authFile);
                     fos.write(buildV3ClientAuthFile(domain, hash).getBytes());





More information about the tor-commits mailing list