mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
* Crash fix in management server * Openvpn scripts fixes some refactoring * deploy fix * Scripts fix for macos * OpenVpn runtime error codes handling * MacOS deploy script fix * easyrsa scripts for MacOS * Refactoring Ui improvements Bug fixes * new server page fix
62 lines
1.1 KiB
C++
62 lines
1.1 KiB
C++
#ifndef DEFS_H
|
|
#define DEFS_H
|
|
|
|
#include <QObject>
|
|
|
|
namespace amnezia {
|
|
|
|
enum class Protocol {
|
|
Any,
|
|
OpenVpn,
|
|
ShadowSocks,
|
|
WireGuard
|
|
};
|
|
|
|
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,
|
|
EasyRsaError,
|
|
|
|
// Distro errors
|
|
OpenVpnExecutableMissing,
|
|
EasyRsaExecutableMissing,
|
|
AmneziaServiceConnectionFailed,
|
|
|
|
// VPN errors
|
|
OpenVpnAdaptersInUseError,
|
|
OpenVpnUnknownError
|
|
};
|
|
|
|
} // namespace amnezia
|
|
|
|
#endif // DEFS_H
|