S
S
sudo rm -rf /2016-05-10 05:09:07
JavaScript
sudo rm -rf /, 2016-05-10 05:09:07

How to filter very annoying ads that AdGuard and AdBlock can't handle on their own?

In the home network, a site is often visited, which hosts one extremely annoying and no less "tenacious" advertisement. Today I finally got tired of it, and I decided to remove it. I decided to write a script in JS running Node that would accept a URI, request a resource through it, receive it, remove ads (a base64 image in the style tag, in which there is only one block with a random id pointing to a div with ads), replace the host in absolute links to themselves, showed the finished page.
I don't have much knowledge about networks.
Work model:
1) (!) All requests to the resource are redirected by the router to the machine with the filter
2) The filter receives the request, (!) sends it to the site
3) Receives, removes ads, replaces the host in absolute links with its local address
4) Displays a beautiful site There
are two problems:
1) I did not find such redirects in the router (Zyxel Keenetic OMNI II).
2) How to ignore redirects for a filter?
Help, pliz, finalize (or rework the model).
Solved the problem in a different way. Thank you all for your advice)

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey, 2016-05-10
@alsopub

As an option - look from which domain it is loaded and add the entry 127.0.0.1 site.ru to the hosts so that it does not load in any browsers.

M
Maxim Lumen, 2016-05-10
@Maximum_Live

Well, I don’t argue, there is such an ad that ad_guard and ad_block don’t cut, look how I do it, only bad that it’s only for one session video

I
Ilya Ponomarev, 2015-06-24
@Eli_Jah

Xubuntu, if you like Unity, you can customize the interface to fit your style. It eats a little (I have 14.10x32 - in idle time 200-300mb)
According to Photoshop - it costs wine (PlayOnLinux) and Photoshop CS6 - there are large layouts, no brakes were noticed.

A
Alexey Ovdienko, 2015-06-24
@doubledare

Doesn't Sublim text work on Unix?
There is extract in brackets, why photoshop then?

A
Antony, 2015-06-25
@RiseOfDeath

Start with the toolkit.
Ubuntu (and Linux in general) are good for a small amount of sex to raise Apache. (Actually, under Windows, Denver calmly saves you. For development, this is enough)
As for your requirements:
Photoshop (Adobe is desirable) is definitely in the span. It is better to install Windows or take a poppy than to suffer with it in Vine. Gimp, IMHO, is not suitable for serious work. In addition, there hotkeys do not completely correspond to UX.
a good editor (like Brackets) - No problem with that, just a matter of habit. Text editors sea for every taste.
a large selection of applications (optional) - ??? What kind of applications? Toys, audio players? Check this item.
Google Chrome, Chromium (optional) - Yes. I think it’s not for me to explain to you that chrome alone is not enough for a web designer. Linux also has Firefox and Opera. But with a donkey (if you have to do it for him) it is more difficult.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question