Killswitch and Splittunnel for MacOS IPSec
This commit is contained in:
parent
f0e66e4ecf
commit
a144d495ee
4 changed files with 184 additions and 173 deletions
|
|
@ -20,7 +20,6 @@ public:
|
|||
bool connect_to_vpn(const QString & vpn_name);
|
||||
bool disconnect_vpn();
|
||||
void closeWindscribeActiveConnection();
|
||||
|
||||
ErrorCode start() override;
|
||||
void stop() override;
|
||||
|
||||
|
|
@ -30,31 +29,15 @@ private slots:
|
|||
void handleNotificationImpl(int status);
|
||||
|
||||
private:
|
||||
enum {STATE_DISCONNECTED, STATE_START_CONNECT, STATE_START_DISCONNECTING, STATE_CONNECTED, STATE_DISCONNECTING_AUTH_ERROR, STATE_DISCONNECTING_ANY_ERROR};
|
||||
|
||||
int state_;
|
||||
|
||||
bool bConnected_;
|
||||
mutable QRecursiveMutex mutex_;
|
||||
void *notificationId_;
|
||||
bool isStateConnectingAfterClick_;
|
||||
bool isDisconnectClicked_;
|
||||
|
||||
QString overrideDnsIp_;
|
||||
|
||||
QJsonObject m_config;
|
||||
QJsonObject m_ikev2_config;
|
||||
|
||||
static constexpr int STATISTICS_UPDATE_PERIOD = 1000;
|
||||
QTimer statisticsTimer_;
|
||||
QString ipsecAdapterName_;
|
||||
|
||||
int prevConnectionStatus_;
|
||||
bool isPrevConnectionStatusInitialized_;
|
||||
|
||||
// True if startConnect() method was called and NEVPNManager emitted notification NEVPNStatusConnecting.
|
||||
// False otherwise.
|
||||
|
||||
bool isConnectingStateReachedAfterStartingConnection_;
|
||||
|
||||
|
||||
void handleNotification(void *notification);
|
||||
bool isFailedAuthError(QMap<time_t, QString> &logs);
|
||||
bool isSocketError(QMap<time_t, QString> &logs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue