From 427b43c99b188e40a6cbf4caf6447f3b412c686a Mon Sep 17 00:00:00 2001 From: Mykola Baibuz Date: Sat, 27 Jan 2024 07:50:50 -0500 Subject: [PATCH] Add code license --- .../platforms/linux/daemon/linuxfirewall.cpp | 14 ++++++++++++++ client/platforms/linux/daemon/linuxfirewall.h | 16 ++++++++++++++-- .../platforms/macos/daemon/macosfirewall.cpp | 14 ++++++++++++++ client/platforms/macos/daemon/macosfirewall.h | 19 ++++++++++++++----- 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/client/platforms/linux/daemon/linuxfirewall.cpp b/client/platforms/linux/daemon/linuxfirewall.cpp index 0d32b56d..0c6edbaf 100644 --- a/client/platforms/linux/daemon/linuxfirewall.cpp +++ b/client/platforms/linux/daemon/linuxfirewall.cpp @@ -1,3 +1,17 @@ +// Copyright (c) 2024 AmneziaVPN +// This file has been modified for AmneziaVPN +// +// This file is based on the work of the Private Internet Access Desktop Client. +// The original code of the Private Internet Access Desktop Client is copyrighted (c) 2023 Private Internet Access, Inc. and licensed under GPL3. +// +// The modified version of this file 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 this file. If not, see . + #include "linuxfirewall.h" #include "logger.h" #include diff --git a/client/platforms/linux/daemon/linuxfirewall.h b/client/platforms/linux/daemon/linuxfirewall.h index 9e9412a4..ef2521a4 100644 --- a/client/platforms/linux/daemon/linuxfirewall.h +++ b/client/platforms/linux/daemon/linuxfirewall.h @@ -1,3 +1,17 @@ +// Copyright (c) 2024 AmneziaVPN +// This file has been modified for AmneziaVPN +// +// This file is based on the work of the Private Internet Access Desktop Client. +// The original code of the Private Internet Access Desktop Client is copyrighted (c) 2023 Private Internet Access, Inc. and licensed under GPL3. +// +// The modified version of this file 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 this file. If not, see . + #ifndef LINUXFIREWALL_H #define LINUXFIREWALL_H @@ -10,7 +24,6 @@ struct FirewallParams { QStringList dnsServers; - // QSharedPointer adapter; QVector excludeApps; // Apps to exclude if VPN exemptions are enabled QStringList allowAddrs; QStringList blockAddrs; @@ -73,5 +86,4 @@ public: static void updateBlockNets(const QStringList& servers); }; - #endif // LINUXFIREWALL_H diff --git a/client/platforms/macos/daemon/macosfirewall.cpp b/client/platforms/macos/daemon/macosfirewall.cpp index 358bd594..67dda9cf 100644 --- a/client/platforms/macos/daemon/macosfirewall.cpp +++ b/client/platforms/macos/daemon/macosfirewall.cpp @@ -1,3 +1,17 @@ +// Copyright (c) 2024 AmneziaVPN +// This file has been modified for AmneziaVPN +// +// This file is based on the work of the Private Internet Access Desktop Client. +// The original code of the Private Internet Access Desktop Client is copyrighted (c) 2023 Private Internet Access, Inc. and licensed under GPL3. +// +// The modified version of this file 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 this file. If not, see . + #include "macosfirewall.h" #include "logger.h" #include diff --git a/client/platforms/macos/daemon/macosfirewall.h b/client/platforms/macos/daemon/macosfirewall.h index 8b13d363..0c56dcaa 100644 --- a/client/platforms/macos/daemon/macosfirewall.h +++ b/client/platforms/macos/daemon/macosfirewall.h @@ -1,3 +1,17 @@ +// Copyright (c) 2024 AmneziaVPN +// This file has been modified for AmneziaVPN +// +// This file is based on the work of the Private Internet Access Desktop Client. +// The original code of the Private Internet Access Desktop Client is copyrighted (c) 2023 Private Internet Access, Inc. and licensed under GPL3. +// +// The modified version of this file 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 this file. If not, see . + #ifndef MACOSFIREWALL_H #define MACOSFIREWALL_H @@ -9,7 +23,6 @@ struct FirewallParams { QStringList dnsServers; - // QSharedPointer adapter; QVector excludeApps; // Apps to exclude if VPN exemptions are enabled QStringList allowAddrs; @@ -34,9 +47,6 @@ struct FirewallParams bool allowVpnExemptions; // Exempt specified traffic from the tunnel (route it over the physical uplink instead) }; -// TODO: Break out firewall handling to a base class that can be used directly -// by the base daemon class, for some common functionality. - class MacOSFirewall { @@ -59,5 +69,4 @@ public: static void installRootAnchors(); }; - #endif // MACOSFIREWALL_H