
- remote for OpenVPN is set to real ip address - remote ip will be added as alias in docker container - ss-local graceful shutdown - crash fixes
32 lines
803 B
C++
32 lines
803 B
C++
#ifndef SHADOWSOCKSVPNPROTOCOL_H
|
|
#define SHADOWSOCKSVPNPROTOCOL_H
|
|
|
|
#include "openvpnprotocol.h"
|
|
#include "QProcess"
|
|
|
|
class ShadowSocksVpnProtocol : public OpenVpnProtocol
|
|
{
|
|
public:
|
|
ShadowSocksVpnProtocol(const QJsonObject& configuration, QObject* parent = nullptr);
|
|
virtual ~ShadowSocksVpnProtocol() override;
|
|
|
|
ErrorCode start() override;
|
|
void stop() override;
|
|
|
|
static QJsonObject genShadowSocksConfig(const ServerCredentials &credentials, Protocol proto = Protocol::ShadowSocks);
|
|
|
|
protected:
|
|
void readShadowSocksConfiguration(const QJsonObject &configuration);
|
|
|
|
protected:
|
|
QJsonObject m_shadowSocksConfig;
|
|
|
|
private:
|
|
static QString shadowSocksExecPath();
|
|
|
|
private:
|
|
QProcess m_ssProcess;
|
|
QTemporaryFile m_shadowSocksCfgFile;
|
|
};
|
|
|
|
#endif // SHADOWSOCKSVPNPROTOCOL_H
|