fixed wg/awg macos firewall rules for 0.0.0.0/0 (#883)

* fixed wg/awg macos/linux firewall rules for 0.0.0.0/0
This commit is contained in:
Nethius
2024-07-07 20:56:38 +07:00
committed by GitHub
parent 5945133d30
commit 401ad0db0e
2 changed files with 3 additions and 2 deletions

View File

@@ -139,7 +139,7 @@ bool WireguardUtilsLinux::addInterface(const InterfaceConfig& config) {
if (config.m_killSwitchEnabled) {
FirewallParams params { };
params.dnsServers.append(config.m_dnsServer);
if (config.m_allowedIPAddressRanges.at(0).toString() == "0.0.0.0/0"){
if (config.m_allowedIPAddressRanges.contains(IPAddress("0.0.0.0/0"))) {
params.blockAll = true;
if (config.m_excludedAddresses.size()) {
params.allowNets = true;