Configuration [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:dpi:dpi_options:opt_advertising:ads_conf [2023/11/01 13:55] – removed elena.krasnobryzhen:dpi:dpi_options:opt_advertising:ads_conf [2024/09/26 15:29] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Configuration ======
 +{{indexmenu_n>2}}
 +The option is enabled by configuration parameter in ///etc/dpi/fastdpi.conf://
 +
 +<code>ad_server=www.adserver.ru</code>
 +Here <nowiki>www.adserver.ru</nowiki> is the name or the address of the new content server.
 +
 +The list of URLs to replace is supplied as a text file. Each line of this file contains one URL (no <nowiki>http://</nowiki> prefix).
 +
 +**Example:** the list to replace ad content Yandex Direct and Google AdWords:
 +
 +<code>
 +pagead2.googlesyndication.com/pagead/show_ads.js
 +an.yandex.ru/system/context.js
 +</code>
 +
 +The list is converted into an internal format and placed to /var/lib/dpi. DPI platform loads it from the latest location: 
 +<code>
 +cat my_ad_list.txt|url2dic my_ad_list.dic
 +mv my_ad_list.dic /var/lib/dpi/adlist.bin
 +</code>
 +
 +<note important>Advertisement blocking using https/quic protocols is carried out using the hosts list\\
 +The redirection to ad_server in this case is not performed.</note>
 +
 +**Example:** preparing a list for the ad blocking in youtube:
 +<code bash>
 +cat <<EOF|url2dic /var/lib/dpi/adlistsni.bin
 +pagead2.googlesyndication.com
 +googleads.g.doubleclick.net
 +googleads4.g.doubleclick.net
 +pubads.g.doubleclick.net
 +ad.doubleclick.net
 +securepubads.g.doubleclick.net
 +www.googleadservices.com
 +EOF
 +</code>
 +
 +**Example:** preparing a list to block popular ads:
 +
 +<code>adservice.google.com
 +pagead2.googlesyndication.com
 +ads.adfox.ru
 +yabs.yandex.ru</code>