v151 · isolated-web-apps · permissions-policy · direct-sockets
Permission Policy Merger: direct-sockets-private with local-network and loopback-network
Chrome 151 replaces the direct-sockets-private permission policy for Isolated Web Apps with two more granular policies: local-network (for LAN addresses) and loopback-network (for loopback addresses). IWA manifests must now declare which network scope Direct Sockets connections target.
at a glance
| Shipped in | Chrome 151 (Enabled by default) |
|---|---|
| Status | Enabled by default |
| Scope | Isolated Web Apps (IWAs) only |
| Standards position (Firefox) | No signal |
| Standards position (Safari) | No signal |
| ChromeStatus | 6046077976444928 — Permission Policy Merger: direct-sockets-private with local-network and loopback-network |
background: Direct Sockets in Isolated Web Apps
The Direct Sockets API gives Isolated Web Apps raw TCP/UDP socket access. Previously, accessing private network addresses (LAN + loopback) required declaring a single direct-sockets-private permission policy in the IWA manifest. This all-or-nothing approach made it impossible to grant an IWA LAN access without also granting loopback access (or vice versa).
what changes
| Policy | Covers | Chrome 150 and earlier | Chrome 151+ |
|---|---|---|---|
direct-sockets-private | LAN + loopback addresses | Used for both | Replaced (deprecated) |
local-network | Local area network addresses (RFC 1918, etc.) | Not available | Required for LAN Direct Socket connections |
loopback-network | Loopback addresses (127.x.x.x, ::1) | Not available | Required for loopback Direct Socket connections |
IWA manifests should be updated to declare the specific policy (or both) that their app requires. This gives developers more granular control and makes network requirements more transparent.
Source: chromestatus feature summaryexample
// IWA Web App Manifest (before Chrome 151)
{
"permissions_policy": {
"direct-sockets-private": ["self"]
}
}
// IWA Web App Manifest (Chrome 151+ — granular control)
{
"permissions_policy": {
"local-network": ["self"], // allow LAN connections
"loopback-network": ["self"] // allow loopback connections
}
}
// Or just one, if the app only needs LAN access:
{
"permissions_policy": {
"local-network": ["self"]
}
}
Source: chromestatus feature summary
browser support
| Browser | Support | Notes |
|---|---|---|
| Chrome 151+ | Enabled by default | IWAs only |
| Firefox | No signal | — |
| Safari | No signal | — |