Opened 8 years ago

Closed 8 years ago

#3077 closed defect (implemented)

Vidalia needs to obtain SocksPort and ControlPort from tor

Reported by: mikeperry Owned by: chiiph
Priority: High Milestone: TorBrowserBundle 2.2.x-stable
Component: Archived/Vidalia Version:
Severity: Keywords:
Cc: helix Actual Points:
Parent ID: #2264 Points:
Reviewer: Sponsor:

Description (last modified by mikeperry)

In order to ship Tor Browser Bundles that do not conflict with distribution-installed tor clients and tor relays, we must give TBB the ability to automatically choose a new SOCKS port and Control port if the default ports are in use. (See #2264).

The current plan is to create torrc options to cause Tor to automatically listen on a random free port for the socksport and the control port, and to communicate these choices to vidalia through log lines or temporary files that are easily parsable (see #3076). Vidalia would then set an environment variable to inform Tor Browser (and thus Torbutton) which SOCKS port to use (#2843).

Child Tickets

Change History (12)

comment:1 Changed 8 years ago by mikeperry

Description: modified (diff)

comment:2 Changed 8 years ago by mikeperry

Description: modified (diff)
Summary: Vidalia needs to parse tor logs for SocksPort and ControlPortVidalia needs to obtain SocksPort and ControlPort from tor

comment:3 Changed 8 years ago by arma

Tor 0.2.2.26-beta now has a ControlPortWriteToFile config option (and ControlPortFileGroupReadable if that's useful).

So Vidalia could be taught to launch Tor with that config option set (assuming the first launch of Tor, to learn its version, says that the config option should work), then poll for the file and use that control port.

Once you've got the control port, you can getinfo net/listeners/socks to figure out the socks port.

Then you can set the right env vars for firefox (and thus for Torbutton) before you launch it.

comment:4 Changed 8 years ago by mikeperry

FYI: I plan on working on the torbutton side of this (#2843) next week. I don't need the Vidalia piece to be implemented before I start, but just giving a heads up.

comment:5 Changed 8 years ago by mikeperry

Milestone: TorBrowserBundle 2.2.x-stable

comment:6 Changed 8 years ago by mikeperry

Priority: normalmajor

Ok, Tor has implemented #3076 and Torbutton is ready and waiting for the SOCKS piece of this (#2843). We check $TOR_SOCKS_PORT for the socks port, and $TOR_SOCKS_HOST for a hostname. You do not need to send us a hostname.

Feel free to choose whatever env var names you want for control port and control pass. We don't use those two yet.

comment:7 Changed 8 years ago by chiiph

Ok, sorry for the delay on this one.

I'm working on this on the branch chiiph/bug3077_auto.

Right now Vidalia can connect to an automatically configured ControlPort. The part that is still missing is setting the env vars for TorButton, I need to work that out with Erinn, since everything TBB-ish will live in a plugin apart from Vidalia (see user/chiiph/vidalia-plugins.git repo for a first version of the TBB plugin).

comment:8 in reply to:  7 ; Changed 8 years ago by mikeperry

Replying to chiiph:

Ok, sorry for the delay on this one.

I'm working on this on the branch chiiph/bug3077_auto.

Right now Vidalia can connect to an automatically configured ControlPort. The part that is still missing is setting the env vars for TorButton, I need to work that out with Erinn, since everything TBB-ish will live in a plugin apart from Vidalia (see user/chiiph/vidalia-plugins.git repo for a first version of the TBB plugin).

What does 0.2.x do wrt TBB? I'd like to have these env vars available for TBB 2.2.x-stable.

comment:9 in reply to:  8 ; Changed 8 years ago by chiiph

Replying to mikeperry:

Replying to chiiph:

Ok, sorry for the delay on this one.

I'm working on this on the branch chiiph/bug3077_auto.

Right now Vidalia can connect to an automatically configured ControlPort. The part that is still missing is setting the env vars for TorButton, I need to work that out with Erinn, since everything TBB-ish will live in a plugin apart from Vidalia (see user/chiiph/vidalia-plugins.git repo for a first version of the TBB plugin).

What does 0.2.x do wrt TBB? I'd like to have these env vars available for TBB 2.2.x-stable.

0.2.x launches firefox/polipo/pidgin and a bit of logic around that.
How close is TBB 2.2.x-stable? I'd like to have 0.2.x kind of feature freezed, and do all this kind of development with 0.3.x, but I guess it depends on the timing.

comment:10 in reply to:  9 Changed 8 years ago by mikeperry

Cc: helix added

Replying to chiiph:

Replying to mikeperry:

Replying to chiiph:

Ok, sorry for the delay on this one.

I'm working on this on the branch chiiph/bug3077_auto.

Right now Vidalia can connect to an automatically configured ControlPort. The part that is still missing is setting the env vars for TorButton, I need to work that out with Erinn, since everything TBB-ish will live in a plugin apart from Vidalia (see user/chiiph/vidalia-plugins.git repo for a first version of the TBB plugin).

What does 0.2.x do wrt TBB? I'd like to have these env vars available for TBB 2.2.x-stable.

0.2.x launches firefox/polipo/pidgin and a bit of logic around that.
How close is TBB 2.2.x-stable? I'd like to have 0.2.x kind of feature freezed, and do all this kind of development with 0.3.x, but I guess it depends on the timing.

My goal is to triage, tag, and assign Tor Browser, TorBrowserButton, Tor bundles/installation, and Vidalia bugs at the dev meeting with you and Erinn, and we'll make the call from there.

I'd like to get it out within a few weeks after tor 0.2.2.x goes stable, though. So we're probably talking about end of the summer or fall at the latest.

comment:11 Changed 8 years ago by chiiph

Update: in my branch chiiph/master, I've migrate the alpha-based branch that implements this. Mike's working on the his side of this, so when we are sure we have everything we need, I'll push this to official/master.

comment:12 Changed 8 years ago by chiiph

Resolution: implemented
Status: newclosed

This has been merged to master. It will be preset in 0.2.13.

Note: See TracTickets for help on using tickets.