Review fixes
This commit is contained in:
parent
5bf5cd43bd
commit
6be32445ba
3 changed files with 4 additions and 9 deletions
|
|
@ -181,7 +181,7 @@ void IpcServer::setLogsEnabled(bool enabled)
|
|||
|
||||
bool IpcServer::allowTrafficTo(QStringList ranges)
|
||||
{
|
||||
return KillSwitch::instance()->allowTrafficTo(ranges);
|
||||
return KillSwitch::instance()->resetAllowedRange(ranges);
|
||||
}
|
||||
|
||||
bool IpcServer::addKillSwitchExceptions(QStringList ranges)
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ bool KillSwitch::disableAllTraffic() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool KillSwitch::allowTrafficTo(const QStringList &ranges) {
|
||||
bool KillSwitch::resetAllowedRange(const QStringList &ranges) {
|
||||
|
||||
m_allowedRanges = ranges;
|
||||
|
||||
|
|
@ -186,12 +186,7 @@ bool KillSwitch::addAllowedRange(const QStringList &ranges) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
WindowsFirewall::create(this)->allowTrafficRange(ranges);
|
||||
return true;
|
||||
#else
|
||||
return allowTrafficTo(m_allowedRanges);
|
||||
#endif
|
||||
return resetAllowedRange(m_allowedRanges);
|
||||
}
|
||||
|
||||
bool KillSwitch::enablePeerTraffic(const QJsonObject &configStr) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public:
|
|||
bool disableAllTraffic();
|
||||
bool enablePeerTraffic(const QJsonObject &configStr);
|
||||
bool enableKillSwitch(const QJsonObject &configStr, int vpnAdapterIndex);
|
||||
bool allowTrafficTo(const QStringList &ranges);
|
||||
bool resetAllowedRange(const QStringList &ranges);
|
||||
bool addAllowedRange(const QStringList &ranges);
|
||||
bool isStrictKillSwitchEnabled();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue