Navigation Menu

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

Redirect links from Youtube to Invidious, and from Twitter to Nitter #821

Closed
Nutomic opened this issue Jun 17, 2020 · 11 comments
Closed

Redirect links from Youtube to Invidious, and from Twitter to Nitter #821

Nutomic opened this issue Jun 17, 2020 · 11 comments
Labels
area: privacy enhancement New feature or request

Comments

@Nutomic
Copy link
Member

Nutomic commented Jun 17, 2020

This might be a nice optional feature to have at some point. Basically a user setting where you can rewrite the domain for any links clicked. In the UI it could be a table like this:

enabled domain to replace new domain
true youtube.com invidio.us
false twitter.com nitter.net

So in this case, this user would get any links to youtube.com into invidio.us links. Whether in post links, comments or private messages. Of course we would have to avoid overloading any single instance.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Nutomic Nutomic added the enhancement New feature or request label Jun 17, 2020
@dessalines
Copy link
Member

Some overlap with #768 , and maybe clearURLs if it ever gets made into a library, might have these.

It might also be nice to have a rust library for these, but I wouldn't want to maintain it, because there are so many trackers to keep track of (heh).

It'd be nice if it was a cross-language thing like regex so that it could easily be exported to any language / project.

@Nutomic
Copy link
Member Author

Nutomic commented Jun 18, 2020

This issue here would be really basic, just a user configurable list of domains that get replaced. You dont need any regex or library for that.

#768 also wouldnt be that complicated, you just remove all query parameters that start with utm_.

@dessalines
Copy link
Member

Nice, looks like the clearUrls data is in json and regex: https://gitlab.com/KevinRoebert/ClearUrls/-/blob/master/data/data.json

@Nutomic Nutomic closed this as completed Jan 15, 2023
@dessalines
Copy link
Member

dessalines commented Mar 1, 2023

Reopening this, as now bots are imperfectly doing this with comments.

One issue with the bot approach, besides the tons of extra comments, is the fact that many of these redirect urls will probably be gone in a few months, as these services go down constantly, meaning all of the current bot-generated redirect comments will likely be useless after a while.

It would be nice for this to be an automated approach, ideally using that clearurls redirect file above, and maybe an instance setting for "use secure links".

Another preference: don't actually rewrite inserts or links in the DB, only on fetching / retrieving post links and markdown bodies everywhere.

@dessalines dessalines reopened this Mar 1, 2023
@kartikynwa
Copy link
Contributor

kartikynwa commented Mar 2, 2023

There is this service called farside.link which was created because of the ephemeral nature of these instances. Putting this out in the unlikely scenario it is found helpful.

@dessalines
Copy link
Member

Yeah that's actually extremely helpful, especially since it can use the original links.

@Nutomic what do you think? Maybe a server setting with some description? And then do you think this re-writing work should be done on the front end, or back end?

@Nutomic
Copy link
Member Author

Nutomic commented Mar 3, 2023

I agree that we should store original links in the database and convert when rendering. However a server setting wouldn't be enough because every instance would have some users who want to use these redirects and others who don't. A user setting would also not be sufficient, because someone might want to use twitter via nitter, but access youtube directly. Or use mobile apps like newpipe which need the original youtube link.

So I think the best solution is to do this conversion in the frontend, and show both links for the user to choose when browsing.

@ghost
Copy link

ghost commented Jun 12, 2023

I find this really annoying. I already have libredirect configure to redirect me to my favorite instances why would you want to redirect me to one I don't like?

@testman42
Copy link

testman42 commented Jul 11, 2023

few suggestions:

  1. Rename issue to "Implement privacy redirect for relevant links"
  2. Change the scope of the issue from just Youtube and Twitter to all the frontends that are listed in LibRedirect
  3. Consider planning this functionality as something that users can opt-in to.
  4. Think about how to make new Lemmy instance installation also prompt admin to install Farside instance as well.
    (it wouldn't be fair to have whole Lemmy network hammer the Farside instance that developer runs)
  5. Borrow instance-list-refreshing and other logic from LibRedirect in order to allow admins to easily configure the redirecting functionality on their Lemmy instances.

Also Farside is basically just one developer. They could use help, so encouraging Lemmy community to go help would probably benefit everyone.

So I think the best solution is to do this conversion in the frontend, and show both links for the user to choose when browsing.

Wouldn't it be better to have user choose in their settings whether they want redirecting to happen or not? Point 2 on the list above.

@dessalines
Copy link
Member

Considering how many of these external service routers have died over time, I think we should let front-ends, and web browser plugins handle link-rewriting, and not do any link-rewriting in the backend.

@dessalines dessalines closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@TabithaES
Copy link

I definitely like this table idea, assuming that

  • enabled is a checkbox
  • the user can arbitrarily add any domain with any replacement domain.
    • Example: my alternative front-end might not be on the public internet, but I'd like to click a link to it instead of copying a URL and manually replacing the domain in the URL bar with an IP address+port.
  • wildcards maybe also IDK
  • I suppose this could be done client-side only, but IDK if lemmy's backend supports storing arbitrary settings for the front-end so I could put the settings in on desktop and enjoy them on my phone.
enabled domain to replace new domain
true youtube.com localhost:20080
false twitter.com nitter.net
true reddit.com localhost:33100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: privacy enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants