Handle proxy and nativeMessaging permission disabling + enabling

This commit is contained in:
Lesley Norton
2021-11-29 16:16:46 -06:00
parent ed63f18cf1
commit 1b165aebb5
5 changed files with 30 additions and 11 deletions
+13
View File
@@ -251,6 +251,19 @@ const MozillaVPN = {
randomInteger = (randomInteger - server.weight);
}
return nextServer;
},
async removeMozillaVpnProxies() {
const proxies = await proxifiedContainers.retrieveAll();
if (!proxies) {
return;
}
for (const proxyObj of proxies) {
const { proxy } = proxyObj;
if (proxy.countryCode !== undefined) {
await proxifiedContainers.delete(proxyObj.cookieStoreId);
}
}
}
};