This is a proposal for incorporating code from a package called Protozilla
into the Mozilla tree. Protozilla users have expressed an interest in having
this code be part of Mozilla. The purpose of this posting is to put the
proposal before a more general audience (n.p.m.netlib, n.p.m.xpcom) for
discussion and to solicit volunteers for doing code reviews. (Please follow-up
to n.p.m.netlib)
The proposal would impact the following bugs:
Bug 11459: (23 votes) mailto: can launch external mail app or launch an url
Bug 22687: (77 votes) [RFE] PGP Plugin
Bug 33282: ( 6 votes) implement telnet:// support/handling
Bug 44317: ( 1 vote) [RFE] support the dict:// protocol
Bug 68406: ( 7 votes) [RFE] W3C CUAP: Allow registration of new URI schemes
Bug 68702: ( 6 votes) [RFE] Implement inter-process communication in Mozilla
Protozilla (http://protozilla.mozdev.org) is a third-party mozilla component
that implements a "generic" protocol handler, enabling any command line or
CGI program to handle protocols without any modification.
Protozilla consists of two parts:
1) an XPCOM inter-process communication (IPC) implementation based on NSPR.
This is coded in C++ and implements interfaces named nsIPipeTransport and
nsIPipeChannel (similar to nsITransport and nsIChannel),
enabling IPC using anonymous pipes.
2) a generic protocol handler, written in Javascript, which requires IPC.
The IPC XPCOM module is quite general, and not specific to protocol handlers.
In fact, it can be used to execute PGP or GPG from withing Mozilla to provide
a cross-platform PGP plugin (see bug 22687 for a working example). With the
IPC module installed, you will be able execute Javascript statements like
plainText = ipcService.execPipe("gpg --decrypt", cipherText, cipherText.length)
to decrypt cipher text using GPG.
RFE bug 68702 has been filed to import the IPC code into the directory
mozilla/extensions/ipc (this will not affect the rest of mozilla in any way).
The IPC module does not raise any new security issues, since it essentially
just extends the limited IPC functionality that is currently provided by the
nsIFile->Spawn method. The code needs to be reviewed by someone familiar with
Necko and the extension needs to be approved by mozilla.org; any volunteers?
The actual process of integrating the code into the tree would be trivial.
A separate bug (68406) has been filed to import the generic protocol
handler as en extension. It is motivated by the following quotation from the
W3C document "Common User Agent Problems"
http://www.w3.org/TR/2001/NOTE-cuap-20010206#cp-uri-schemes
1.5 Allow the user to add new URI schemes in a straightforward way.
For instance, allow users to associate external programs with URI
schemes. The user agent should inform the user when it does not
recognize a URI scheme in content.
Example:
A user may want the "tel" scheme (e.g., tel:+33-4-12-34) to interact
with their telephone. Or they may want the "irc" scheme (e.g.,
irc://irc.example.org/) to activate an IRC client on their desktop
with a connection to the specified server.
Incorporating generic protocol handling into the Mozilla tree is more tricky
than IPC because it raises new security issues. A security review is therefore
needed (any volunteers?). Also, Protozilla currently has its own UI for
protocol handler preferences. In the short term, this UI could be retained in
mozilla/extensions, just like Chatzilla. In the long term, this UI may need to
merged with the Mozilla preferences UI.
Saravanan