Skip to content
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

[Feature request] Add a FediLinks protocol handler #3964

Open
SoniEx2 opened this issue Jul 3, 2023 · 15 comments
Open

[Feature request] Add a FediLinks protocol handler #3964

SoniEx2 opened this issue Jul 3, 2023 · 15 comments
Labels
feature-request Request of a new feature

Comments

@SoniEx2
Copy link

SoniEx2 commented Jul 3, 2023

Is your feature request related to a problem? Please describe.

Would like to be able to share youtube links without pointing ppl at youtube specifically. Ppl should just be able to use Invidious without messing with editing URLs.

Describe the solution you'd like

We made Fedi-To to direct ppl to the websites they wanna use. So for example we could wrap a web+video://youtube.com/watch?v=whatever link in a Fedi-To link, have it open in youtube for your average user, but have it open in invidious for your invidious user. This only requires the website to provide a protocol handler endpoint, similar to one used for registerProtocolHandler.

We made The Fedi Links Project to improve mastodon and promote Atom feeds and other decentralized/distributed projects, and we're now up to 3 mastodon clients that implement it.

Describe alternatives you've considered

You could just use registerProtocolHandler directly but nobody uses that for a whole host of reasons, including the fact that you can't link to a registerProtocolHandler on some services. Meanwhile Fedi-To wrapped links are plain https and just work everywhere.

Not really relevant anymore.

Additional context

Nothing else really relevant.

~~Oh right: https://fedi-to.net/~~~

@SoniEx2 SoniEx2 added the feature-request Request of a new feature label Jul 3, 2023
@Yetangitu
Copy link
Contributor

I don't think this is the right way to go at decentralising the 'net as it actually adds a centralised step - the fedi-to dereferencer - to opening any links. Decisions like this should be made locally, anywhere from LAN-level to the application used to access content, without referencing any intermediates which could track whatever the user is doing.

Then there is the (ab)use of the protocol field to indicate content type, here I'd suggest simply using a parameter - something like what the Content-Type header is supposed to be used for but used as a parameter instead of a header. Those who have the required extension/add-on/content script installed will be referred to their proxy or application of preference while others will just use the original source. For Youtube this could look like:

https://youtube.com/watch?v=whatever&x-content-type=web+video

Of course the name of the parameter should be chosen so that collisions are unlikely, x-content-type is probably not the best choice.

Then there is the question of what this all has to do with federation as implied by the 'fedi-to' moniker. I understand that federation is all the rage at the moment with the Twitter-brouhaha, MetaFacebook's coming entry to this field and Reddit's antics but the use of content proxies like Invidious/Nitter/libreddit/etc is not related to federation in any way. Maybe 'link-to' would be a better name, or 'proxy-to', or 'gimme' or something like the 'sensible-browser/editor/pager/terminal' from Debian's sensible-utils package would be better, e.g. sensible-viewer.

BTW, that "made by a queer trans person" reference in the fedi-to.net site is quite divisive, it may act like a rainbow flag to some but acts as a red flag to many others. May I suggest keeping sexual orientation (etc.) out of unrelated communications?

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 4, 2023

If you don't like the fedi-to website being a website, make it a built-in OS/browser feature. Not like it really matters; the web is centralized, it's all controlled by the WHATWG anyway. Pick your poison.

@markozajc
Copy link

I'm sure anyone interested in using Invidious and similar services uses or at least knows about redirection extensions such as Privacy Redirect, Redirector, or similar - there's no need for "messing with editing URLs" if you want to use Invidious.

I'm also having trouble discerning what feature exactly is this requesting: in the title you suggest that Invidious starts registering a protocol handler (for web+video if I understood correctly), but in the body you explain how "nobody uses that" and pitch your own website that can support redirection without changes to Invidious.

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 5, 2023

the idea is to familiarize users with protocol handlers and set them free from traditional platforms.

the goal is to EEE the traditional platforms.

@markozajc
Copy link

Okay, but what's the Invidious feature being requested exactly?

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 5, 2023

a protocol handler endpoint.

we're not asking Invidious to actually call registerProtocolHandler, but to have an endpoint for a future registerProtocolHandler-equivalent.

