mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into Linux_deploy_script
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "amnezia_application.h"
|
||||
|
||||
#include <QFontDatabase>
|
||||
#include <QStandardPaths>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
|
||||
@@ -49,6 +50,24 @@
|
||||
#endif
|
||||
{
|
||||
setQuitOnLastWindowClosed(false);
|
||||
|
||||
// Fix config file permissions
|
||||
#ifdef Q_OS_LINUX
|
||||
{
|
||||
QSettings s(ORGANIZATION_NAME, APPLICATION_NAME);
|
||||
s.setValue("permFixed", true);
|
||||
}
|
||||
|
||||
QString configLoc1 = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).first() + "/"
|
||||
+ ORGANIZATION_NAME + "/" + APPLICATION_NAME + ".conf";
|
||||
QFile::setPermissions(configLoc1, QFileDevice::ReadOwner | QFileDevice::WriteOwner);
|
||||
|
||||
QString configLoc2 = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).first() + "/"
|
||||
+ ORGANIZATION_NAME + "/" + APPLICATION_NAME + "/" + APPLICATION_NAME + ".conf";
|
||||
QFile::setPermissions(configLoc2, QFileDevice::ReadOwner | QFileDevice::WriteOwner);
|
||||
|
||||
#endif
|
||||
|
||||
m_settings = std::shared_ptr<Settings>(new Settings);
|
||||
m_serverController = std::shared_ptr<ServerController>(new ServerController(m_settings, this));
|
||||
m_configurator = std::shared_ptr<VpnConfigurator>(new VpnConfigurator(m_settings, m_serverController, this));
|
||||
|
||||
@@ -162,7 +162,10 @@ QByteArray SecureQSettings::decryptText(const QByteArray& ba) const
|
||||
|
||||
bool SecureQSettings::encryptionRequired() const
|
||||
{
|
||||
// TODO: review on linux
|
||||
#ifdef Q_OS_LINUX
|
||||
// QtKeyChain failing on Linux
|
||||
return false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
ExecStart=/opt/AmneziaVPN/service/AmneziaVPN-service.sh
|
||||
Environment=LD_LIBRARY_PATH=/opt/AmneziaVPN/client/lib
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user