mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
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:
@@ -139,7 +139,7 @@ bool WireguardUtilsLinux::addInterface(const InterfaceConfig& config) {
|
|||||||
if (config.m_killSwitchEnabled) {
|
if (config.m_killSwitchEnabled) {
|
||||||
FirewallParams params { };
|
FirewallParams params { };
|
||||||
params.dnsServers.append(config.m_dnsServer);
|
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;
|
params.blockAll = true;
|
||||||
if (config.m_excludedAddresses.size()) {
|
if (config.m_excludedAddresses.size()) {
|
||||||
params.allowNets = true;
|
params.allowNets = true;
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ bool WireguardUtilsMacos::addInterface(const InterfaceConfig& config) {
|
|||||||
if (config.m_killSwitchEnabled) {
|
if (config.m_killSwitchEnabled) {
|
||||||
FirewallParams params { };
|
FirewallParams params { };
|
||||||
params.dnsServers.append(config.m_dnsServer);
|
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;
|
params.blockAll = true;
|
||||||
if (config.m_excludedAddresses.size()) {
|
if (config.m_excludedAddresses.size()) {
|
||||||
params.allowNets = true;
|
params.allowNets = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user