Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/import-config-from-cloud
This commit is contained in:
commit
16724645ce
110 changed files with 4267 additions and 1875 deletions
|
|
@ -2,8 +2,8 @@
|
|||
#define PROTOCOLS_DEFS_H
|
||||
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
#include <QMetaEnum>
|
||||
#include <QObject>
|
||||
|
||||
namespace amnezia
|
||||
{
|
||||
|
|
@ -61,11 +61,22 @@ namespace amnezia
|
|||
|
||||
constexpr char isThirdPartyConfig[] = "isThirdPartyConfig";
|
||||
|
||||
constexpr char junkPacketCount[] = "Jc";
|
||||
constexpr char junkPacketMinSize[] = "Jmin";
|
||||
constexpr char junkPacketMaxSize[] = "Jmax";
|
||||
constexpr char initPacketJunkSize[] = "S1";
|
||||
constexpr char responsePacketJunkSize[] = "S2";
|
||||
constexpr char initPacketMagicHeader[] = "H1";
|
||||
constexpr char responsePacketMagicHeader[] = "H2";
|
||||
constexpr char underloadPacketMagicHeader[] = "H3";
|
||||
constexpr char transportPacketMagicHeader[] = "H4";
|
||||
|
||||
constexpr char openvpn[] = "openvpn";
|
||||
constexpr char wireguard[] = "wireguard";
|
||||
constexpr char shadowsocks[] = "shadowsocks";
|
||||
constexpr char cloak[] = "cloak";
|
||||
constexpr char sftp[] = "sftp";
|
||||
constexpr char awg[] = "awg";
|
||||
|
||||
constexpr char configVersion[] = "config_version";
|
||||
constexpr char apiEdnpoint[] = "api_endpoint";
|
||||
|
|
@ -146,6 +157,25 @@ namespace amnezia
|
|||
|
||||
} // namespace sftp
|
||||
|
||||
namespace awg
|
||||
{
|
||||
constexpr char defaultPort[] = "55424";
|
||||
|
||||
constexpr char serverConfigPath[] = "/opt/amnezia/awg/wg0.conf";
|
||||
constexpr char serverPublicKeyPath[] = "/opt/amnezia/awg/wireguard_server_public_key.key";
|
||||
constexpr char serverPskKeyPath[] = "/opt/amnezia/awg/wireguard_psk.key";
|
||||
|
||||
constexpr char defaultJunkPacketCount[] = "3";
|
||||
constexpr char defaultJunkPacketMinSize[] = "10";
|
||||
constexpr char defaultJunkPacketMaxSize[] = "30";
|
||||
constexpr char defaultInitPacketJunkSize[] = "15";
|
||||
constexpr char defaultResponsePacketJunkSize[] = "18";
|
||||
constexpr char defaultInitPacketMagicHeader[] = "1020325451";
|
||||
constexpr char defaultResponsePacketMagicHeader[] = "3288052141";
|
||||
constexpr char defaultTransportPacketMagicHeader[] = "2528465083";
|
||||
constexpr char defaultUnderloadPacketMagicHeader[] = "1766607858";
|
||||
}
|
||||
|
||||
} // namespace protocols
|
||||
|
||||
namespace ProtocolEnumNS
|
||||
|
|
@ -164,13 +194,13 @@ namespace amnezia
|
|||
ShadowSocks,
|
||||
Cloak,
|
||||
WireGuard,
|
||||
Awg,
|
||||
Ikev2,
|
||||
L2tp,
|
||||
|
||||
// non-vpn
|
||||
TorWebSite,
|
||||
Dns,
|
||||
FileShare,
|
||||
Sftp
|
||||
};
|
||||
Q_ENUM_NS(Proto)
|
||||
|
|
@ -204,6 +234,8 @@ namespace amnezia
|
|||
|
||||
Q_INVOKABLE static ServiceType protocolService(Proto p);
|
||||
|
||||
Q_INVOKABLE static int getPortForInstall(Proto p);
|
||||
|
||||
Q_INVOKABLE static int defaultPort(Proto p);
|
||||
Q_INVOKABLE static bool defaultPortChangeable(Proto p);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue