<!--
SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later
- SPDX-FileCopyrightText: 2023-2026 Soren Stoutner <soren@stoutner.com>
+ SPDX-FileCopyrightText: 2018, 2020, 2022-2026 Soren Stoutner <soren@stoutner.com>
This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
</authorgroup>
<copyright>
- <year>2016-2017, 2021-2026</year>
+ <year>2016-2018, 2020-2026</year>
<holder>&Soren.Stoutner;</holder>
</copyright>
<legalnotice>&FDLNotice;</legalnotice>
<!-- Last update. -->
- <date>2026-04-25</date>
+ <date>2026-05-14</date>
<!-- The version of Privacy Browser this documentation is written for. -->
<releaseinfo>&privacybrowser; version 0.9</releaseinfo>
</para>
</sect1>
+ <!-- Requests. -->
+ <sect1 id="requests">
+ <title>Requests</title>
+
+ <para>
+ When a URL is loaded, it typically makes a number of resource requests for CCS, JavaScript, image, and other files.
+ Details about these requests can be viewed in <xref linkend="filter-lists-requests"/>.
+ The URL toolbar has a button that displays how many requests were block. Clicking on the button also opens the Requests dialog.
+ </para>
+
+ <para>
+ Clicking on a request in the list opens the Request Details dialog.
+ </para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="request-details.png" format="PNG"/>
+ </imageobject>
+
+ <textobject>
+ <phrase>Request Details</phrase>
+ </textobject>
+ </mediaobject>
+
+ <para>
+ Before a web page loads a resource, it is checked against the filter lists that are enabled in the following order:
+ </para>
+
+ <orderedlist>
+ <listitem><para>UltraPrivacy</para></listitem>
+ <listitem><para>UltraList</para></listitem>
+ <listitem><para>EasyPrivacy</para></listitem>
+ <listitem><para>EasyList</para></listitem>
+ <listitem><para>Fanboy’s Annoyance List</para></listitem>
+ </orderedlist>
+
+ <para>
+ These lists are based on the <ulink url="https://adblockplus.org/filters">Adblock syntax</ulink>.
+ <ulink url="https://www.stoutner.com/privacy-browser-android/filter-lists/ultraprivacy/">UltraPrivacy</ulink> and
+ <ulink url="https://www.stoutner.com/privacy-browser-android/filter-lists/ultralist/">UltraList</ulink> are maintained by Stoutner.
+ The last three filter lists come from the <ulink url="https://easylist.to/">EasyList project</ulink>.
+ </para>
+
+ <para>
+ The raw entries from the filter lists are processed into 6 sublists.
+ </para>
+
+ <orderedlist>
+ <listitem><para>Main Allow List</para></listitem>
+ <listitem><para>Initial Domain Allow List</para></listitem>
+ <listitem><para>Regular Expression Allow List</para></listitem>
+ <listitem><para>Main Block List</para></listitem>
+ <listitem><para>Initial Domain Block List</para></listitem>
+ <listitem><para>Regular Expression Block List</para></listitem>
+ </orderedlist>
+
+ <para>
+ Initial domain lists check against the beginning of the domain. These are very common and placing them in their own sublist allows for more CPU-efficient checking of resource requests.
+ Regular expression lists follow the <ulink url="https://en.wikipedia.org/wiki/Regular_expression">regular expression syntax</ulink>.
+ </para>
+
+ <para>
+ The contents of the filter lists may be viewed by selecting <xref linkend="filter-lists-view-filter-lists"/>.
+ </para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="filter-lists.png" format="PNG"/>
+ </imageobject>
+
+ <textobject>
+ <phrase>Filter Lists</phrase>
+ </textobject>
+ </mediaobject>
+
+ <para>
+ A more detailed description of how the filter list entries are processed is available at <ulink url="https://www.stoutner.com/privacy-browser-pc/filter-lists/">stoutner.com</ulink>.
+ </para>
+ </sect1>
+
<!-- Spell Checking. -->
<sect1 id="spell-checking">
<title>Spell Checking</title>
Privacy Browser uses the binary <filename>.bdic</filename> Hunspell dictionary format
<ulink url="https://doc.qt.io/qt-5/qtwebengine-features.html#spellchecker">utilized by Qt WebEngine</ulink>
which was <ulink url="https://sites.google.com/a/chromium.org/dev/developers/how-tos/editing-the-spell-checking-dictionaries">created by Google for Chromium</ulink>.
- Debian’s Hunspell dictionary language packages are slowly adding support for the <filename>.bdic</filename> format. Those which have are listed by Privacy Browser as suggested packages.
+ On Debian, these dictionaries are provided by the Hunspell and sometimes the MySpell packages.
</para>
<para>
<variablelist>
<!-- Requests. -->
- <varlistentry id="requests">
+ <varlistentry id="filter-lists-requests">
<term>
<menuchoice>
<shortcut>
</varlistentry>
<!-- View Filter Lists. -->
- <varlistentry id="view-filter-lists">
+ <varlistentry id="filter-lists-view-filter-lists">
<term>
<menuchoice>
<shortcut>
/* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2024-2026 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
*
// Get the filter list file.
QFile filterListFile(filterListStructPointer->filePath);
- // Open the filter list file.
- filterListFile.open(QIODevice::ReadOnly);
-
- // Create a filter list text stream.
- QTextStream filterListTextStream(&filterListFile);
-
- // Populate the text edit.
- filterListTextEditPointer->setText(filterListTextStream.readAll());
-
- // Clear the sublist combo box.
- sublistComboBoxPointer->clear();
-
- // Calculate the size of the filter lists.
- int mainAllowListSize = distance(filterListStructPointer->mainAllowListPointer->begin(), filterListStructPointer->mainAllowListPointer->end());
- int initialDomainAllowListSize = distance(filterListStructPointer->initialDomainAllowListPointer->begin(), filterListStructPointer->initialDomainAllowListPointer->end());
- int regularExpressionAllowListSize = distance(filterListStructPointer->regularExpressionAllowListPointer->begin(), filterListStructPointer->regularExpressionAllowListPointer->end());
- int mainBlockListSize = distance(filterListStructPointer->mainBlockListPointer->begin(), filterListStructPointer->mainBlockListPointer->end());
- int initialDomainBlockListSize = distance(filterListStructPointer->initialDomainBlockListPointer->begin(), filterListStructPointer->initialDomainBlockListPointer->end());
- int regularExpressionBlockListSize = distance(filterListStructPointer->regularExpressionBlockListPointer->begin(), filterListStructPointer->regularExpressionBlockListPointer->end());
-
- // Get the translated filter list names.
- QString mainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_ALLOWLIST);
- QString initialDomainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_ALLOWLIST);
- QString regularExpressionAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_ALLOWLIST);
- QString mainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_BLOCKLIST);
- QString initialDomainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_BLOCKLIST);
- QString regularExpressionBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_BLOCKLIST);
-
- // Populate the sublist combo box.
- sublistComboBoxPointer->addItem(i18nc("The main allow list", "%1 - %2", mainAllowListName, mainAllowListSize));
- sublistComboBoxPointer->addItem(i18nc("The initial domain allow list", "%1 - %2", initialDomainAllowListName, initialDomainAllowListSize));
- sublistComboBoxPointer->addItem(i18nc("The regular expression allow list", "%1 - %2", regularExpressionAllowListName, regularExpressionAllowListSize));
- sublistComboBoxPointer->addItem(i18nc("The main block list", "%1 - %2", mainBlockListName, mainBlockListSize));
- sublistComboBoxPointer->addItem(i18nc("The initial domain block list", "%1 - %2", initialDomainBlockListName, initialDomainBlockListSize));
- sublistComboBoxPointer->addItem(i18nc("the regular expression block list", "%1 - %2", regularExpressionBlockListName, regularExpressionBlockListSize));
+ // Open the filter list file. This returns true if the open operation succeeded.
+ if (filterListFile.open(QIODevice::ReadOnly))
+ {
+ // Create a filter list text stream.
+ QTextStream filterListTextStream(&filterListFile);
+
+ // Populate the text edit.
+ filterListTextEditPointer->setText(filterListTextStream.readAll());
+
+ // Clear the sublist combo box.
+ sublistComboBoxPointer->clear();
+
+ // Calculate the size of the filter lists.
+ int mainAllowListSize = distance(filterListStructPointer->mainAllowListPointer->begin(), filterListStructPointer->mainAllowListPointer->end());
+ int initialDomainAllowListSize = distance(filterListStructPointer->initialDomainAllowListPointer->begin(), filterListStructPointer->initialDomainAllowListPointer->end());
+ int regularExpressionAllowListSize = distance(filterListStructPointer->regularExpressionAllowListPointer->begin(), filterListStructPointer->regularExpressionAllowListPointer->end());
+ int mainBlockListSize = distance(filterListStructPointer->mainBlockListPointer->begin(), filterListStructPointer->mainBlockListPointer->end());
+ int initialDomainBlockListSize = distance(filterListStructPointer->initialDomainBlockListPointer->begin(), filterListStructPointer->initialDomainBlockListPointer->end());
+ int regularExpressionBlockListSize = distance(filterListStructPointer->regularExpressionBlockListPointer->begin(), filterListStructPointer->regularExpressionBlockListPointer->end());
+
+ // Get the translated filter list names.
+ QString mainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_ALLOWLIST);
+ QString initialDomainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_ALLOWLIST);
+ QString regularExpressionAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_ALLOWLIST);
+ QString mainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_BLOCKLIST);
+ QString initialDomainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_BLOCKLIST);
+ QString regularExpressionBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_BLOCKLIST);
+
+ // Populate the sublist combo box.
+ sublistComboBoxPointer->addItem(i18nc("The main allow list", "%1 - %2", mainAllowListName, mainAllowListSize));
+ sublistComboBoxPointer->addItem(i18nc("The initial domain allow list", "%1 - %2", initialDomainAllowListName, initialDomainAllowListSize));
+ sublistComboBoxPointer->addItem(i18nc("The regular expression allow list", "%1 - %2", regularExpressionAllowListName, regularExpressionAllowListSize));
+ sublistComboBoxPointer->addItem(i18nc("The main block list", "%1 - %2", mainBlockListName, mainBlockListSize));
+ sublistComboBoxPointer->addItem(i18nc("The initial domain block list", "%1 - %2", initialDomainBlockListName, initialDomainBlockListSize));
+ sublistComboBoxPointer->addItem(i18nc("the regular expression block list", "%1 - %2", regularExpressionBlockListName, regularExpressionBlockListSize));
+ }
}
void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const