renamed amenziawireguard to awg
This commit is contained in:
parent
16fc0617e4
commit
aa4a79934a
29 changed files with 105 additions and 108 deletions
|
|
@ -1,10 +1,10 @@
|
|||
#include "amneziawireguardprotocol.h"
|
||||
|
||||
AmneziaWireGuardProtocol::AmneziaWireGuardProtocol(const QJsonObject &configuration, QObject *parent)
|
||||
Awg::Awg(const QJsonObject &configuration, QObject *parent)
|
||||
: WireguardProtocol(configuration, parent)
|
||||
{
|
||||
}
|
||||
|
||||
AmneziaWireGuardProtocol::~AmneziaWireGuardProtocol()
|
||||
Awg::~Awg()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
#ifndef AMNEZIAWIREGUARDPROTOCOL_H
|
||||
#define AMNEZIAWIREGUARDPROTOCOL_H
|
||||
#ifndef AWGPROTOCOL_H
|
||||
#define AWGPROTOCOL_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "wireguardprotocol.h"
|
||||
|
||||
class AmneziaWireGuardProtocol : public WireguardProtocol
|
||||
class Awg : public WireguardProtocol
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AmneziaWireGuardProtocol(const QJsonObject &configuration, QObject *parent = nullptr);
|
||||
virtual ~AmneziaWireGuardProtocol() override;
|
||||
explicit Awg(const QJsonObject &configuration, QObject *parent = nullptr);
|
||||
virtual ~Awg() override;
|
||||
};
|
||||
|
||||
#endif // AMNEZIAWIREGUARDPROTOCOL_H
|
||||
#endif // AWGPROTOCOL_H
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ amnezia::ServiceType ProtocolProps::protocolService(Proto p)
|
|||
case Proto::Cloak: return ServiceType::Vpn;
|
||||
case Proto::ShadowSocks: return ServiceType::Vpn;
|
||||
case Proto::WireGuard: return ServiceType::Vpn;
|
||||
case Proto::AmneziaWireGuard: return ServiceType::Vpn;
|
||||
case Proto::Awg: return ServiceType::Vpn;
|
||||
case Proto::TorWebSite: return ServiceType::Other;
|
||||
case Proto::Dns: return ServiceType::Other;
|
||||
case Proto::FileShare: return ServiceType::Other;
|
||||
|
|
@ -105,7 +105,7 @@ int ProtocolProps::defaultPort(Proto p)
|
|||
case Proto::Cloak: return 443;
|
||||
case Proto::ShadowSocks: return 6789;
|
||||
case Proto::WireGuard: return 51820;
|
||||
case Proto::AmneziaWireGuard: return 55424;
|
||||
case Proto::Awg: return 55424;
|
||||
case Proto::Ikev2: return -1;
|
||||
case Proto::L2tp: return -1;
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ bool ProtocolProps::defaultPortChangeable(Proto p)
|
|||
case Proto::Cloak: return true;
|
||||
case Proto::ShadowSocks: return true;
|
||||
case Proto::WireGuard: return true;
|
||||
case Proto::AmneziaWireGuard: return true;
|
||||
case Proto::Awg: return true;
|
||||
case Proto::Ikev2: return false;
|
||||
case Proto::L2tp: return false;
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ TransportProto ProtocolProps::defaultTransportProto(Proto p)
|
|||
case Proto::Cloak: return TransportProto::Tcp;
|
||||
case Proto::ShadowSocks: return TransportProto::Tcp;
|
||||
case Proto::WireGuard: return TransportProto::Udp;
|
||||
case Proto::AmneziaWireGuard: return TransportProto::Udp;
|
||||
case Proto::Awg: return TransportProto::Udp;
|
||||
case Proto::Ikev2: return TransportProto::Udp;
|
||||
case Proto::L2tp: return TransportProto::Udp;
|
||||
// non-vpn
|
||||
|
|
@ -163,7 +163,7 @@ bool ProtocolProps::defaultTransportProtoChangeable(Proto p)
|
|||
case Proto::Cloak: return false;
|
||||
case Proto::ShadowSocks: return false;
|
||||
case Proto::WireGuard: return false;
|
||||
case Proto::AmneziaWireGuard: return false;
|
||||
case Proto::Awg: return false;
|
||||
case Proto::Ikev2: return false;
|
||||
case Proto::L2tp: return false;
|
||||
// non-vpn
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ namespace amnezia
|
|||
constexpr char shadowsocks[] = "shadowsocks";
|
||||
constexpr char cloak[] = "cloak";
|
||||
constexpr char sftp[] = "sftp";
|
||||
constexpr char amneziaWireguard[] = "amneziawireguard";
|
||||
constexpr char awg[] = "awg";
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -151,13 +151,13 @@ namespace amnezia
|
|||
|
||||
} // namespace sftp
|
||||
|
||||
namespace amneziawireguard
|
||||
namespace awg
|
||||
{
|
||||
constexpr char defaultPort[] = "55424";
|
||||
|
||||
constexpr char serverConfigPath[] = "/opt/amnezia/amneziawireguard/wg0.conf";
|
||||
constexpr char serverPublicKeyPath[] = "/opt/amnezia/amneziawireguard/wireguard_server_public_key.key";
|
||||
constexpr char serverPskKeyPath[] = "/opt/amnezia/amneziawireguard/wireguard_psk.key";
|
||||
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";
|
||||
|
|
@ -188,7 +188,7 @@ namespace amnezia
|
|||
ShadowSocks,
|
||||
Cloak,
|
||||
WireGuard,
|
||||
AmneziaWireGuard,
|
||||
Awg,
|
||||
Ikev2,
|
||||
L2tp,
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ VpnProtocol *VpnProtocol::factory(DockerContainer container, const QJsonObject &
|
|||
case DockerContainer::Cloak: return new OpenVpnOverCloakProtocol(configuration);
|
||||
case DockerContainer::ShadowSocks: return new ShadowSocksVpnProtocol(configuration);
|
||||
case DockerContainer::WireGuard: return new WireguardProtocol(configuration);
|
||||
case DockerContainer::AmneziaWireGuard: return new WireguardProtocol(configuration);
|
||||
case DockerContainer::Awg: return new WireguardProtocol(configuration);
|
||||
#endif
|
||||
default: return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue