Skip to Content
Platform.Ontology

WebRTC data channels (peer to peer)

Sends data directly between browsers without a server, with no prompt.

Works without askingThings a page can doNetwork channelsWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported562017-01-25None
EdgeSupported152017-04-05None
FirefoxSupported442016-01-26None
SafariSupported112017-09-19None
Safari on iPhoneSupported112017-09-19All iOS browsers use WebKit
Chrome on AndroidSupported562017-02-01None
Samsung InternetSupported6.02017-08-23None

How a site asks for it

APInew RTCPeerConnection(); pc.createDataChannel('x')
Browser compat keysapi.RTCPeerConnection
api.RTCDataChannel
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsLives with the peer connection
How to take it backNothing to revoke (no permission is stored)
Inside an iframeNo iframe flag; permissions policy applies only to camera and microphone

Typical flow

  1. Create RTCPeerConnection with STUN or TURN
  2. Exchange SDP and ICE candidates via signaling
  3. 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

TypeExampleApps
gamesA browser multiplayer game sends player moves directly between players for low delay.Agar.io, Krunker.io, Skribbl.io
videoA video call app sends your voice and video peer to peer when it can.Google Meet, Discord web
messagingA web file sharing tool sends a large file straight to a friend with no upload.Snapdrop, Send Anywhere
liveA live Xbox Cloud Gaming or GeForce NOW stream uses the same family of tech to send the picture.Xbox Cloud Gaming, GeForce NOW
securityA fraud tool uses it to learn a visitor's real network address and spot a VPN.None named
developerA 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

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits3Rough identifying entropy, when known

History

  • 2019-06, Chrome 75: mDNS host candidates hide local IPs
  • 2020-06, Firefox 78: mDNS ICE host candidates
  • 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.

On this page