Skip to Content
Platform.Ontology

Direct Sockets (TCP, UDP)

Raw TCP and UDP sockets from a page, for installed isolated apps only.

Asks you firstNetwork and connectionNetworkWeb browsersWhile you use it

In one line

Can open raw network connections only inside signed, installed apps, never on normal sites

Raw TCP and UDP sockets from a page, for installed isolated apps only.

Lets an installed Isolated Web App open arbitrary TCP and UDP connections and servers. Not available to normal websites because it would bypass same-origin and CORS protections.

What it can and can't do

What the user does: An organization installs a signed Isolated Web App on your computer

It can

  • Open direct two way connections to other computers and devices
  • Run small servers inside the installed app
  • Reach local network devices if the app also has the extra network permission

It cannot

  • Work on ordinary websites, ever
  • Work on iPhone, Firefox or Safari
  • Work on Chrome for Android or Samsung Internet
  • Run without a signed bundle and an install by you or your IT team

How it differs between platforms: Only desktop Chromium has it, and only for signed Isolated Web Apps. Other browsers and phones do not.

Browser support

BrowserStatusFirst versionNote
ChromePartialChrome 126 ChromeOS IWA onlyNone
EdgePartialEdge follows Chromium IWANone
FirefoxNot supportedNot availableNone
SafariNot supportedNot availableNone
Safari on iPhoneNot supportedNot availableNone
Chrome on AndroidNot supportedNot availableNone
Samsung InternetNot supportedNot availableNone

How a site asks for it

APInew TCPSocket(host, port); new UDPSocket(); new TCPServerSocket(); policies direct-sockets, direct-sockets-private
Permission namedirect-sockets
Permissions policydirect-sockets
Browser compat keysapi.TCPSocket
api.UDPSocket
How access is grantedinstall
What the user seesOnly inside Isolated Web Apps (signed bundles); IWA install prompt; permission policy direct-sockets, plus direct-sockets-private for LAN ranges.
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsTied to the installed app
How to take it backUninstall the app
Inside an iframeVia permissions policy only

Typical flow

  1. User installs an Isolated Web App
  2. App requests TCPSocket
  3. Browser applies policy
  4. Socket opens

Data you get

What comes back: TCPSocket, UDPSocket, TCPServerSocket
Shape: object
How often: per connection

No individual data fields. The signal is the access itself.

Technical limits

  • Isolated Web Apps only
  • Not available to regular sites

The story

What it is

Installed special web apps can open raw network connections, like a desktop program.

For you

Only a few packaged apps can use this, and you install them first. You may see a permission step. If you do not install the app, nothing happens.

For makers

Makers get a way to bring remote desktop tools, game servers and device managers to the web without a native app. It needs strong trust, so it is limited to signed and installed apps.

Where you see it

TypeExampleApps
enterpriseA remote desktop app in a browser window connects to office computers over their own protocol, with no plugin installed.None named
gamesA web version of a game server list queries game servers directly over UDP to show player counts and ping.None named
developerA web based terminal connects to a device over raw network ports, so a developer can manage hardware from a browser app.None named
smart-homeA web app sets up a smart light or printer by talking to its local network service directly.None named
musicA web app for music studios sends live note data to other devices on the same network using raw network messages.None named
securityA web based network tool scans office devices to find which are online, which is only allowed in an installed trusted app.None named
educationA coding class tool lets students try network programs in a browser sandbox with real connections.None named

Risks

  • Very powerful if abused
  • Few apps need it

What the platform says

Good uses and abuse

Legitimate uses

  • Remote shells
  • Media servers
  • IoT tools

Known abuse

  • Would enable malware-like network access if opened to the web

Scores

ScoreValueMeaning
Sensitivity5 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction3 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2024-06, Chrome 126: Direct Sockets for Isolated Web Apps

Sources

How well checked: Based on official documentation.

On this page