uProxy and WebExtensions

Benjamin Schwartz bemasc at uproxy.org
Fri Jul 29 22:30:08 UTC 2016


Hi Mozilla,

I'm one of the maintainers of uProxy [0] a Firefox Add-on [1] for
peer-to-peer proxying of web traffic.  Our goal is to enable users to route
around internet censorship, tampering, and surveillance, by tunneling their
connection through a trusted node.

uProxy targets both Firefox (using the XPCOM-javascript APIs) and Chrome
(using the chrome.* extension APIs).  Supporting both platforms has been a
major challenge for us.  We've solved it by maintaining a platform
abstraction layer [2] that provides a uniform API.  (The platform-neutral
APIs often resemble node.js's APIs, and in some cases, such as TCP sockets,
we've even written node-compatible wrappers [3].)

We're very excited about the WebExtensions work in Firefox.  Unfortunately,
it's missing two APIs we absolutely need: chrome.proxy and chrome.sockets.*.

I know you're all well aware of chrome.proxy, so I won't comment on that.

chrome.sockets.[tcp, tcpServer, udp] are the APIs for TCP client, TCP
server, and UDP sockets.  As a censorship-resistant proxy with its own
network protocols, uProxy needs full use of all three of these.  On
Firefox, we currently use nsISocketTransportService, nsIServerSocket, and
nsIUDPSocket instead.

I'm sure we're not the only group that needs these APIs in order to
implement advanced extension functionality.  FWIW, we're not picky about
the exact API; we're used to writing shims.

Thanks,
Ben Schwartz

[0] https://www.uproxy.org
[1] https://addons.mozilla.org/en-US/firefox/addon/uproxy-firefox/
[2] http://www.freedomjs.org/
[3]
https://github.com/uProxy/uproxy/blob/master/src/lib/build-tools/alias/tcp.js

See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1247628#c15

P.S. Other "missing" APIs, used by uProxy on Chrome but not available in
WebExtensions, are chrome.runtime.onUpdateAvailable, chrome.identity, and
chrome.webRequest.  We're also planning to use chrome.power and possibly
chrome.idle.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20160729/49ebbfe1/attachment.html>


More information about the Dev-addons mailing list