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] Redirect to alternatives (ex. Invidious instead of YouTube) #129

Open
dieser-niko opened this issue Mar 7, 2024 · 14 comments

Comments

@dieser-niko
Copy link

Hi there,

I host a few other search instances like LibreY, Whoogle, 4get and of course yours.

One feature in Whoogle that I really like is replacing links to YouTube, Reddit, etc. with some other sites like Invidious, RedLib (a fork of Libreddit), etc.
Whoogle does this with a set of predefined Environment Variables

I've tested all these search front ends and have to say that yours looks and feels the best, but the redirection to Invidious and RedLib is something I really miss.

@Extravi
Copy link
Owner

Extravi commented Mar 7, 2024

This is something I've been wanting to do. I'm just looking into my implementation first, and parts of settings as of right now require JavaScript, so this might require JavaScript on the client. But all the JavaScript is framework-free and open source under the GPL and works with LibreJS, and like LibreY, this will be configurable on the client; I'm just looking for a relatively clean solution.

@Extravi
Copy link
Owner

Extravi commented Mar 7, 2024

This is something that will be added, and once it's added, I'll let you know. Please keep this issue open until then and provide feedback once it's added to Araa. 

@amogusussy
Copy link
Contributor

You could have it as a textarea box where the user types in the original url, and the url to redirect to.
This can be in a separate page in the settings, like the 'Discover Themes' is.
For example, to redirect from https://youtube.com/ to https://yewtu.be/, the user would enter:

https://youtube.com/=https://yewtu.be/

This can be set as a cookie, then an extra function will parse the cookie, and return a dict of all the sites.
Then, have another function that checks if a url has one of these sites in their url, then replace it with whatever the user has said to replace it with.

There should also be a default set in config.py by the admin of the instance.

@thelastblt
Copy link

i was able to have it redirect to my invidious instance by setting this .env variable -PIPED_INSTANCE=

@Extravi
Copy link
Owner

Extravi commented Jul 25, 2024

this is being worked on right now it will be it's own end point with a button to it from settings at /redirects

@Extravi
Copy link
Owner

Extravi commented Jul 25, 2024

image

@Extravi
Copy link
Owner

Extravi commented Jul 25, 2024

image

@Extravi
Copy link
Owner

Extravi commented Jul 25, 2024

it will look something like this trying to keep it constant with everything else and all the UI

@Extravi
Copy link
Owner

Extravi commented Jul 25, 2024

let me know how that looks, thanks

@Extravi
Copy link
Owner

Extravi commented Jul 25, 2024

image
image
image
image

@amogusussy
Copy link
Contributor

The UI looks good.
It could be better if there's a way to add your own redirects of sites that you choose, rather than being restricted to whatever is listed.

Can you make a separate branch so I can do some testing?

@Extravi
Copy link
Owner

Extravi commented Aug 31, 2024

The UI looks good. It could be better if there's a way to add your own redirects of sites that you choose, rather than being restricted to whatever is listed.

Can you make a separate branch so I can do some testing?

i like this idea but i have not worked in araa in sometime

@Extravi
Copy link
Owner

Extravi commented Aug 31, 2024

The UI looks good. It could be better if there's a way to add your own redirects of sites that you choose, rather than being restricted to whatever is listed.

Can you make a separate branch so I can do some testing?

im not sure how this could affect security the entire idea of redirects in general

@Extravi
Copy link
Owner

Extravi commented Aug 31, 2024

the most secure way might be doing it locally with javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants