Files
amnezia-client/client/core/defs.h
T

68 lines
1.2 KiB
C++
Raw Normal View History

2021-01-06 17:12:24 +03:00
#ifndef DEFS_H
#define DEFS_H
#include <QObject>
namespace amnezia {
enum class Protocol {
Any,
OpenVpn,
ShadowSocks,
WireGuard
};
2021-01-15 23:36:35 +03:00
enum class DockerContainer {
OpenVpn,
ShadowSocks,
WireGuard
};
2021-01-06 17:12:24 +03:00
struct ServerCredentials
{
QString hostName;
QString userName;
QString password;
int port = 22;
};
enum ErrorCode
{
// General error codes
NoError = 0,
UnknownError,
InternalError,
NotImplementedError,
// Server errorz
ServerCheckFailed,
// Ssh connection errors
SshSocketError, SshTimeoutError, SshProtocolError,
SshHostKeyError, SshKeyFileError, SshAuthenticationError,
SshClosedByServerError, SshInternalError,
// Ssh remote process errors
SshRemoteProcessCreationError,
FailedToStartRemoteProcessError, RemoteProcessCrashError,
// Local errors
FailedToSaveConfigData,
OpenVpnConfigMissing,
OpenVpnManagementServerError,
2021-01-07 20:53:42 +03:00
EasyRsaError,
2021-01-06 17:12:24 +03:00
// Distro errors
OpenVpnExecutableMissing,
2021-01-08 16:51:58 +03:00
EasyRsaExecutableMissing,
AmneziaServiceConnectionFailed,
// VPN errors
OpenVpnAdaptersInUseError,
OpenVpnUnknownError
2021-01-06 17:12:24 +03:00
};
} // namespace amnezia
#endif // DEFS_H