Merge branch 'dev' into ios-wireguard

This commit is contained in:
pokamest 2021-12-04 05:24:11 -08:00
commit 40791a9cd4
2 changed files with 31 additions and 0 deletions

View file

@ -136,3 +136,32 @@ Proto ContainerProps::defaultProtocol(DockerContainer c)
}
}
bool ContainerProps::isWorkingOnPlatform(DockerContainer c)
{
#ifdef Q_OS_WINDOWS
return true;
#elif defined (Q_OS_IOS)
switch (c) {
case DockerContainer::WireGuard: return true;
case DockerContainer::OpenVpn: return true;
default: return false;
}
#elif defined (Q_OS_MAC)
return false;
#elif defined (Q_OS_ANDROID)
switch (c) {
case DockerContainer::WireGuard: return true;
case DockerContainer::OpenVpn: return true;
default: return false;
}
#elif defined (Q_OS_LINUX)
return false;
#else
return false;
#endif
}