WebRTC data channels (peer to peer)
Sends data directly between browsers without a server, with no prompt.
In one line
Can send data straight between two browsers, with no pop up
Sends data directly between browsers without a server, with no prompt.
A site can connect two people peer to peer. Setup exchanges network candidates, which can expose the person's public IP address to the other peer or to the site.
What it can and can't do
What the user does: Nothing for data. A video call asks for camera permission only when you use it.
It can
- Send text, files or game moves straight to another person's browser
- Keep the connection open while the pages are open
- Connect two people through a quick set up over the internet
It cannot
- Reach your camera or microphone without a separate permission
- Stay connected after you close the page
- Work with no server at all; a server helps the two browsers meet
- Always hide your network address from the other person
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 56 | 2017-01-25 | None |
| Edge | Supported | 15 | 2017-04-05 | None |
| Firefox | Supported | 44 | 2016-01-26 | None |
| Safari | Supported | 11 | 2017-09-19 | None |
| Safari on iPhone | Supported | 11 | 2017-09-19 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 56 | 2017-02-01 | None |
| Samsung Internet | Supported | 6.0 | 2017-08-23 | None |
How a site asks for it
| API | new RTCPeerConnection(); pc.createDataChannel('x') |
| Browser compat keys | api.RTCPeerConnectionapi.RTCDataChannel |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Lives with the peer connection |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | No iframe flag; permissions policy applies only to camera and microphone |
Typical flow
- Create RTCPeerConnection with STUN or TURN
- Exchange SDP and ICE candidates via signaling
- Open data channel
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- No prompt for data-only connections; camera or mic needs getUserMedia
- Local IP candidates hidden behind mDNS .local names (Chrome 75, Safari 11, Firefox 78) unless media permission is granted
- STUN reveals the public IP to peers and to the STUN server
- Max message size: Chrome about 256 KiB, Firefox up to 1 GiB (maxMessageSize)
- Ordered or unordered, reliable or partially reliable; SCTP over DTLS
The story
What it is
Two browsers can send data straight to each other, with no prompt.
For you
You never see it. In a video call or a browser game, your device may talk directly to another person's device. That can reveal your network address to the other side.
For makers
Makers use it for real time speed and to save server costs. It powers file sharing, games and calls. It can also expose your real network address even behind a VPN, which fraud teams use to spot you.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A browser multiplayer game sends player moves directly between players for low delay. | Agar.io, Krunker.io, Skribbl.io |
| video | A video call app sends your voice and video peer to peer when it can. | Google Meet, Discord web |
| messaging | A web file sharing tool sends a large file straight to a friend with no upload. | Snapdrop, Send Anywhere |
| live | A live Xbox Cloud Gaming or GeForce NOW stream uses the same family of tech to send the picture. | Xbox Cloud Gaming, GeForce NOW |
| security | A fraud tool uses it to learn a visitor's real network address and spot a VPN. | None named |
| developer | A shared code editor syncs edits straight between teammates. | VS Code Live Share |
Risks
- Exposes network address
- Used to bypass VPNs
What the platform says
- Google: WebRTC. The WebRTC project says it brings real time communication to browsers through simple APIs.
Good uses and abuse
Legitimate uses
- Peer to peer file sharing
- Games
- Video calls
Known abuse
- IP address leak
- Peer to peer botnet or proxy networks
- Local network probing
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 3 | Rough identifying entropy, when known |
History
- 2019-06, Chrome 75: mDNS host candidates hide local IPs
- 2020-06, Firefox 78: mDNS ICE host candidates
Related capabilities
Related
- WebRTC local IP discovery. Can try to learn your device's home network address and public address through a call setup
- WebSockets. Can keep a live two way link to a server, with no pop up
Sources
How well checked: Based on official documentation.