Difference between revisions of "Protocol Handler"
(→Windows) |
(→Existing Providers) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
==Context== | ==Context== | ||
The scope of this wiki is focused on [[Protocol Handler]]s that process [[Identifier]]s and [[Authentication]], but might involve payment procols as well. | The scope of this wiki is focused on [[Protocol Handler]]s that process [[Identifier]]s and [[Authentication]], but might involve payment procols as well. | ||
+ | *[https://html.spec.whatwg.org/#custom-handlers custom handlers] in the W3C living HTML document. | ||
+ | |||
===Existing Providers=== | ===Existing Providers=== | ||
+ | The list of whitelisted schemes is defined by the [https://html.spec.whatwg.org/#custom-handlers WHATWG specification:] | ||
+ | http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#whitelisted-scheme | ||
+ | |||
These are the providers registered as of 201x | These are the providers registered as of 201x | ||
Line 10: | Line 15: | ||
| name || Location || Cat|| Recent News | | name || Location || Cat|| Recent News | ||
|- | |- | ||
− | |bitcoin" || || || | + | |bitcoin" || || || [https://groups.google.com/a/chromium.org/g/chromium-discuss/c/bbWUIlTiz8k Whitelisting bitcoin: URI handler in navigator.registerProtocolHandler()] |
|- | |- | ||
| "geo" || || || | | "geo" || || || | ||
Line 22: | Line 27: | ||
|"magnet" || || || | |"magnet" || || || | ||
|- | |- | ||
− | |"mailto" || || || | + | |"mailto" || || || It would be easy to start creation of an email by clicking on this, but it is not done. |
|- | |- | ||
|"mms" || || || | |"mms" || || || | ||
Line 47: | Line 52: | ||
|- | |- | ||
| "xmpp" || || || | | "xmpp" || || || | ||
− | |} | + | |} |
+ | |||
+ | * 2020-05-08 Daniel B @ MSFT asked to add did because it was a W3C specification, but that spec is still not final on 2021-11-21. | ||
+ | * 2020-06-04 LGTM 1, 2 and 3 to add did to list | ||
+ | * [https://groups.google.com/a/chromium.org/g/blink-dev/c/7nHTRUP1EGY fredric wang email] 2020-08-03 did was added, but was not actually in the WHATWG spec on 2021-11-11 | ||
==Solutions== | ==Solutions== | ||
Line 53: | Line 62: | ||
===Chromium=== | ===Chromium=== | ||
+ | * [https://www.fortinet.com/blog/threat-research/leaking-browser-url-protocol-handlers detecting handlers present in a broswer] | ||
Was a topic in [https://www.youtube.com/user/blinkontalks/videos BlinkOn 15 2021-11-17 now on YouTube] | Was a topic in [https://www.youtube.com/user/blinkontalks/videos BlinkOn 15 2021-11-17 now on YouTube] | ||
* [https://bugs.chromium.org/p/chromium/issues/detail?id=178097 Implement registerProtocolHandler on Android] a CR bug issue 178097 originally posed on 2013-02-25 | * [https://bugs.chromium.org/p/chromium/issues/detail?id=178097 Implement registerProtocolHandler on Android] a CR bug issue 178097 originally posed on 2013-02-25 | ||
Line 58: | Line 68: | ||
* Stephen Shankland twitter @stshank Google plans to add into Chrome the ability to handle decentralized web protocols (e.g. dat, dweb, ipfs, ipns, ssb). Decentralized web = more of a peer-to-peer design, where individuals host their own content. https://t.co/W05X4ljZUe?amp=1 | * Stephen Shankland twitter @stshank Google plans to add into Chrome the ability to handle decentralized web protocols (e.g. dat, dweb, ipfs, ipns, ssb). Decentralized web = more of a peer-to-peer design, where individuals host their own content. https://t.co/W05X4ljZUe?amp=1 | ||
* [https://groups.google.com/a/chromium.org/g/blink-dev/c/7nHTRUP1EGY Intent to Prototype and Ship: Add schemes for decentralized web protocols to the safelist of registerProtocolHandler] from Frederic Wang at igalia.com 2020-04-24 | * [https://groups.google.com/a/chromium.org/g/blink-dev/c/7nHTRUP1EGY Intent to Prototype and Ship: Add schemes for decentralized web protocols to the safelist of registerProtocolHandler] from Frederic Wang at igalia.com 2020-04-24 | ||
+ | |||
+ | The following are features of enterprise installation as so would be a challenge to provide for other implementations, like for federations. | ||
+ | * [https://chromeenterprise.google/policies/?policy=AutoOpenAllowedForURLs AutoOpenAllowedForURLs] with example for each device platform. | ||
+ | * [https://chromeenterprise.google/policies/?policy=AutoOpenFileTypes AutoOpenFileTypes] | ||
===PWA=== | ===PWA=== | ||
Line 65: | Line 79: | ||
===Windows=== | ===Windows=== | ||
+ | * [https://docs.microsoft.com/en-us/uwp/api/Windows.System.Launcher?redirectedfrom=MSDN&view=winrt-22000#Windows_System_Launcher_LaunchUriAsync_Windows_Foundation_Uri_ Launcher Class] Starts the default app associated with the specified file or URI. | ||
* [https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85) Registering an Application to a URI Scheme] 2016-07-13 | * [https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85) Registering an Application to a URI Scheme] 2016-07-13 | ||
Latest revision as of 10:46, 26 November 2021
Contents
Full Title
Protocol Handlers are models that can be added to a user's computer to extend the range of protocols that can be handled by that computer.
Context
The scope of this wiki is focused on Protocol Handlers that process Identifiers and Authentication, but might involve payment procols as well.
- custom handlers in the W3C living HTML document.
Existing Providers
The list of whitelisted schemes is defined by the WHATWG specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#whitelisted-scheme
These are the providers registered as of 201x
name | Location | Cat | Recent News |
bitcoin" | Whitelisting bitcoin: URI handler in navigator.registerProtocolHandler() | ||
"geo" | |||
"im" | |||
"irc" | |||
"ircs" | |||
"magnet" | |||
"mailto" | It would be easy to start creation of an email by clicking on this, but it is not done. | ||
"mms" | |||
"news" | |||
"openpgp4fpr" | |||
"sip" | |||
"sms", | |||
"smsto", | |||
"ssh", | |||
"tel", | |||
"urn", | |||
"webcal", | |||
"wtai", | |||
"xmpp" |
- 2020-05-08 Daniel B @ MSFT asked to add did because it was a W3C specification, but that spec is still not final on 2021-11-21.
- 2020-06-04 LGTM 1, 2 and 3 to add did to list
- fredric wang email 2020-08-03 did was added, but was not actually in the WHATWG spec on 2021-11-11
Solutions
These solutions are directed primarily to Smartphones, although uses on desktop computers are also considered. Originally all protocol handlers were written in native code for the operating system and installed by the user.
Chromium
Was a topic in BlinkOn 15 2021-11-17 now on YouTube
- Implement registerProtocolHandler on Android a CR bug issue 178097 originally posed on 2013-02-25
- Move ProtocolHandlerRegistry to a new //component in Chromium Gerrit
- Stephen Shankland twitter @stshank Google plans to add into Chrome the ability to handle decentralized web protocols (e.g. dat, dweb, ipfs, ipns, ssb). Decentralized web = more of a peer-to-peer design, where individuals host their own content. https://t.co/W05X4ljZUe?amp=1
- Intent to Prototype and Ship: Add schemes for decentralized web protocols to the safelist of registerProtocolHandler from Frederic Wang at igalia.com 2020-04-24
The following are features of enterprise installation as so would be a challenge to provide for other implementations, like for federations.
- AutoOpenAllowedForURLs with example for each device platform.
- AutoOpenFileTypes
PWA
- PWAs as URL Handlers for the web.dev web page 2021-01-29 report by Thomas Steiner.
- URL protocol handler registration for PWAs a GitHub repository from Thomas Steiner.
- github site which should have current data on the progress
Windows
- Launcher Class Starts the default app associated with the specified file or URI.
- Registering an Application to a URI Scheme 2016-07-13
The following adapts their example:
First, you need a ProgID in HKLM\SOFTWARE\Classes that dictates how to handle any input given to it (yours may already exist):
HKLM\SOFTWARE\Classes MyApp.ProtocolHandler //this is the ProgID, subkeys are its properties (Default) = My Protocol //name of any type passed to this DefaultIcon (Default) = %ProgramFiles%\MyApp\MyApp.exe, 0 //for example shell open command (Default) = %ProgramFiles%\MyApp\MyApp.exe %1 //for example
Then fill the registry with DefaultProgram info inside a Capabilities key:
HKLM\SOFTWARE\MyApp Capabilities ApplicationDescription URLAssociations myprotocol = MyApp.ProtocolHandler //Associated with your ProgID
Finally, register your application's capabilities with DefaultPrograms:
HKLM\SOFTWARE RegisteredApplications MyApplication = HKLM\SOFTWARE\MyApp\Capabilities
Now all "myprotocol:" links should trigger %ProgramFiles%\MyApp\MyApp.exe %1.