Opened 8 months ago

Closed 8 months ago

#25527 closed defect (invalid)

Tor (with bridges) keeps giving “connections have failed” in command line (while working ok through Tor Browser)?

Reported by: omareg94 Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tor-browser-bundle configuration bridge pluggable-transports connection
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When I try to connect to Tor through command line (Windows 10):

"C:\Tor Browser\Browser\TorBrowser\Tor\tor.exe" -f "C:\Tor Browser\Browser\TorBrowser\Data\Tor\torrc" | more

I get the following error:

Mar 11 14:10:01.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Mar 11 14:10:02.000 [warn] Problem bootstrapping. Stuck at 80%: Connecting to the Tor network. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 1; recommendation warn; host A1A1234A123AB12345A1234A1A1234A123456789 at 0.0.2.0:2)
Mar 11 14:10:03.000 [warn] Problem bootstrapping. Stuck at 80%: Connecting to the Tor network. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 2; recommendation warn; host A1A1234A123AB12345A1234A1A1234A123456789 at 0.0.2.0:2)
Mar 11 14:10:03.000 [warn] 1 connections have failed:
Mar 11 14:10:03.000 [warn]  1 connections died in state connect()ing with SSL state (No SSL object)

Tor works normally when I use the Tor Browser (not the command line) with no problem using the same Bridge provided within the torcc configuration file.

I'm sure that bridges are working (not blocked) because when I run Tor Browser, connection is established with no problems. I believe something is missing in order to make the command line work successfully.

Notes:
▪ Only it gives me errors when I use Tor over the command line, while it's working succesfully with no problems on the Tor Browser.
▪ I have tried switching bridges (All of them work normally when I use the Tor Browser, but don't work while using command line). So, switching Bridges isn't a solution, there is something missing with the command line usage.

Further Notes:
There is a question seems to be the same, asking about the similar error message:

My question is different as it's about not being able to use Tor through command-line with bridges I'm sure they are not blocked (because they are working on Tor Browser within the same computer).

I am looking for using Tor (with Bridge) over the command line (without the need to start Tor Browser) and make connection established successfully through command line.

Child Tickets

Change History (4)

comment:1 Changed 8 months ago by dcf

There is not only torrc in Tor Browser, but also torrc-defaults. Look at the torrc file; it doesn't say anything about pluggable transports. That information is in torrc-defaults.

Additionally, Tor Browser configures bridges through the control port, not by writing them to a torrc file. (I think.) So the files on disk won't have the bridges you need, even with torrc-defaults. (Nevermind, torrc contains UseBridges and Bridge lines, but doesn't have ClientTransportPlugin.)

In any case, you will have to be in the correct working directory (C:\Tor Browser\Browser\), because torrc-defaults uses relative paths.

I don't think this is really a meek problem. I'm sure it will happen even if you configure Tor Browser to connect without a bridge. I don't know an easy way to accomplish what you're trying to accomplish.

You may find it easier just to write your own minimal torrc file, like
https://gitweb.torproject.org/pluggable-transports/meek.git/tree/meek-client/torrc

It is maybe a bug in tor that it is apparently trying to connect to the fake IP address 0.0.2.0, even though it should only be trying to connect to that address through a pluggable transport bridge. I'm guessing it's caused by tor caching the address in its state file, then being restarted without a pluggable transport configuration.

Last edited 8 months ago by dcf (previous) (diff)

comment:2 in reply to:  1 Changed 8 months ago by omareg94

Replying to dcf:

Comment 1 by dcf

Yes I just figured out the problem before reading your comment. Thanks a lot.
I mentioned the answer here

comment:3 in reply to:  1 Changed 8 months ago by dcf

Replying to dcf:

It is maybe a bug in tor that it is apparently trying to connect to the fake IP address 0.0.2.0, even though it should only be trying to connect to that address through a pluggable transport bridge. I'm guessing it's caused by tor caching the address in its state file, then being restarted without a pluggable transport configuration.

I opened a ticket for it: #25528.

Thanks for updating the stackoverflow question.

comment:4 Changed 8 months ago by dcf

Component: Obfuscation/meekApplications/Tor Browser
Owner: changed from dcf to tbb-team
Resolution: invalid
Status: newclosed
Version: Tor: 0.3.2.10
Note: See TracTickets for help on using tickets.