librex icon indicating copy to clipboard operation
librex copied to clipboard

Automatic redirection

Open Ahwxorg opened this issue 1 year ago • 8 comments

What? This issue is about automatic redirection, which was added in commit 7559bc8101fd09a6d946c5b87f0be5ebaccf4031, and edited in commit e03b930386caff3b8cc0de4c059a8666a15a2741.

The issue The issue is that (I am assuming most people) people (like me) do not want to automatically redirect their queries to another instance for whatever reasons.

Possible solution A few solutions would be:

  • You could make it opt-in in the settings, which seem to be based on cookies.
  • You could also make a clickable "This instance seems to not give results on your query. Do you want to try on another instance?".
  • You could also make a different URL path for automatic redirection, and disable it on the default search.php?q=%s.
  • You could also make a parameter such as search.php?q=%s&ar=true where ar is set to true/false based on the settings, with a default of false.

I also think it's also very important to make a list of "trusted instances", which the users are able to set by themselves, so that LibreX only redirects to those instances.

Extra idea

I personally think it should also be a setting you can change in the config.php since I like to clear cookies, but I don't think most people would agree. You could also make a default in the config.php which users can toggle in the settings with a default of enabled=false.

Let me know if any of these ideas are a good idea, and I would be willing to try to implement them.

Ahwxorg avatar Jun 24 '23 14:06 Ahwxorg

I made this and was extremely surprised when it was just merged. I expected to receive suggestions by hnhx about how it should be implemented differently. I think it should be a clickable text suggesting to redirect to other instance, maybe not random but from config.php or cookies. Maybe it should be integrated with something like libredirect

gospodin55 avatar Jun 27 '23 22:06 gospodin55

Yeah, that's what I said. @hnhx could this be implemented the correct way?

Ahwxorg avatar Jun 28 '23 19:06 Ahwxorg

I'm not updating my instance untill its patched correctly, as this is a huge privacy concern for me.

Ahwxorg avatar Jun 28 '23 19:06 Ahwxorg

It also breaks API: when search results are queried through API and Google starts rate limiting, user is redirected to search on the other instance instead of API.

torunar avatar Aug 01 '23 07:08 torunar

@hnhx bumping this again

Ahwxorg avatar Aug 01 '23 12:08 Ahwxorg

Maybe someone should fork librex, waiting for hnhx is too long

gospodin55 avatar Aug 01 '23 22:08 gospodin55

I will.

Ahwxorg avatar Aug 01 '23 23:08 Ahwxorg

https://github.com/Ahwxorg/LibreY <3

codedipper avatar Aug 02 '23 19:08 codedipper