Direct socket API fails with <ERROR: Access to private network is blocked.>

904 views
Skip to first unread message

Xtralogic

unread,
Sep 27, 2024, 2:43:09 PM9/27/24
to iwa-dev
Hi Google Chrome Team,

After the recent Chrome update to version 131.0.6738.0 (Official Build) dev (64-bit) we've started seeing the "Access to private network is blocked." when trying to connect using TCPSocket. Reproducible with the latest telnet-client example (https://github.com/GoogleChromeLabs/telnet-client), Chrome Version 131.0.6738.0 (Official Build) dev (64-bit). 

Thanks,
Sergey.



Robbie McElrath

unread,
Sep 27, 2024, 3:27:02 PM9/27/24
to Xtralogic, Andrew Rayskiy, iwa-dev

Try adding a "direct-sockets-private" entry to the permissions_policy map in your manifest. I don't know if that's fully hooked up yet though. Andrew will be more familiar with the current status.

--
You received this message because you are subscribed to the Google Groups "iwa-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iwa-dev+u...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/iwa-dev/080dc429-4afa-46e0-a2d4-682b52c3f1ecn%40chromium.org.

Xtralogic

unread,
Sep 27, 2024, 3:30:20 PM9/27/24
to iwa-dev, rmce...@google.com, iwa-dev, Xtralogic, Andrew Rayskiy
Yes, adding the direct-sockets-private permission resolved the issue. Found it in the Chrome source after I've posted.

guest271314

unread,
Sep 30, 2024, 1:27:49 PM9/30/24
to Xtralogic, iwa-dev, rmce...@google.com, Andrew Rayskiy
Adding the following headers the to the request

"Access-Control-Request-Private-Network": "true"

and these headers to the response

"Access-Control-Allow-Headers: Access-Control-Request-Private-Network\r\n"
"Access-Control-Allow-Private-Network: true\r\n"
"Access-Control-Allow-Headers: Access-Control-Request-Private-Network\r\n\r\n"

works, without a specific Direct Sockets permissions policy being set.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/iwa-dev/a8653635-b41c-47c8-9904-0624b08e930fn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages