0

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
1
  • However, when I access my to my hidden service from Tor Browser, and I see the circuit, I see six relays <- this is because Tor doesn't know anything about the path beyond the third relay. It knows it's a hidden service, so those relays are just there as placeholders. From your clients perspective, it can't determine if there is 1 or 3 hops after the rendezvous point.
    – cacahuatl
    Apr 30, 2017 at 20:21

1 Answer 1

2

According to the manpage you can't have a SocksPort configured:

HiddenServiceSingleHopMode requires HiddenServiceNonAnonymousMode to be set to 1. Since a Single Onion service is non-anonymous, you can not configure a SOCKSPort on a tor instance that is running in HiddenServiceSingleHopMode.

If you don't have SocksPort in your config, it defaults to port 9050. You can disable it by adding SocksPort 0.

10
  • Hello. Thanks for the reply. The problem is this: if I add the line "SocksPort 0" to my torrc file, Tor Browser will start, but the following warning appears: "Something Went Wrong! Tor is not working in this browser ". If I start Tor Browser with the line "SocksPort 0" written in the torrc file, and with the lines "HiddenServiceNonAnonymousMode 1 and HiddenServiceSingleHopMode 1", Tor Browser does not start directly.
    – NewUser
    Apr 29, 2017 at 18:49
  • I don't think you can use the same Tor instance for a single hop hidden service and Tor Broswer. You'll have to install the expert bundle. Apr 29, 2017 at 18:57
  • I am going to install Expert Bundle and I will try to configure the "Single Onion Service". I will comment soon the result. Thank you.
    – NewUser
    Apr 29, 2017 at 19:00
  • I have a problem using Expert Bundle: When I start the software, the command console tells me this: "Configuration file "C:\Users\User\AppData\Roaming\tor\torrc" not present, using reasonable defaults." However, if I put the "torrc" file in that directory, Tor does not start. Can you tell me what to do to be able to configure my hidden service "Single Onion Service" using Expert Bundle?
    – NewUser
    Apr 29, 2017 at 19:45
  • Does Tor show anything during startup? Apr 29, 2017 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .