-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help test the raw TCP wireless backend #349
Comments
To protect websites using Direct Sockets API being hijacked and creates unwanted sockets, Chrome requires the website to opt-in a more strict site isolation by returning the following HTTP response headers:
For detailed explanation, see Why you need "cross-origin isolated" for powerful features. |
I have pushed a change to enable the Direct Sockets API. But because GitHub Pages doesn't add the above HTTP response headers, and there is no way to configure this, I deployed another website on Vercel: https://ya-webadb.vercel.app/ If you follow the enable steps above (replace If your device doesn't have ADB over WiFi enabled, you can first connect via USB and enable it in the "ADB over WiFi" page:
Known Issues:
|
Note: The Direct Sockets spec and the requirement for enabling it may change at any time. |
The requirements have changed in Chromium/Chrome Dev/Chrome Canary released after March 15th (See WICG/direct-sockets#35 (comment), ref https://source.chromium.org/chromium/chromium/src/+/main:content/browser/web_exposed_isolation_info.h;l=32;drc=401f9911c6a32a0900f3968258393a9e729da625;bpv=0;bpt=1) If the steps in #349 (comment) doesn't work, try the new steps:
|
I just tried these steps, and I'm still only seeing USB and WebSocket from the Add dropdown. Would you be able to provide some help? This is what restricted-api-origins looks like for me I created the shortcut in a new window, closed it, and then launched it from the shortcut. |
The new steps only apply to Chrome Dev/Canary/Chromium versions after March 15th. I don't know if any Stable/Beta versions are shipped with this change. So also try the old steps. In fact, all versions released between Feb 15th and Marth 15th have DirectSockets feature disabled (by mistake). Stable/Beta are most possible in this range. If you are using Microsoft Edge Dev/Canary, the code sometimes lags behind Chromium for about 10 days. So it is even harder to guess. |
Just FYI: restricted-api-origins has been renamed to isolated-app-origins. |
Hello all, I also don't see any Direct Sockets button.
` Any idea why? |
are you on the stable channel? |
Yes, I should be: https://aur.archlinux.org/packages/google-chrome |
I have tried it on chromeOS stable 109, and it doesn't work.
|
The Direct Sockets spec changed dramatically in July last year. The new security model is fundamentally breaking many popular React framework and libraries, including some I'm using. Also, Google Chrome haven't implemented WebUSB in the new model, so can't use both at the same time. Closing this test as now. Will try to experiment again when the proposal is more mature. |
Direct Sockets API (formerly, "raw sockets API") (Chrome Platform Status) allows Web applications to create raw TCP or UDP sockets .
It has been implemented in Chrome for quite a while, but because the uncertainty and unsolved problems in the spec, it never been enabled.
To enable Direct Sockets API in a Chromium-based browser:
--enable-features=DirectSockets
command line arguments.--restricted-api-origins=https://www.example.com
to command line arguments, or set allowed origins fromchrome://flags/#restricted-api-origins
. (replacehttps://www.example.com
with real origin using the Direct Sockets API, to add multiple origins, separates them with comma)It should be possible to create an ADB backend using this API to achieve plugin-free wireless connection.
The text was updated successfully, but these errors were encountered: