cloak for macos fixed
This commit is contained in:
parent
835f767c3f
commit
df2a6dc278
5 changed files with 24 additions and 6 deletions
|
@ -67,7 +67,7 @@ constexpr char clientCertPath[] = "/opt/amnezia/openvpn/pki/issued";
|
|||
constexpr char taKeyPath[] = "/opt/amnezia/openvpn/ta.key";
|
||||
constexpr char clientsDirPath[] = "/opt/amnezia/openvpn/clients";
|
||||
constexpr char defaultPort[] = "1194";
|
||||
constexpr char defaultTransportProto[] = amnezia::protocols::UDP;
|
||||
constexpr char defaultTransportProto[] = "udp";
|
||||
constexpr char defaultCipher[] = "AES-256-GCM";
|
||||
constexpr char defaultHash[] = "SHA512";
|
||||
constexpr bool defaultBlockOutsideDns = true;
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
#include <QDebug>
|
||||
#include "protocols/protocols_defs.h"
|
||||
|
||||
const char Settings::cloudFlareNs1[] = "1.1.1.1";
|
||||
const char Settings::cloudFlareNs2[] = "1.0.0.1";
|
||||
|
||||
Settings::Settings(QObject* parent) :
|
||||
QObject(parent),
|
||||
m_settings (ORGANIZATION_NAME, APPLICATION_NAME, this)
|
||||
|
@ -24,6 +27,11 @@ Settings::Settings(QObject* parent) :
|
|||
server.insert(config_key::description, tr("Server #1"));
|
||||
|
||||
addServer(server);
|
||||
|
||||
m_settings.remove("Server/userName");
|
||||
m_settings.remove("Server/password");
|
||||
m_settings.remove("Server/serverName");
|
||||
m_settings.remove("Server/serverPort");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,6 +205,10 @@ QString Settings::nextAvailableServerName() const
|
|||
return tr("Server") + " " + QString::number(i);
|
||||
}
|
||||
|
||||
QString Settings::primaryDns() const { return m_settings.value("Conf/primaryDns", cloudFlareNs1).toString(); }
|
||||
|
||||
QString Settings::secondaryDns() const { return m_settings.value("Conf/secondaryDns", cloudFlareNs2).toString(); }
|
||||
|
||||
//void Settings::setServerCredentials(const ServerCredentials &credentials)
|
||||
//{
|
||||
// setServerName(credentials.hostName);
|
||||
|
|
|
@ -88,8 +88,8 @@ public:
|
|||
QStringList customIps() { return m_settings.value("Conf/customIps").toStringList(); }
|
||||
void setCustomIps(const QStringList &customIps) { m_settings.setValue("Conf/customIps", customIps); }
|
||||
|
||||
QString primaryDns() const { return m_settings.value("Conf/primaryDns", cloudFlareNs1).toString(); }
|
||||
QString secondaryDns() const { return m_settings.value("Conf/secondaryDns", cloudFlareNs2).toString(); }
|
||||
QString primaryDns() const;
|
||||
QString secondaryDns() const;
|
||||
|
||||
//QString primaryDns() const { return m_primaryDns; }
|
||||
void setPrimaryDns(const QString &primaryDns) { m_settings.setValue("Conf/primaryDns", primaryDns); }
|
||||
|
@ -97,8 +97,8 @@ public:
|
|||
//QString secondaryDns() const { return m_secondaryDns; }
|
||||
void setSecondaryDns(const QString &secondaryDns) { m_settings.setValue("Conf/secondaryDns", secondaryDns); }
|
||||
|
||||
static constexpr char cloudFlareNs1[] = "1.1.1.1";
|
||||
static constexpr char cloudFlareNs2[] = "1.0.0.1";
|
||||
static const char cloudFlareNs1[];
|
||||
static const char cloudFlareNs2[];
|
||||
|
||||
static constexpr char openNicNs5[] = "94.103.153.176";
|
||||
static constexpr char openNicNs13[] = "144.76.103.143";
|
||||
|
|
|
@ -88,7 +88,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
// Post initialization
|
||||
goToPage(Page::Start, true, false);
|
||||
|
||||
if (m_settings.defaultServerIndex() >= 0) {
|
||||
if (m_settings.defaultServerIndex() >= 0 && m_settings.serversCount() > 0) {
|
||||
goToPage(Page::Vpn, true, false);
|
||||
}
|
||||
|
||||
|
@ -182,6 +182,8 @@ void MainWindow::goToPage(Page page, bool reset, bool slide)
|
|||
ui->progressBar_new_server_connection->setMaximum(300);
|
||||
|
||||
ui->pushButton_back_from_start->setVisible(!pagesStack.isEmpty());
|
||||
|
||||
ui->pushButton_new_server_connect->setVisible(true);
|
||||
}
|
||||
if (page == Page::NewServer_2) {
|
||||
ui->pushButton_new_server_settings_cloak->setChecked(true);
|
||||
|
@ -722,6 +724,10 @@ void MainWindow::onPushButtonForgetServer(bool)
|
|||
|
||||
selectedServerIndex = -1;
|
||||
closePage();
|
||||
|
||||
if (m_settings.serversCount() == 0) {
|
||||
setStartPage(Page::Start);
|
||||
}
|
||||
updateServersListPage();
|
||||
}
|
||||
|
||||
|
|
BIN
deploy/data/macos/ck-client
Executable file
BIN
deploy/data/macos/ck-client
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue