Opened 2 years ago

Last modified 10 months ago

#21542 new defect

use Subprocess.jsm to launch tor

Reported by: mcs Owned by: brade
Priority: Medium Milestone:
Component: Applications/Tor Launcher Version:
Severity: Normal Keywords: tbb-usability, ff52-esr, TorBrowserTeam201805
Cc: brade, gk Actual Points:
Parent ID: #10059 Points:
Reviewer: Sponsor:

Description

In Firefox 49, Mozilla added a new Subprocess.jsm module (they use it to implement the WebExtensions Native Messaging API). Kathy and I have not looked at it closely yet, but this module may provide a better way for Tor Launcher to start and manage the tor process. In particular, Subprocess.jsm provides access to stderr which would allow Tor Launcher to capture all output produced by tor.

Docs:
http://gecko.readthedocs.io/en/latest/toolkit/modules/subprocess/toolkit_modules/subprocess/

Child Tickets

Change History (17)

comment:1 Changed 2 years ago by gk

Cc: gk added

comment:2 Changed 2 years ago by cypherpunks

Firefox is going to suicide before the next after 52 esr by supporting WebExtensions only.
Is this ticket about conversion to WebExtensions?

Version 1, edited 2 years ago by cypherpunks (previous) (next) (diff)

comment:3 in reply to:  2 Changed 2 years ago by mcs

Replying to cypherpunks:

Is this ticket about conversion to WebExtensions?

No. This ticket is about the possibility of using a JS module to improve Tor Launcher (the JS module happens to have been created to help with the WebExtensions implementation but it could just as well have been created for another purpose).

comment:4 Changed 22 months ago by arma

Sounds plausible!

Right now Tor has a hard-coded log to stdout that it adds during startup, but we could -- hm. I was going to say we could make it configurable, but that won't work. I guess Tor Browser could patch Tor before building it, to make that stdout into a stderr?

If you become serious about doing this in Tor Browser, you should open a Tor ticket to let the network team know they should solve it for you somehow. :)

comment:5 in reply to:  4 ; Changed 22 months ago by mcs

Replying to arma:

Sounds plausible!

Right now Tor has a hard-coded log to stdout that it adds during startup, but we could -- hm. I was going to say we could make it configurable, but that won't work. I guess Tor Browser could patch Tor before building it, to make that stdout into a stderr?

Firefox's Subprocess.jsm allows access to both stdout and stderr, so I don't think the network team needs to make any changes. I just assumed the log was being sent to stderr. Is anything sent to stderr?

Obviously the advantage of this approach (capture tor's stdout) over the one described in ticket:10059#comment:17 is that in most cases something will be logged to stdout even if tor never gets to the point of opening a control port listener.

comment:6 in reply to:  5 Changed 22 months ago by arma

Replying to mcs:

Firefox's Subprocess.jsm allows access to both stdout and stderr, so I don't think the network team needs to make any changes. I just assumed the log was being sent to stderr. Is anything sent to stderr?

Nothing is sent to stderr. It's all stdout by default, unless there is some other log line defined, in which case it is whatever that log line is.

Obviously the advantage of this approach (capture tor's stdout) over the one described in ticket:10059#comment:17 is that in most cases something will be logged to stdout even if tor never gets to the point of opening a control port listener.

Makes sense!

comment:7 Changed 19 months ago by gk

Keywords: TorBrowserTeam201708 added

comment:8 Changed 18 months ago by gk

Keywords: TorBrowserTeam201709 added; TorBrowserTeam201708 removed

Items for September 2017.

comment:9 Changed 17 months ago by gk

Keywords: TorBrowserTeam201710 added; TorBrowserTeam201709 removed

Items for October 2017

comment:10 Changed 16 months ago by gk

Keywords: TorBrowserTeam201711 added; TorBrowserTeam201710 removed

Moving tickets over to November.

comment:11 Changed 15 months ago by gk

Moving tickets to December 2017

comment:12 Changed 15 months ago by gk

Keywords: TorBrowserTeam201712 added; TorBrowserTeam201711 removed

Moving tickets to December 2017, for realz.

comment:13 Changed 14 months ago by gk

Keywords: TorBrowserTeam201801 added; TorBrowserTeam201712 removed

Moving tickets to 2018.

comment:14 Changed 13 months ago by gk

Keywords: TorBrowserTeam201802 added; TorBrowserTeam201801 removed

Moving tickets to Feb

comment:15 Changed 12 months ago by gk

Keywords: TorBrowserTeam201803 added; TorBrowserTeam201802 removed

Adding to our March plate.

comment:16 Changed 11 months ago by gk

Keywords: TorBrowserTeam201804 added; TorBrowserTeam201803 removed

Moving our tickets to April.

comment:17 Changed 10 months ago by gk

Keywords: TorBrowserTeam201805 added; TorBrowserTeam201804 removed

Moving remaining tickets to May.

Note: See TracTickets for help on using tickets.