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

Add $urltransform (trusted) modifier support #1364

Closed
zzebrum opened this issue Oct 20, 2020 · 6 comments
Closed

Add $urltransform (trusted) modifier support #1364

zzebrum opened this issue Oct 20, 2020 · 6 comments

Comments

@zzebrum
Copy link
Contributor

zzebrum commented Oct 20, 2020

It might be useful to have a $rewrite modifier that supports all kinds of redirections, basically a $replace modifier for URLs.

There are many use cases where this modifier may be useful, but overall it's too dangerous to allow it to be used in third-party lists so it should be limited to trusted filters only.

UPD 17.01.2024: uBO renamed to uritransform since syntax was changed in 1.54. #1364 (comment)

Original report:

@BlitW0 commented on [Wed Oct 14 2020](https://github.com/AdguardTeam/AdguardForAndroid/issues/3634)

Problem Description

Add a way to redirect a URL to a different URL based on regex rules.

Proposed Solution

No idea how it would work, but it might be separate section in settings since standard filter rules do not support URL redirection.

Alternatives Considered

Tried to see if standard filters with ABP syntax can do this, but was not able to find anything.


@TheHasagi commented on Thu Oct 15 2020

@BlitW0

Hello! Can you explain with more details for what purposes do you need such a feature?


@zzebrum commented on Mon Oct 19 2020

@BlitW0 any update?


@BlitW0 commented on Mon Oct 19 2020

My reason was for redirecting reddit's awful mobile website to the compact version or old reddit. It might also be useful for different sites in the same manner? I know it is possible through userscripts but it may not always be possible to write scripts on mobile, so this can be an easier way through GUI.

@ameshkov ameshkov changed the title URL Redirection Add $rewrite modifier support Aug 10, 2023
@ameshkov ameshkov changed the title Add $rewrite modifier support Add $rewrite modifier support Aug 10, 2023
@ameshkov
Copy link
Member

ameshkov commented Nov 7, 2023

Merged urltransform here: #1820

Let's call it urltransform since there's already existing modifier.

@slavaleleka could you please also create an issue in tsurlfilter?

@ameshkov ameshkov changed the title Add $rewrite modifier support Add $urltransform modifier support Nov 7, 2023
@adguard-bot adguard-bot changed the title Add $urltransform modifier support Add $urltransform (trusted) modifier support Nov 7, 2023
@ameshkov
Copy link
Member

ameshkov commented Nov 7, 2023

One question, I see that it's limited to relative redirects to the same origin in uBO. Do we want to allow redirects to any URLs since it's a trusted modifier anyways?

Alternatively, we could allow redirects to one specific origin (filters.adtidy.org for instance) that's trusted.

What do you think?

@Yuki2718
Copy link

Yuki2718 commented Dec 20, 2023

uBO renamed to uritransform since syntax was changed in 1.54.

@imTHAI
Copy link

imTHAI commented Jan 20, 2024

Hello
I don’t want to put pressure of any kind. I know you do a fantastic job and I'm a huge fan of the Adguard Products. But as I'm the requestor of the duplicate #1557 since some years already (2021), I just wanted to know the status of the feature. I know it's for v1.15 but it looks so far.
And currently, the only alternative for this kind of advertising/tracking is ClearURLs but it won't work on Safari and the developer is not keeping it up to date anymore.🙁
As this request has been duplicated at least 3 times, I know it is expected by quite a few people. (well, I think).

Kind regards,

@ameshkov
Copy link
Member

We really want to improve the speed with which CoreLibs updates are rolled out so 1.15 shouldn't be that far.

The main issue with this modifier is that it's kinda too powerful, we may need to make it more clear to the user what it means to make a filter list "trusted".

@Yuki2718
Copy link

For filter lists I think limiting it to Full trust level will be enough. I rather worry that this can be used in User rules, after seeing people add whatever rules they found online without second thought. AG apps has low-level settings which average user won't touch and I guess Full trust rules should be disabled by default and should only be enabled in the settings by advanced user.

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

No branches or pull requests

7 participants