Contact emails
[email protected]

Explainer
https://github.com/WICG/local-network-access/issues/126


Specification
https://github.com/WICG/local-network-access/pull/125


Summary
Add support for passing a targetAddressSpace option in the WebSocket 
constructor. This allows developers to specify that a WebSocket connection to a 
public hostname should be treated as going to a "local" or "loopback" 
destination, matching the existing support on the Fetch API. The main use case 
is to offer an escape hatch to bypass mixed content restrictions for connecting 
to local servers that cannot yet support HTTPS (as Local Network Access 
permissions require a secure context). Example: A public site that connects to 
a local server can use a hostname to avoid needing manual configuration of the 
exact private IP address in use: `const ws = new 
WebSocket("ws://local-server.example", { targetAddressSpace: "local"}` This 
will flag the WebSocket connection as going to a local address, bypassing mixed 
content blocking when run in a secure context. The user must grant the site the 
local network permission for the WebSocket connection to succeed, and the 
hostname must resolve to a local IP address (otherwise it will be blocked). 
This builds on https://chromestatus.com/feature/5080055102439424 which adds an 
options bag to the WebSocket constructor.


Blink component
Blink>Network>WebSockets


Web Feature ID
local-network-access


Motivation
To avoid mixed content blocking for local network WebSockets requests, web 
developers have relied on having their users manually configure their local 
network IP addresses, which is awkward at best. Adding support for the 
targetAddressSpace option in WebSockets aligns it with the Fetch API. This has 
also been requested by developers (eg, 
https://github.com/WICG/local-network-access/issues/16#issuecomment-4459071272).


Initial public proposal
https://github.com/WICG/local-network-access/issues/126


Goals for experimentation
None


Requires code in //chrome?
False


Tracking bug
https://crbug.com/517413738


Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/4779920606756864?gate=6029507826941952


This intent message was generated by Chrome Platform Status.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6a739c62.c91ea2f1.3ad85a.02f4.GAE%40google.com.

Reply via email to