Good day! I’m looking for is a way of creating rules to intercept, modify, drop, and replace HTTP requests and responses, hopefully even with regex(or similar) capabilities.

The best extension I’ve found that seems to suit those needs is Requestly. However, it seems like they have some shady practices of bought/bot reviews, like here on AlternativeTo.net, where you can see the review are made by accounts that are created the same day of the review, and never used since. The same pattern can be found on ProductHunt.
Is there perhaps an audit of their Github repo somewhere?

I’ve also looked at apps like mitmproxy, but I was hoping for a solution that is in-browser.

I know that Firefox and Chromium has the built-in dev tools for this, but this is only applied with the dev tools actively open; I’m looking for a more persistent solution.

Please let me know if this is not the place to ask, and if there are other places I should try and look instead/also.


Edit

My goal is to do something to the effect of uBlock Origin, but instead of just blocking/hiding, either replace with local files, or intercept req/res in order to manipulate them favorably, without being detected. I don’t know what uBlock does under the hood though, apart from its resource blocking and CSS-derived hiding.

Example: Watching a video on youtube, an ad is about to get loaded, but instead of the hiding/blocking strategy uBlock uses, intercept the GET/POST, save the important flags that are uniquely served to your device that would indicate that you have successfully been served the ad, drop the rest, and then answer with what would be a valid response for “I have watched the ad in its entirety”. So the server basically saying “Here, I give you this page and this script with both vital and ad contents. I now expect you to provide the corresponding hash that these two files will create through a series of functions. If you don’t, I will assume you’re blocking me, and I won’t provide further contents.”, and I’ll simply respond with “Here’s your hash! wink”.

Essentially, I wish to experiment with trying to be completely invisible in the blocking, by providing responses as if I have loaded and watched the ad, with all anti-adblock implementations through scripts and dynamic loading “intact” and unaware.

  • Havatra@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    23 hours ago

    uBlock Origin I very much like, and I think it’s near-impossible for me to use a browser without it installed anymore. But as far as I know, it’s only used for blocking (dropping network requests) and hiding (CSS-like rules), but no manipulation?

    The monkeys I’ve also used a little bit of, but I wasn’t aware that they supported being run ahead of the rest of the page like how I wanted, so this is definitely worth looking into, I appreciate it!
    For reference, I found this answer on StackOverflow, which is promising.