@unixfox unixfox added the good first issue Good for newcomers label Jul 5, 2023
@SamantazFox
Copy link
Member

What's the benefit if this method over sharing youtube URLs and using a redirector extension (or alternatively sharing redirect.invidious.io URLs and selecting an instance)?

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 14, 2023

wait what's redirect.invidious.io

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 14, 2023

okay that's pretty cool. so the idea was to standardize an API for that kind of stuff, that also makes it user-overridable. so you could have e.g. web+invidious://redirect.invidious.io/... and have it open in redirect.invidious.io by default, but then have user-defined protocol handlers that are preferred over it, without having to chase it in the big-ass list.

(but we're still working on that "standardize" part.)

@SamantazFox
Copy link
Member

One thing I don't understand, is how do you handle these web+:// schemes?

So for example we could wrap a web+video://youtube.com/watch?v=whatever link in a Fedi-To link, have it open in youtube for your average user, but have it open in invidious for your invidious user. This only requires the website to provide a protocol handler endpoint, similar to one used for registerProtocolHandler.

Who "registers" the protocol handler? To whom?
Do all invidious instances have to register that handler?
If yes, what do you do when you have 90 handlers for web+video://? Do you redirect randomly, or are you storing user data to know which instance someone prefers?

How is sharing web+video://youtube.com/watch... different from sharing a regular youtube URL and letting the user install (or not) an extension to redirect them?


An other thing I don't understand, is who hosts this API you're talking about?
If that's centralized on your server, what if it goes down?

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 14, 2023

oh no, we don't store user data. user stores user data. (it's called cookies, they're pretty great if you use them for their intended purpose, instead of tracking or profiling.)

the long-term goal is to not have a centralized server, but yes the current approach is to just throw a centralized server at the problem. or to use one of the flows described in the Internet-Draft.

how would an extension work? is invidious detectable by an extension? are there browser APIs for detecting whether a website does a thing (like "is an alternative youtube frontend") or does that rely on guesswork?

@SamantazFox
Copy link
Member

From what I can grasp of this internet draft, each website have to implement something (a sort of popup?) in which the user will input a domain, and then get redirected if that domain supports that protocol handler, right? Isn't it a bit cumbersome? How is this faster than copy/pasting the URL into your home instance's search box (in the case of mastodon or piped, e.g)?

how would an extension work? is invidious detectable by an extension? are there browser APIs for detecting whether a website does a thing (like "is an alternative youtube frontend") or does that rely on guesswork?

The extension I use (libredirect) works with a list of know instances URL per service (e.g youtube). But some others (e.g redirector) works with pure URL regex. List of instances can be gathered from online sources (like our official list) or managed locally.

@SoniEx2
Copy link
Author

SoniEx2 commented Jul 14, 2023

the Internet-Draft defines no particular interaction flow with the endpoint - the examples are mostly informative. but yes, that is exactly what the examples demonstrate. a perhaps more exciting interaction flow is provided by the fedicraft minecraft mod, but that is not supported by web browsers at this point.

the extension-based workaround sounds... well, it sounds fine. it does require installing an extension which is often not possible, so that makes it not great. but it's fine, if you can use it. but is that good enough? not everyone might agree that it is.

@markozajc
Copy link

markozajc commented Jul 14, 2023

Can you describe in detail and without vagueness how this would work for Invidious and which changes need to be made?

@SamantazFox SamantazFox removed the good first issue Good for newcomers label Sep 10, 2023
@SoniEx2
Copy link
Author

SoniEx2 commented Jan 14, 2024

invidious would define an URI format: web+invidious://some.invidious.instance.example/watch?v=video_id

invidious would then implement GET /.well-known/protocol-handler?target=web%2Binvidious://some.invidious.instance.example/watch?v=video_id to redirect to Location: /watch?v=video_id

and that's it.

@SoniEx2 SoniEx2 changed the title [Feature request] Add a Fedi-To protocol handler [Feature request] Add a FediLinks protocol handler Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request of a new feature
Projects
None yet
Development

No branches or pull requests

5 participants