Skip to content

Move torrc-defaults, geoip and geoip6 on Windows and Linux

From tor-browser#41868 (closed):

Uhm I actually I remember tweaking my torrc file in the past. So I checked and I realised that I had also mistakenly edited the torrc-defaults file (ouch!) so it wouldn't get correctly updated! Indeed in the update.log file I read:

EXECUTE PATCH TorBrowser/Data/Tor/torrc-defaults
LoadSourceFile: destination file size 962 does not match expected size 834
LoadSourceFile failed
### execution failed

If you read on torrc:

# torrc-defaults for Tor Browser
#
# DO NOT EDIT THIS FILE
#
# This file is distributed with Tor Browser and SHOULD NOT be modified (it
# may be overwritten during the next Tor Browser update). To customize your
# Tor configuration, shut down Tor Browser and edit the torrc file.

So, I think that we shouldn't ship it in Browser/TorBrowser/Data/Tor, but in Browser/TorBrowser/Tor.

On macOS, we already ship these files in the app bundle.

I think this was somehow already known, because while checking I found this comment in TorLauncherUtils.jsm:

// FIXME: Should we move this file to the tor directory, in the other
// platforms, since it is not user data?

When we eventually do this, we should update also that file.

The browser expects geoip and geoip6 to be in the same directory as torrc-defaults anyway.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information