My goal is to run tor as a socks proxy, mimicking user from Switzerland (on Windows).
With "Tor Browser" distribution I was able to set country using torrc
file by adding:
ExitNodes {ch} StrictNodes 1
For some reason, when using standalone "Windows Expert Bundle" distribution and passing ExitNodes
as comman line argument this no longer works (bootstrap does not seem to complete).
Here is how I run tor and output:
C:\Users\Username\workspace\test>tor\Tor\tor.exe --SocksPort 9050 --StrictNodes 1 --ExitNodes "{ch}"
Dec 31 22:03:29.187 [notice] Tor 0.4.4.6 (git-2a8b789ea6f308d0) running on Windows 8 [or later] with Libevent 2.1.11-stable, OpenSSL 1.1.1i, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.
Dec 31 22:03:29.189 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Dec 31 22:03:29.213 [notice] Configuration file "C:\Users\Username\AppData\Roaming\tor\torrc" not present, using reasonable defaults.
Dec 31 22:03:29.215 [warn] Path for GeoIPFile (<default>) is relative and will resolve to C:\Users\Username\workspace\test\<default>. Is this what you wanted?
Dec 31 22:03:29.215 [warn] Path for GeoIPv6File (<default>) is relative and will resolve to C:\Users\Username\workspace\test\<default>. Is this what you wanted?
Dec 31 22:03:29.218 [notice] Opening Socks listener on 127.0.0.1:9050
Dec 31 22:03:29.218 [notice] Opened Socks listener on 127.0.0.1:9050
Dec 31 22:03:29.000 [warn] Failed to open GEOIP file C:\Users\Username\AppData\Roaming\tor\geoip.
Dec 31 22:03:29.000 [warn] We've been configured to use (or avoid) nodes in certain countries, and we need GEOIP information to figure out which ones they are.
Dec 31 22:03:29.000 [warn] Failed to open GEOIP file C:\Users\Username\AppData\Roaming\tor\geoip6.
Dec 31 22:03:29.000 [warn] We've been configured to use (or avoid) nodes in certain countries, and we need GEOIP information to figure out which ones they are.
Dec 31 22:03:29.000 [notice] Bootstrapped 0% (starting): Starting
Dec 31 22:03:31.000 [notice] Starting with guard context "default"
Dec 31 22:03:58.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying directory fetches again.
What am I doing wrong?
UPDATE AND SOLUTION:
Adding --GeoIPv6File <geoip6 file from distribution> --GeoIPFile "<geoip file from distribution>"
worked for me.