ShadowSocks fixes for MacOS
This commit is contained in:
parent
a1cb4ac544
commit
8fd81be477
20 changed files with 583 additions and 482 deletions
38
service/server/router_mac.h
Normal file
38
service/server/router_mac.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef ROUTERMAC_H
|
||||
#define ROUTERMAC_H
|
||||
|
||||
#include <QTimer>
|
||||
#include <QString>
|
||||
#include <QSettings>
|
||||
#include <QHash>
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The Router class - General class for handling ip routing
|
||||
*/
|
||||
class RouterMac : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static RouterMac& Instance();
|
||||
|
||||
bool routeAdd(const QString &ip, const QString &gw, QString mask = QString());
|
||||
int routeAddList(const QString &gw, const QStringList &ips);
|
||||
bool clearSavedRoutes();
|
||||
bool routeDelete(const QString &ip);
|
||||
void flushDns();
|
||||
|
||||
public slots:
|
||||
|
||||
private:
|
||||
RouterMac() {}
|
||||
RouterMac(RouterMac const &) = delete;
|
||||
RouterMac& operator= (RouterMac const&) = delete;
|
||||
|
||||
QList<QString> m_addedRoutes;
|
||||
};
|
||||
|
||||
#endif // ROUTERMAC_H
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue