From: Soren Stoutner Date: Sun, 1 Jun 2025 00:38:36 +0000 (-0700) Subject: Add WebSocket filter list support. https://redmine.stoutner.com/issues/1198 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;p=PrivacyBrowserPC.git Add WebSocket filter list support. https://redmine.stoutner.com/issues/1198 --- diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt index a0bc9eb..e00ad16 100644 --- a/src/dialogs/CMakeLists.txt +++ b/src/dialogs/CMakeLists.txt @@ -1,19 +1,20 @@ -# Copyright 2022-2024 Soren Stoutner . +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2022-2024 Soren Stoutner # # This file is part of Privacy Browser PC . # -# Privacy Browser PC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # -# Privacy Browser PC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU General Public License -# along with Privacy Browser PC. If not, see . +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . # List the sources to include in the executable. diff --git a/src/dialogs/FilterEntryDialog.cpp b/src/dialogs/FilterEntryDialog.cpp index 0515f64..f20a15b 100644 --- a/src/dialogs/FilterEntryDialog.cpp +++ b/src/dialogs/FilterEntryDialog.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. @@ -61,6 +61,7 @@ FilterEntryDialog::FilterEntryDialog(QWidget *parentWidgetPointer, QTableWidget scriptLineEditPointer = filterEntryDialogUi.scriptLineEdit; styleSheetLineEditPointer = filterEntryDialogUi.styleSheetLineEdit; subFrameLineEditPointer = filterEntryDialogUi.subFrameLineEdit; + webSocketLineEditPointer = filterEntryDialogUi.webSocketLineEdit; xmlHttpRequestLineEditPointer = filterEntryDialogUi.xmlHttpRequestLineEdit; appliedFilterOptionsLineEditPointer = filterEntryDialogUi.appliedFilterOptionsLineEdit; originalFilterOptionsLineEditPointer = filterEntryDialogUi.originalFilterOptionsLineEdit; @@ -151,10 +152,11 @@ void FilterEntryDialog::populateDialog(const int row) scriptLineEditPointer->setText(tableWidgetPointer->item(row, 14)->text()); styleSheetLineEditPointer->setText(tableWidgetPointer->item(row, 15)->text()); subFrameLineEditPointer->setText(tableWidgetPointer->item(row, 16)->text()); - xmlHttpRequestLineEditPointer->setText(tableWidgetPointer->item(row, 17)->text()); - appliedFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 18)->text()); - originalFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 19)->text()); - originalEntryLineEditPointer->setText(tableWidgetPointer->item(row, 20)->text()); + webSocketLineEditPointer->setText(tableWidgetPointer->item(row, 17)->text()); + xmlHttpRequestLineEditPointer->setText(tableWidgetPointer->item(row, 18)->text()); + appliedFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 19)->text()); + originalFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 20)->text()); + originalEntryLineEditPointer->setText(tableWidgetPointer->item(row, 21)->text()); // Make a local copy of the has request options boolean. bool hasRequestOptions = tableWidgetPointer->item(row, 6)->text() == i18n("Yes"); @@ -179,6 +181,7 @@ void FilterEntryDialog::populateDialog(const int row) setFilterOptionBackgroundPalette(scriptLineEditPointer); setFilterOptionBackgroundPalette(styleSheetLineEditPointer); setFilterOptionBackgroundPalette(subFrameLineEditPointer); + setFilterOptionBackgroundPalette(webSocketLineEditPointer); setFilterOptionBackgroundPalette(xmlHttpRequestLineEditPointer); // Set the request option status. @@ -192,6 +195,7 @@ void FilterEntryDialog::populateDialog(const int row) scriptLineEditPointer->setEnabled(hasRequestOptions); styleSheetLineEditPointer->setEnabled(hasRequestOptions); subFrameLineEditPointer->setEnabled(hasRequestOptions); + webSocketLineEditPointer->setEnabled(hasRequestOptions); xmlHttpRequestLineEditPointer->setEnabled(hasRequestOptions); // Set the domain list line edit to have the same palette as the domain line edit. diff --git a/src/dialogs/FilterEntryDialog.h b/src/dialogs/FilterEntryDialog.h index 48bd6a7..273a21e 100644 --- a/src/dialogs/FilterEntryDialog.h +++ b/src/dialogs/FilterEntryDialog.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef FILTER_ENTRY_DIALOG_H @@ -69,6 +69,7 @@ private: QLineEdit *subFrameLineEditPointer; QTableWidget *tableWidgetPointer; QLineEdit *thirdPartyLineEditPointer; + QLineEdit *webSocketLineEditPointer; QLineEdit *xmlHttpRequestLineEditPointer; // The private functions. diff --git a/src/dialogs/FilterListsDialog.cpp b/src/dialogs/FilterListsDialog.cpp index 511f820..faf3b49 100644 --- a/src/dialogs/FilterListsDialog.cpp +++ b/src/dialogs/FilterListsDialog.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. @@ -200,7 +200,7 @@ void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const } // Create the columns. - sublistTableWidgetPointer->setColumnCount(21); + sublistTableWidgetPointer->setColumnCount(22); // Create the table headers. QTableWidgetItem *appliedEntryListHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist applied entry list header", "Applied Entry List")); @@ -220,6 +220,7 @@ void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const QTableWidgetItem *scriptHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist script header", "Script")); QTableWidgetItem *styleSheetHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist style sheet header", "Style Sheet")); QTableWidgetItem *subFrameHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist sub frame header", "Sub Frame")); + QTableWidgetItem *webSocketHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist web socket header", "Web Socket")); QTableWidgetItem *xmlHttpRequestHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist XML HTTP request header", "XML HTTP Request")); QTableWidgetItem *appliedFilterOptionsHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist applied filter options header", "Applied Filter Options")); QTableWidgetItem *originalFilterOptionsHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist original filter options header", "Original Filter Options")); @@ -243,10 +244,11 @@ void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const sublistTableWidgetPointer->setHorizontalHeaderItem(14, scriptHeaderItemPointer); sublistTableWidgetPointer->setHorizontalHeaderItem(15, styleSheetHeaderItemPointer); sublistTableWidgetPointer->setHorizontalHeaderItem(16, subFrameHeaderItemPointer); - sublistTableWidgetPointer->setHorizontalHeaderItem(17, xmlHttpRequestHeaderItemPointer); - sublistTableWidgetPointer->setHorizontalHeaderItem(18, appliedFilterOptionsHeaderItemPointer); - sublistTableWidgetPointer->setHorizontalHeaderItem(19, originalFilterOptionsHeaderItemPointer); - sublistTableWidgetPointer->setHorizontalHeaderItem(20, originalEntryHeaderItemPointer); + sublistTableWidgetPointer->setHorizontalHeaderItem(17, webSocketHeaderItemPointer); + sublistTableWidgetPointer->setHorizontalHeaderItem(18, xmlHttpRequestHeaderItemPointer); + sublistTableWidgetPointer->setHorizontalHeaderItem(19, appliedFilterOptionsHeaderItemPointer); + sublistTableWidgetPointer->setHorizontalHeaderItem(20, originalFilterOptionsHeaderItemPointer); + sublistTableWidgetPointer->setHorizontalHeaderItem(21, originalEntryHeaderItemPointer); // Initialize the row counter. int rowCounter = 0; @@ -277,6 +279,7 @@ void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const QTableWidgetItem *scriptItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->script)); QTableWidgetItem *styleSheetItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->styleSheet)); QTableWidgetItem *subFrameItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->subFrame)); + QTableWidgetItem *webSocketItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->webSocket)); QTableWidgetItem *xmlHttpRequestItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->xmlHttpRequest)); QTableWidgetItem *appliedFilterOptionsItemPointer = new QTableWidgetItem(entryStructPointer->appliedFilterOptionsList.join(QLatin1String(" , "))); QTableWidgetItem *originalFilterOptionsItemPointer = new QTableWidgetItem(entryStructPointer->originalFilterOptions); @@ -300,10 +303,11 @@ void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const sublistTableWidgetPointer->setItem(rowCounter, 14, scriptItemPointer); sublistTableWidgetPointer->setItem(rowCounter, 15, styleSheetItemPointer); sublistTableWidgetPointer->setItem(rowCounter, 16, subFrameItemPointer); - sublistTableWidgetPointer->setItem(rowCounter, 17, xmlHttpRequestItemPointer); - sublistTableWidgetPointer->setItem(rowCounter, 18, appliedFilterOptionsItemPointer); - sublistTableWidgetPointer->setItem(rowCounter, 19, originalFilterOptionsItemPointer); - sublistTableWidgetPointer->setItem(rowCounter, 20, originalEntryItemPointer); + sublistTableWidgetPointer->setItem(rowCounter, 17, webSocketItemPointer); + sublistTableWidgetPointer->setItem(rowCounter, 18, xmlHttpRequestItemPointer); + sublistTableWidgetPointer->setItem(rowCounter, 19, appliedFilterOptionsItemPointer); + sublistTableWidgetPointer->setItem(rowCounter, 20, originalFilterOptionsItemPointer); + sublistTableWidgetPointer->setItem(rowCounter, 21, originalEntryItemPointer); // Increment the row counter. ++rowCounter; diff --git a/src/dialogs/FilterListsDialog.h b/src/dialogs/FilterListsDialog.h index 002393d..f04b9bb 100644 --- a/src/dialogs/FilterListsDialog.h +++ b/src/dialogs/FilterListsDialog.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef FILTER_LISTS_DIALOG_H diff --git a/src/dialogs/HttpAuthenticationDialog.cpp b/src/dialogs/HttpAuthenticationDialog.cpp index 650ce99..60fba8c 100644 --- a/src/dialogs/HttpAuthenticationDialog.cpp +++ b/src/dialogs/HttpAuthenticationDialog.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024 Soren Stoutner * - * This file is part of Privacy Browser PC . + * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. diff --git a/src/dialogs/HttpAuthenticationDialog.h b/src/dialogs/HttpAuthenticationDialog.h index 201067d..ac7f176 100644 --- a/src/dialogs/HttpAuthenticationDialog.h +++ b/src/dialogs/HttpAuthenticationDialog.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024 Soren Stoutner * - * This file is part of Privacy Browser PC . + * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef HTTPAUTHENTICATIONDIALOG_H diff --git a/src/dialogs/RequestDetailDialog.cpp b/src/dialogs/RequestDetailDialog.cpp index 1141eae..2b72386 100644 --- a/src/dialogs/RequestDetailDialog.cpp +++ b/src/dialogs/RequestDetailDialog.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. @@ -73,6 +73,7 @@ RequestDetailDialog::RequestDetailDialog(QWidget *parentWidgetPointer, QTableWid scriptLineEditPointer = requestDetailDialogUi.scriptLineEdit; styleSheetLineEditPointer = requestDetailDialogUi.styleSheetLineEdit; subFrameLineEditPointer = requestDetailDialogUi.subFrameLineEdit; + webSocketLineEditPointer = requestDetailDialogUi.webSocketLineEdit; xmlHttpRequestLineEditPointer = requestDetailDialogUi.xmlHttpRequestLineEdit; appliedFilterOptionsLineEditPointer = requestDetailDialogUi.appliedFilterOptionsLineEdit; originalFilterOptionsLineEditPointer = requestDetailDialogUi.originalFilterOptionsLineEdit; @@ -143,7 +144,7 @@ void RequestDetailDialog::populateDialog(const int row) // Create a new request struct. RequestStruct *requestStructPointer = new RequestStruct(); - // Populate the new request struct. + // Populate the new request struct. The order needs to match how the data stream is populated in RequestsDialog.cpp. requestStructDataStreamReader >> requestStructPointer->dispositionInt; requestStructDataStreamReader >> requestStructPointer->entryStruct.originalEntry; requestStructDataStreamReader >> requestStructPointer->entryStruct.originalFilterOptions; @@ -165,6 +166,7 @@ void RequestDetailDialog::populateDialog(const int row) requestStructDataStreamReader >> requestStructPointer->entryStruct.styleSheet; requestStructDataStreamReader >> requestStructPointer->entryStruct.subFrame; requestStructDataStreamReader >> requestStructPointer->entryStruct.thirdParty; + requestStructDataStreamReader >> requestStructPointer->entryStruct.webSocket; requestStructDataStreamReader >> requestStructPointer->entryStruct.xmlHttpRequest; requestStructDataStreamReader >> requestStructPointer->filterListTitle; requestStructDataStreamReader >> requestStructPointer->isThirdPartyRequest; @@ -212,6 +214,7 @@ void RequestDetailDialog::populateDialog(const int row) scriptLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.script)); styleSheetLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.styleSheet)); subFrameLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.subFrame)); + webSocketLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.webSocket)); xmlHttpRequestLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.xmlHttpRequest)); appliedFilterOptionsLineEditPointer->setText(requestStructPointer->entryStruct.appliedFilterOptionsList.join(QLatin1String(" , "))); originalFilterOptionsLineEditPointer->setText(requestStructPointer->entryStruct.originalFilterOptions); @@ -243,6 +246,7 @@ void RequestDetailDialog::populateDialog(const int row) setFilterOptionBackgroundPalette(scriptLineEditPointer); setFilterOptionBackgroundPalette(styleSheetLineEditPointer); setFilterOptionBackgroundPalette(subFrameLineEditPointer); + setFilterOptionBackgroundPalette(webSocketLineEditPointer); setFilterOptionBackgroundPalette(xmlHttpRequestLineEditPointer); // Set the request option status. @@ -256,6 +260,7 @@ void RequestDetailDialog::populateDialog(const int row) scriptLineEditPointer->setEnabled(hasRequestOptions); styleSheetLineEditPointer->setEnabled(hasRequestOptions); subFrameLineEditPointer->setEnabled(hasRequestOptions); + webSocketLineEditPointer->setEnabled(hasRequestOptions); xmlHttpRequestLineEditPointer->setEnabled(hasRequestOptions); // Set the domain list line edit to have the same palette as the domain line edit. @@ -334,6 +339,7 @@ void RequestDetailDialog::populateDialog(const int row) case QWebEngineUrlRequestInfo::ResourceTypeServiceWorker: case QWebEngineUrlRequestInfo::ResourceTypeCspReport: case QWebEngineUrlRequestInfo::ResourceTypePluginResource: + case QWebEngineUrlRequestInfo::ResourceTypeJson: case QWebEngineUrlRequestInfo::ResourceTypeUnknown: { resourceTypeLineEditPointer->setPalette(otherLineEditPointer->palette()); @@ -369,6 +375,13 @@ void RequestDetailDialog::populateDialog(const int row) break; } + // Web Socket. + case QWebEngineUrlRequestInfo::ResourceTypeWebSocket: + { + resourceTypeLineEditPointer->setPalette(webSocketLineEditPointer->palette()); + break; + } + // XML HTTP Request. case QWebEngineUrlRequestInfo::ResourceTypeXhr: { diff --git a/src/dialogs/RequestDetailDialog.h b/src/dialogs/RequestDetailDialog.h index 5dce10c..06e9d0c 100644 --- a/src/dialogs/RequestDetailDialog.h +++ b/src/dialogs/RequestDetailDialog.h @@ -1,20 +1,20 @@ - /* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef REQUEST_DETAIL_DIALOG_H @@ -86,6 +86,7 @@ private: QLineEdit *thirdPartyFilterLineEditPointer; QLineEdit *thirdPartyRequestLineEditPointer; QLineEdit *webPageUrlLineEditPointer; + QLineEdit *webSocketLineEditPointer; QLineEdit *xmlHttpRequestLineEditPointer; // The private functions. diff --git a/src/dialogs/RequestsDialog.cpp b/src/dialogs/RequestsDialog.cpp index bfb099e..452b898 100644 --- a/src/dialogs/RequestsDialog.cpp +++ b/src/dialogs/RequestsDialog.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. @@ -95,7 +95,7 @@ RequestsDialog::RequestsDialog(QWidget *parentWidgetPointer, QListdispositionInt; requestStructDataStream << requestStructPointer->entryStruct.originalEntry; requestStructDataStream << requestStructPointer->entryStruct.originalFilterOptions; @@ -117,6 +117,7 @@ RequestsDialog::RequestsDialog(QWidget *parentWidgetPointer, QListentryStruct.styleSheet; requestStructDataStream << requestStructPointer->entryStruct.subFrame; requestStructDataStream << requestStructPointer->entryStruct.thirdParty; + requestStructDataStream << requestStructPointer->entryStruct.webSocket; requestStructDataStream << requestStructPointer->entryStruct.xmlHttpRequest; requestStructDataStream << requestStructPointer->filterListTitle; requestStructDataStream << requestStructPointer->isThirdPartyRequest; diff --git a/src/dialogs/RequestsDialog.h b/src/dialogs/RequestsDialog.h index dfa3006..5a5bd4f 100644 --- a/src/dialogs/RequestsDialog.h +++ b/src/dialogs/RequestsDialog.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef REQUESTSDIALOG_H diff --git a/src/helpers/CMakeLists.txt b/src/helpers/CMakeLists.txt index 0b8d2d7..6433be6 100644 --- a/src/helpers/CMakeLists.txt +++ b/src/helpers/CMakeLists.txt @@ -1,19 +1,20 @@ -# Copyright 2022-2024 Soren Stoutner . +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2022-2024 Soren Stoutner # # This file is part of Privacy Browser PC . # -# Privacy Browser PC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # -# Privacy Browser PC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU General Public License -# along with Privacy Browser PC. If not, see . +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . # List the sources to include in the executable. diff --git a/src/helpers/FilterListHelper.cpp b/src/helpers/FilterListHelper.cpp index 4b1dcbd..9d8d2e2 100644 --- a/src/helpers/FilterListHelper.cpp +++ b/src/helpers/FilterListHelper.cpp @@ -52,7 +52,8 @@ FilterListHelper::FilterListHelper() NAVIGATION_TYPE_REDIRECT = i18nc("Navigation type redirect", "Redirect"); NAVIGATION_TYPE_OTHER = i18nc("Navigation type other", "Other"); - // Populate the translated resource type strings. Translated entries cannot be public static const. + // Populate the translated resource type strings (in order of their values ). + // Translated entries cannot be public static const. RESOURCE_TYPE_MAIN_FRAME = i18nc("Resource type main frame", "Main Frame"); RESOURCE_TYPE_SUB_FRAME = i18nc("Resource type sub frame", "Sub Frame"); RESOURCE_TYPE_STYLESHEET = i18nc("Resource type stylesheet", "Stylesheet"); @@ -73,6 +74,7 @@ FilterListHelper::FilterListHelper() RESOURCE_TYPE_PLUGIN_RESOURCE = i18nc("Resource type plugin request", "Plugin Request"); RESOURCE_TYPE_NAVIGATION_PRELOAD_MAIN_FRAME = i18nc("Resource type preload main frame", "Preload Main Frame"); RESOURCE_TYPE_NAVIGATION_PRELOAD_SUB_FRAME = i18nc("Resource type preload sub frame", "Preload Sub Frame"); + RESOURCE_TYPE_WEB_SOCKET = i18nc("Resource type web socket", "Web Socket"); RESOURCE_TYPE_UNKNOWN = i18nc("Resource type unknown", "Unknown"); // Populate the translated sublist strings. Translated entries cannot be public static const. @@ -706,6 +708,10 @@ bool FilterListHelper::checkRequestOptions(QWebEngineUrlRequestInfo &urlRequestI (requestStructPointer->resourceTypeInt == QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadSubFrame))) return processRequest(urlRequestInfo, requestStructPointer, filterListTitle, sublistInt, entryStructPointer); + // Process web socket requests. + if ((entryStructPointer->webSocket == FilterOptionDisposition::Apply) && (requestStructPointer->resourceTypeInt == QWebEngineUrlRequestInfo::ResourceTypeWebSocket)) + return processRequest(urlRequestInfo, requestStructPointer, filterListTitle, sublistInt, entryStructPointer); + // Process XML HTTP requests. if ((entryStructPointer->xmlHttpRequest == FilterOptionDisposition::Apply) && (requestStructPointer->resourceTypeInt == QWebEngineUrlRequestInfo::ResourceTypeXhr)) return processRequest(urlRequestInfo, requestStructPointer, filterListTitle, sublistInt, entryStructPointer); @@ -778,7 +784,7 @@ QString FilterListHelper::getRequestOptionDispositionString(const FilterOptionDi QString FilterListHelper::getResourceTypeString(int resourceTypeInt) const { - // Return the translated resource type string. + // Return the translated resource type string (in order of their values ). switch (resourceTypeInt) { case QWebEngineUrlRequestInfo::ResourceTypeMainFrame: return RESOURCE_TYPE_MAIN_FRAME; @@ -801,6 +807,7 @@ QString FilterListHelper::getResourceTypeString(int resourceTypeInt) const case QWebEngineUrlRequestInfo::ResourceTypePluginResource: return RESOURCE_TYPE_PLUGIN_RESOURCE; case QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadMainFrame: return RESOURCE_TYPE_NAVIGATION_PRELOAD_MAIN_FRAME; case QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadSubFrame: return RESOURCE_TYPE_NAVIGATION_PRELOAD_SUB_FRAME; + case QWebEngineUrlRequestInfo::ResourceTypeWebSocket: return RESOURCE_TYPE_WEB_SOCKET; default: return RESOURCE_TYPE_UNKNOWN; } } @@ -1027,8 +1034,8 @@ FilterListStruct* FilterListHelper::populateFilterList(const QString &filterList // Set the has request options flag. entryStructPointer->hasRequestOptions = true; } - else if ((filterOption == QLatin1String("other")) || (filterOption == QLatin1String("webrtc")) || (filterOption == QLatin1String("websocket"))) // Other. - { // `websocket` will get its own section in Qt6. + else if ((filterOption == QLatin1String("other")) || (filterOption == QLatin1String("webrtc"))) // Other. + { // Populate the other disposition. entryStructPointer->other = FilterOptionDisposition::Apply; @@ -1067,6 +1074,14 @@ FilterListStruct* FilterListHelper::populateFilterList(const QString &filterList // Set the has request options flag. entryStructPointer->hasRequestOptions = true; } + else if (filterOption == QLatin1String("websocket")) // Web socket. + { + // Populate the web socket disposition. + entryStructPointer->webSocket = FilterOptionDisposition::Apply; + + // Set the has request options flag. + entryStructPointer->hasRequestOptions = true; + } else if (filterOption == QLatin1String("xmlhttprequest")) // XML HTTP request. { //Populate the XML HTTP request disposition. @@ -1105,8 +1120,8 @@ FilterListStruct* FilterListHelper::populateFilterList(const QString &filterList overrideStruct.hasOverride = true; overrideStruct.object = true; } - else if ((filterOption == QLatin1String("~other")) || (filterOption == QLatin1String("~webrtc")) || (filterOption == QLatin1String("~websocket"))) // Other override. - { // `websocket` will get its own section in Qt6. + else if ((filterOption == QLatin1String("~other")) || (filterOption == QLatin1String("~webrtc"))) // Other override. + { // Populate the override struct. overrideStruct.hasOverride = true; overrideStruct.other = true; @@ -1135,6 +1150,12 @@ FilterListStruct* FilterListHelper::populateFilterList(const QString &filterList overrideStruct.hasOverride = true; overrideStruct.subFrame = true; } + else if (filterOption == QLatin1String("~websocket")) // Web socket override. + { + // Populate the override struct. + overrideStruct.hasOverride = true; + overrideStruct.webSocket = true; + } else if (filterOption == QLatin1String("~xmlhttprequest")) // XML HTTP request override. { // Populate the override struct. @@ -1209,6 +1230,12 @@ FilterListStruct* FilterListHelper::populateFilterList(const QString &filterList else entryStructPointer->subFrame = FilterOptionDisposition::Apply; + // Web Socket. + if (overrideStruct.webSocket) + entryStructPointer->webSocket = FilterOptionDisposition::Override; + else + entryStructPointer->webSocket = FilterOptionDisposition::Apply; + // XML HTTP Request. if (overrideStruct.xmlHttpRequest) entryStructPointer->xmlHttpRequest = FilterOptionDisposition::Override; diff --git a/src/helpers/FilterListHelper.h b/src/helpers/FilterListHelper.h index 93cf4c3..7241dea 100644 --- a/src/helpers/FilterListHelper.h +++ b/src/helpers/FilterListHelper.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2024 Soren Stoutner + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * @@ -83,7 +83,7 @@ private: QString NAVIGATION_TYPE_REDIRECT; QString NAVIGATION_TYPE_OTHER; - // The private translated resource type strings. + // The private translated resource type strings (in order of their values ). QString RESOURCE_TYPE_MAIN_FRAME; QString RESOURCE_TYPE_SUB_FRAME; QString RESOURCE_TYPE_STYLESHEET; @@ -104,6 +104,7 @@ private: QString RESOURCE_TYPE_PLUGIN_RESOURCE; QString RESOURCE_TYPE_NAVIGATION_PRELOAD_MAIN_FRAME; QString RESOURCE_TYPE_NAVIGATION_PRELOAD_SUB_FRAME; + QString RESOURCE_TYPE_WEB_SOCKET; QString RESOURCE_TYPE_UNKNOWN; // The private translated sublist strings. diff --git a/src/helpers/FolderHelper.cpp b/src/helpers/FolderHelper.cpp index 01e1b22..8ae17fe 100644 --- a/src/helpers/FolderHelper.cpp +++ b/src/helpers/FolderHelper.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2023-2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2023-2024 Soren Stoutner * - * This file is part of Privacy Browser PC . + * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. diff --git a/src/helpers/FolderHelper.h b/src/helpers/FolderHelper.h index 9248576..0966d9e 100644 --- a/src/helpers/FolderHelper.h +++ b/src/helpers/FolderHelper.h @@ -1,20 +1,20 @@ -/* - * Copyright 2023 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2023 Soren Stoutner * - * This file is part of Privacy Browser PC . + * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef FOLDERHELPER_H diff --git a/src/structs/BookmarkStruct.h b/src/structs/BookmarkStruct.h index cc25840..49e1c4c 100644 --- a/src/structs/BookmarkStruct.h +++ b/src/structs/BookmarkStruct.h @@ -1,20 +1,20 @@ -/* - * Copyright 2023 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2023 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef BOOKMARKSTRUCT_H diff --git a/src/structs/EntryStruct.h b/src/structs/EntryStruct.h index 6b0fed5..d730392 100644 --- a/src/structs/EntryStruct.h +++ b/src/structs/EntryStruct.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef ENTRY_STRUCT_H @@ -63,6 +63,7 @@ struct EntryStruct FilterOptionDisposition styleSheet = FilterOptionDisposition::Null; FilterOptionDisposition subFrame = FilterOptionDisposition::Null; FilterOptionDisposition thirdParty = FilterOptionDisposition::Null; + FilterOptionDisposition webSocket = FilterOptionDisposition::Null; FilterOptionDisposition xmlHttpRequest = FilterOptionDisposition::Null; }; #endif diff --git a/src/structs/FilterListStruct.h b/src/structs/FilterListStruct.h index 72a9453..c732f56 100644 --- a/src/structs/FilterListStruct.h +++ b/src/structs/FilterListStruct.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef FILTER_LIST_STRUCT_H diff --git a/src/structs/OverrideStruct.h b/src/structs/OverrideStruct.h index 0568a79..25cb96d 100644 --- a/src/structs/OverrideStruct.h +++ b/src/structs/OverrideStruct.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef OVERRIDESTRUCT_H @@ -33,6 +33,7 @@ struct OverrideStruct bool script = false; bool styleSheet = false; bool subFrame = false; + bool webSocket = false; bool xmlHttpRequest = false; }; #endif diff --git a/src/structs/RequestStruct.h b/src/structs/RequestStruct.h index 399948c..85a6eab 100644 --- a/src/structs/RequestStruct.h +++ b/src/structs/RequestStruct.h @@ -1,20 +1,20 @@ -/* - * Copyright 2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2024 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef REQUEST_STRUCT_H diff --git a/src/uis/FilterEntryDialog.ui b/src/uis/FilterEntryDialog.ui index c87da3c..e900697 100644 --- a/src/uis/FilterEntryDialog.ui +++ b/src/uis/FilterEntryDialog.ui @@ -2,7 +2,7 @@ + - XML HTTP Request + Web Socket @@ -534,6 +534,32 @@ + + + true + + + + + Qt::NoFocus + + + + + + + + + XML HTTP Request + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + true diff --git a/src/uis/RequestDetailDialog.ui b/src/uis/RequestDetailDialog.ui index 53d74f4..04712e6 100644 --- a/src/uis/RequestDetailDialog.ui +++ b/src/uis/RequestDetailDialog.ui @@ -2,7 +2,7 @@ + - XML HTTP Request + Web Socket @@ -847,6 +847,32 @@ + + + true + + + + + Qt::NoFocus + + + + + + + + + XML HTTP Request + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + true