custom sitet pre release

This commit is contained in:
pokamest 2021-06-01 18:18:09 +03:00
parent 34b97bdc24
commit 9dbe15a0e3
156 changed files with 5404 additions and 326 deletions

View file

@ -9,7 +9,6 @@
#include <QObject>
#ifdef Q_OS_WIN
#include <WinSock2.h> //includes Windows.h
#include <WS2tcpip.h>
@ -21,13 +20,11 @@
#include <stdint.h>
typedef uint8_t u8_t ;
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#endif //Q_OS_WIN
//typedef uint8_t u8_t ;
//#ifndef WIN32_LEAN_AND_MEAN
//#define WIN32_LEAN_AND_MEAN
//#endif
/**
* @brief The Router class - General class for handling ip routing
@ -38,22 +35,29 @@ class RouterWin : public QObject
public:
static RouterWin& Instance();
bool routeAdd(const QString &ip, const QString &gw);
int routeAddList(const QString &gw, const QStringList &ips);
bool clearSavedRoutes();
bool routeDelete(const QString &ip, const QString &gw);
int routeDeleteList(const QString &gw, const QStringList &ips);
void flushDns();
public slots:
void suspendWcmSvc(bool suspend);
private:
RouterWin() {}
RouterWin(RouterWin const &) = delete;
RouterWin& operator= (RouterWin const&) = delete;
#ifdef Q_OS_WIN
QList<MIB_IPFORWARDROW> ipForwardRows;
#endif
DWORD GetServicePid(LPCWSTR serviceName);
BOOL ListProcessThreads(DWORD dwOwnerPID);
BOOL EnableDebugPrivilege();
BOOL InitNtFunctions();
BOOL SuspendProcess(BOOL fSuspend, DWORD dwProcessId);
private:
QMap<QString, MIB_IPFORWARDROW> m_ipForwardRows;
bool m_suspended = false;
};
#endif // ROUTERWIN_H