Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create RTCPeerConnections in workers #77

Open
youennf opened this issue May 25, 2021 · 3 comments
Open

Create RTCPeerConnections in workers #77

youennf opened this issue May 25, 2021 · 3 comments
Assignees

Comments

@youennf
Copy link
Contributor

youennf commented May 25, 2021

We could investigate creating RTCPeerConnections in workers.
If we start supporting w3c/mediacapture-extensions#16 and #64, this should allow exposing most RTCPeerConnections APIs to workers and they might be useful.

@alvestrand
Copy link
Contributor

alvestrand commented Jun 10, 2021

This request has also been seen from developers, for instance at https://crbug.com/1207214 - the change of Chrome extensions manifest format from v2 to v3 implied, among other things, that the base set of APIs available changed from "Window" to "Worker".

@cohosh
Copy link

cohosh commented Sep 3, 2021

Hi!

We have a web-extension called Snowflake available for Firefox and Chrome that we are in the process of
updating from v2 to v3 manifests. This update requires the use of RTCPeerConnection in service workers:

Snowflake is a censorship circumvention tool for Tor: https://snowflake.torproject.org/
We use the web extension to allow people to run anti-censorship proxies from their browser to provide
access to the Tor network. This has allowed us to distribute over 10,000 unique proxy IPs, making
Snowflake one of the most effective and scalable means to access the Tor network in places with the
strictest censorship practices.

The web extension functions by constantly polling a Snowflake distributor (also called a broker) for clients that
need to connect to Snowflake proxies. When a client is matched with a user's web-extension, a PeerConnection is
automatically created in the background and the data channel used to tunnel the client's Tor traffic through the
WebRTC connection. This occurs constantly and automatically in the background to allow users to run proxies as
long as their web browser remains open and without any manual input required on their part. Thus, we require
the ability to create a PeerConnection in the background process.

Hopefully this use-case is useful in motivating the issue. Is there anything else we can do to help move
this forward?

@ghostwords
Copy link

@cohosh You may want to also share your use case in the RTCDataChannel for ManifestV3 Chromium bug tracker issue and on the W3C WebExtensions Community Group (perhaps in w3c/webextensions#72).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants