IpcServerProcess permit list
This commit is contained in:
parent
9236be7fbd
commit
3bff653bbb
12 changed files with 84 additions and 46 deletions
22
ipc/ipc.h
22
ipc/ipc.h
|
|
@ -4,10 +4,32 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "../client/utils.h"
|
||||
|
||||
#define IPC_SERVICE_URL "local:AmneziaVpnIpcInterface"
|
||||
|
||||
namespace amnezia {
|
||||
|
||||
enum PermittedProcess {
|
||||
OpenVPN,
|
||||
Wireguard,
|
||||
CertUtil
|
||||
};
|
||||
|
||||
inline QString permittedProcessPath(PermittedProcess pid)
|
||||
{
|
||||
if (pid == PermittedProcess::OpenVPN) {
|
||||
return Utils::openVpnExecPath();
|
||||
}
|
||||
if (pid == PermittedProcess::Wireguard) {
|
||||
return Utils::wireguardExecPath();
|
||||
}
|
||||
else if (pid == PermittedProcess::CertUtil) {
|
||||
return Utils::certUtilPath();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline QString getIpcServiceUrl() {
|
||||
#ifdef Q_OS_WIN
|
||||
return IPC_SERVICE_URL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue