I'm doing some Tor tests, and I want to set up a "Single Onion Service". However, when I try to set it, Tor Browser crashes when starts (the exact error is: "Tor exited during startup. This might be due to an error in your torrc file, a bug in Tor or another program on your system, or faulty hardware. Until you fix the underlying problem and restart Tor, Tor Browser will not start.").
According to the Tor manual, I have written the following lines in the torrc file:
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1
However, when I write this and start Tor, Tor crashes. I think I should disable all client-side services, but I do not know how to do it. Can anybody help me?
I attached the current configuration of my torrc file:
# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1 or similar, and Tor will ignore it
DataDirectory C:\Users\Usuario\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor
GeoIPFile C:\Users\Usuario\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\geoip
GeoIPv6File C:\Users\Usuario\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\geoip6
#ServicioOculto:
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1
HiddenServiceDir C:\Ser_Oc
HiddenServicePort 80 127.0.0.1:441
If I delete the HiddenServiceNonAnonymousMode 1
and HiddenServiceSingleHopMode 1
lines, or I "disable" them writtingHiddenServiceNonAnonymousMode 0
and HiddenServiceSingleHopMode 0
, Tor starts correctly and my hidden service also works correctly.
I am using Windows 10
and Tor Browser 6.5.2
(Sorry for my English; English is not my native language).
============================================================
UPGRADE
Well, I'm going to tell you several things (although I have not been able to solve my problem).
First: Through Tor Browser (and running Tor Browser with administrator privileges), I changed the address ofHiddenServiceDirectory
to C:\Users\Usuario\Desktop\Ser_Oc
. However, I had the same problem: everything works fine, but when I add to the file torrc
the lines HiddenServiceNonAnonymousMode 1
and HiddenServiceSingleHopMode 1
, Tor Browser does not start, and displays the following error window: "Tor exited during startup. This might be due to an error in your torrc file, a bug in Tor or another program on your system, or faulty hardware. Until you fix the underlying problem and restart Tor, Tor Browser will not start"
.
I leave here the configuration of the file "torrc" when I did this new test:
# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1 or similar, and Tor will ignore it
DataDirectory C:\Users\Usuario\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor
GeoIPFile C:\Users\Usuario\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\geoip
GeoIPv6File C:\Users\Usuario\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\geoip6
HiddenServiceStatistics 0
#ServicioOculto:
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1
HiddenServiceDir C:\Users\Usuario\Desktop\Ser_Oc
HiddenServicePort 80 127.0.0.1:441
Second: When I start Expert Bundle (also with administrator privileges), the command-line interpreter shows the following:
Apr 30 13:34:59.879 [notice] Tor 0.2.9.10 (git-1f6c8eda0073f464) running on Windows 8 with Libevent 2.0.22-stable, OpenSSL 1.0.2k and Zlib 1.2.8.
Apr 30 13:34:59.883 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Apr 30 13:34:59.924 [notice] Configuration file "C:\Users\Usuario\AppData\Roaming\tor\torrc" not present, using reasonable defaults.
Apr 30 13:34:59.928 [warn] Path for GeoIPFile (<default>) is relative and will resolve to C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Tor\<default>. Is this what you wanted?
Apr 30 13:34:59.928 [warn] Path for GeoIPv6File (<default>) is relative and will resolve to C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Tor\<default>. Is this what you wanted?
Apr 30 13:34:59.931 [notice] Opening Socks listener on 127.0.0.1:9050
Apr 30 13:35:00.000 [notice] Bootstrapped 0%: Starting
Apr 30 13:35:00.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Apr 30 13:35:02.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Apr 30 13:35:02.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Apr 30 13:35:03.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Apr 30 13:35:03.000 [notice] Bootstrapped 100%: Done
However, if I put the torrc
file (with the configuration I have previously set) in C:\Users\Usuario\AppData\Roaming\tor
directory, Expert Bundle does not start: the command-line interpreter where Tor is loading closes after a few seconds. It shows no error.
Update 2
All right, everything is going well! Firstly, I have managed to start Expert Bundle and configure my service "Single Onion Service". The problem was this: I used the torrc
file from Tor Browser, so the file torrc
had the directories misconfigured!
Now, I have the following doubt. In effect, I have configured the hidden service "Single Onion Service". In fact, the Expert Bundle command interpreter says that the hidden service has been configured correctly:
Apr 30 19:16:44.217 [notice] Tor 0.2.9.10 (git-1f6c8eda0073f464) running on Windows 8 with Libevent 2.0.22-stable, OpenSSL 1.0.2k and Zlib 1.2.8.
Apr 30 19:16:44.217 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Apr 30 19:16:44.264 [notice] Read configuration file "C:\Users\Usuario\AppData\Roaming\tor\torrc".
Apr 30 19:16:44.264 [notice] HiddenServiceSingleHopMode is enabled; disabling UseEntryGuards.
Apr 30 19:16:44.264 [warn] HiddenServiceNonAnonymousMode is set. Every hidden service on this tor instance is NON-ANONYMOUS. If the HiddenServiceNonAnonymousMode option is changed, Tor will refuse to launch hidden services from the same directories, to protect your anonymity against config errors. This setting is for experimental use only.
Apr 30 19:16:44.000 [warn] This copy of Tor was compiled or configured to run in a non-anonymous mode. It will provide NO ANONYMITY.
Apr 30 19:16:44.000 [notice] The configured onion service directories have been used in single onion mode. They can not be used for anonymous hidden services.
Apr 30 19:16:44.000 [notice] Parsing GEOIP IPv4 file C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Data\Tor\geoip.
Apr 30 19:16:44.000 [notice] Parsing GEOIP IPv6 file C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Data\Tor\geoip6.
Apr 30 19:16:44.000 [notice] Bootstrapped 0%: Starting
Apr 30 19:16:46.000 [notice] Bootstrapped 5%: Connecting to directory server
Apr 30 19:16:47.000 [notice] Bootstrapped 10%: Finishing handshake with directory server
Apr 30 19:16:47.000 [notice] Bootstrapped 15%: Establishing an encrypted directory connection
Apr 30 19:16:47.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus
Apr 30 19:16:47.000 [notice] Bootstrapped 25%: Loading networkstatus consensus
Apr 30 19:16:49.000 [notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus.
Apr 30 19:16:49.000 [notice] Bootstrapped 40%: Loading authority key certs
Apr 30 19:16:49.000 [notice] Bootstrapped 45%: Asking for relay descriptors
Apr 30 19:16:49.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/7261, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of exit bw = 0% of path bw.)
Apr 30 19:16:52.000 [notice] Bootstrapped 50%: Loading relay descriptors
Apr 30 19:16:52.000 [notice] Bootstrapped 55%: Loading relay descriptors
Apr 30 19:16:53.000 [notice] Bootstrapped 60%: Loading relay descriptors
Apr 30 19:16:54.000 [notice] Bootstrapped 69%: Loading relay descriptors
Apr 30 19:16:55.000 [notice] Bootstrapped 74%: Loading relay descriptors
Apr 30 19:16:56.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Apr 30 19:16:56.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Apr 30 19:16:56.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Apr 30 19:16:57.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Apr 30 19:16:57.000 [notice] Bootstrapped 100%: Done
On the other hand, in the HiddenServiceDir
directory (C:\Users\Usuario\Desktop\lkfajsdflkasjf), I can see three files: hostname
, private_key
AND onion_service_non_anonymous
. So, I think everything is well configured.
However, when I access my to my hidden service from Tor Browser, and I see the circuit, I see six relays yet! Three relay which correspond to my Tor Browser, and then three relays which appear as "(relay)". My question is: if my hidden service is configured in "Single Onion Service" mode, why do these three relays appear? That is, theoretically my hidden service would have to connect directly to the rendezvous point, right? So, why do these three relays appear?
I put here the current configuration of my torrc file (maybe it can be useful):
# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1 or similar, and Tor will ignore it
DataDirectory C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Data\Tor
GeoIPFile C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Data\Tor\geoip
GeoIPv6File C:\Users\Usuario\Desktop\tor-win32-0.2.9.10\Data\Tor\geoip6
HiddenServiceStatistics 0
#ServicioOculto:
SocksPort 0
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1
HiddenServiceDir C:\Users\Usuario\Desktop\lkfajsdflkasjf
HiddenServicePort 80 127.0.0.1:441