Add method to killswitch for expanding strickt mode exceptions list and fix allowTrafficTo() for Windows. Also Added cache in KillSwitch class for exceptions
This commit is contained in:
parent
b88cb4303a
commit
e46b51a833
6 changed files with 34 additions and 6 deletions
|
|
@ -32,6 +32,7 @@ class IpcInterface
|
|||
SLOT( bool disableAllTraffic() );
|
||||
SLOT( bool refreshKillSwitch( bool enabled ) );
|
||||
SLOT( bool allowTrafficTo( const QStringList ranges ) );
|
||||
SLOT( bool addKillSwitchExceptions( const QStringList ranges ) );
|
||||
SLOT( bool enablePeerTraffic( const QJsonObject &configStr) );
|
||||
SLOT( bool enableKillSwitch( const QJsonObject &excludeAddr, int vpnAdapterIndex) );
|
||||
SLOT( bool updateResolvers(const QString& ifname, const QList<QHostAddress>& resolvers) );
|
||||
|
|
|
|||
|
|
@ -184,6 +184,11 @@ bool IpcServer::allowTrafficTo(QStringList ranges)
|
|||
return KillSwitch::instance()->allowTrafficTo(ranges);
|
||||
}
|
||||
|
||||
bool IpcServer::addKillSwitchExceptions(QStringList ranges)
|
||||
{
|
||||
return KillSwitch::instance()->addAllowedRange(ranges);
|
||||
}
|
||||
|
||||
bool IpcServer::disableAllTraffic()
|
||||
{
|
||||
return KillSwitch::instance()->disableAllTraffic();
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public:
|
|||
virtual bool disableKillSwitch() override;
|
||||
virtual bool refreshKillSwitch( bool enabled ) override;
|
||||
virtual bool updateResolvers(const QString& ifname, const QList<QHostAddress>& resolvers) override;
|
||||
virtual bool addKillSwitchExceptions(QStringList ranges) override;
|
||||
|
||||
private:
|
||||
int m_localpid = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue