Skip to content

Commit

Permalink
Linux firewall reset fix (#114)
Browse files Browse the repository at this point in the history
* Update server list url

* Fix Linux firewall reset

* Remove unneeded import

---------

Co-authored-by: Chopper1337 <josephmg@tutanota.com>
  • Loading branch information
Chopper1337 and Chopper1337 committed Jun 12, 2023
1 parent b246623 commit 422b6b2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 12 additions & 0 deletions app/main-process/firewall.js
Expand Up @@ -45,11 +45,23 @@ Firewall.prototype.reset = function () {

this._clusters.clustersId.forEach(id => {

if (this._clusters.pops[id].relayAddresses === undefined) {
return;
}

this._clusters.pops[id].relayAddresses.forEach(relayAddresse => {

if (relayAddresse === undefined) {
return;
}
this._clusters.pops[id].relayAddresses.splice(this._clusters.pops[id].relayAddresses.indexOf(relayAddresse), 1, relayAddresse.split(':')[0]);
});

this._clusters.pops[id].relayAddresses.forEach(addresse => {
if (addresse === undefined || addresse.includes('undefined')) {
return;
}

command += `iptables -D INPUT -s ${addresse} -j DROP\n`;
});
});
Expand Down
12 changes: 1 addition & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 422b6b2

Please sign in to comment.