Compare commits

...

32 Commits

Author SHA1 Message Date
Kevin Yue
e2d28c83b2 Release 1.4.5 2022-05-29 21:15:40 +08:00
Kevin Yue
a489c5881b Updated VERSION, Bumped 1.4.4 –> 1.4.5 2022-05-29 21:15:32 +08:00
Kevin Yue
44fd2f1d3f chore: refine vscode settings 2022-05-29 21:15:01 +08:00
Kevin Yue
9c9b42b87f fix: rollback dbus configuration 2022-05-29 21:00:37 +08:00
Kevin Yue
fb2b148b72 feat: add option to start minimized 2022-05-29 17:33:12 +08:00
Kevin Yue
64bec9660a packaging: fix postinst for debian 2022-05-27 21:32:33 +08:00
Kevin Yue
0619e91bf5 packaging: add postinst for debian 2022-05-26 21:44:31 +08:00
Kevin Yue
048aa4799f test: test debian packaging 2022-05-26 15:33:39 +08:00
Kevin Yue
db0e8b801d test: test debian packaging 2022-05-26 15:12:25 +08:00
Kevin Yue
d03bbc339e test: test debian packaging 2022-05-26 15:06:17 +08:00
Kevin Yue
1312d54d08 test: test debian packaging 2022-05-26 14:41:10 +08:00
Kevin Yue
39f99d9143 test: test debian packaging 2022-05-26 14:23:29 +08:00
Kevin Yue
7a4eb0def3 ci: fix the foder path 2022-05-26 14:13:47 +08:00
Kevin Yue
d9b2094edd chore: apt -> apt-get 2022-05-26 14:11:38 +08:00
Kevin Yue
e6118af9f3 ci: verify debian package 2022-05-26 14:05:59 +08:00
Kevin Yue
108b4be3ec test: test debian packaging 2022-05-26 13:16:20 +08:00
Kevin Yue
65c59e47ec Revert "Revert "fix: improve the dbus security""
This reverts commit 4940830885.
2022-05-26 11:56:14 +08:00
Kevin Yue
177da7f3a2 Revert "Revert "fix: improve the dbus security""
This reverts commit ffa99d3783.
2022-05-26 11:56:06 +08:00
Kevin Yue
d5cd90373b fix: improve the portal config parsing 2022-05-26 11:48:55 +08:00
Kevin Yue
ffa99d3783 Revert "fix: improve the dbus security"
This reverts commit 829298bb84.
2022-05-23 22:20:06 +08:00
Kevin Yue
4940830885 Revert "fix: improve the dbus security"
This reverts commit ad178fe56c.
2022-05-23 22:20:03 +08:00
Kevin Yue
ad178fe56c fix: improve the dbus security 2022-05-23 21:55:21 +08:00
Kevin Yue
829298bb84 fix: improve the dbus security 2022-05-23 21:24:22 +08:00
Kevin Yue
8fe717d844 fix: free resources in slots 2022-05-22 23:17:11 +08:00
Kevin Yue
dffbc64ef5 chore: refine cmake files 2022-05-21 20:55:05 +08:00
Kevin Yue
b99c5a8391 fix: support high DPI screen 2022-05-21 11:43:17 +08:00
Kevin Yue
c2f7576d10 Release 1.4.4 2022-05-14 19:21:14 +08:00
Kevin Yue
4327235093 Updated VERSION, Bumped 1.4.3 –> 1.4.4 2022-05-14 19:21:03 +08:00
Kevin Yue
0699878b92 fix: support the HighDPI displays
Refs: #115
2022-05-14 19:12:07 +08:00
Kevin Yue
e3aba11506 [misc] update the build script 2022-05-09 22:40:00 +08:00
Kevin Yue
ff58258d5c [ci] Enable build job for master branch 2022-05-09 22:26:22 +08:00
Kevin Yue
991cf25a7b [ci] Add ubuntu 22.04 2022-05-09 22:23:08 +08:00
26 changed files with 252 additions and 85 deletions

View File

@@ -3,6 +3,7 @@ name: Build
on: on:
push: push:
branches: branches:
- master
- develop - develop
tags: tags:
- "v*.*.*" - "v*.*.*"
@@ -17,7 +18,7 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, ubuntu-20.04] os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -51,6 +52,10 @@ jobs:
run: | run: |
./scripts/snapshot-archive-all.sh ./scripts/snapshot-archive-all.sh
- name: Verify debian package
run: |
./scripts/verify-debian-package.sh
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: snapshot-source-code name: snapshot-source-code
@@ -173,6 +178,10 @@ jobs:
run: | run: |
./scripts/release-archive-all.sh ./scripts/release-archive-all.sh
- name: Verify debian package
run: |
./scripts/verify-debian-package.sh
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: release-source-code name: release-source-code

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@ build
artifacts artifacts
.cmake .cmake
.idea
# Auto generated DBus files # Auto generated DBus files
*_adaptor.cpp *_adaptor.cpp

View File

@@ -92,7 +92,7 @@ target_link_libraries(gpclient
QtSignals QtSignals
) )
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0 AND CMAKE_BUILD_TYPE STREQUAL Release)
target_compile_options(gpclient PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") target_compile_options(gpclient PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
endif() endif()

View File

@@ -6,7 +6,7 @@ Name=GlobalProtect VPN
Comment=A GlobalProtect VPN client (GUI) for Linux based on OpenConnect and built with Qt5, supports SAML auth mode. Comment=A GlobalProtect VPN client (GUI) for Linux based on OpenConnect and built with Qt5, supports SAML auth mode.
GenericName=GlobalProtect VPN client, supports SAML auth mode GenericName=GlobalProtect VPN client, supports SAML auth mode
Categories=Network;Dialup; Categories=Network;Dialup;
Exec=@CMAKE_INSTALL_PREFIX@/bin/gpclient Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=1 @CMAKE_INSTALL_PREFIX@/bin/gpclient
Icon=com.yuezk.qt.gpclient Icon=com.yuezk.qt.gpclient
Keywords=GlobalProtect;Openconnect;SAML;connection;VPN; Keywords=GlobalProtect;Openconnect;SAML;connection;VPN;
StartupWMClass=gpclient StartupWMClass=gpclient

View File

@@ -162,9 +162,18 @@ void GatewayAuthenticator::samlAuth(QString samlMethod, QString samlRequest, QSt
SAMLLoginWindow *loginWindow = new SAMLLoginWindow; SAMLLoginWindow *loginWindow = new SAMLLoginWindow;
connect(loginWindow, &SAMLLoginWindow::success, this, &GatewayAuthenticator::onSAMLLoginSuccess); connect(loginWindow, &SAMLLoginWindow::success, [this, loginWindow](const QMap<QString, QString> &samlResult) {
connect(loginWindow, &SAMLLoginWindow::fail, this, &GatewayAuthenticator::onSAMLLoginFail); this->onSAMLLoginSuccess(samlResult);
connect(loginWindow, &SAMLLoginWindow::rejected, this, &GatewayAuthenticator::onLoginWindowRejected); loginWindow->deleteLater();
});
connect(loginWindow, &SAMLLoginWindow::fail, [this, loginWindow](const QString &error) {
this->onSAMLLoginFail(error);
loginWindow->deleteLater();
});
connect(loginWindow, &SAMLLoginWindow::rejected, [this, loginWindow]() {
this->onLoginWindowRejected();
loginWindow->deleteLater();
});
loginWindow->login(samlMethod, samlRequest, preloginUrl); loginWindow->login(samlMethod, samlRequest, preloginUrl);
} }

View File

@@ -35,7 +35,7 @@ GPClient::GPClient(QWidget *parent, IVpn *vpn)
connect(ov, SIGNAL(error(QString)), this, SLOT(onVPNError(QString))); connect(ov, SIGNAL(error(QString)), this, SLOT(onVPNError(QString)));
connect(ov, SIGNAL(logAvailable(QString)), this, SLOT(onVPNLogAvailable(QString))); connect(ov, SIGNAL(logAvailable(QString)), this, SLOT(onVPNLogAvailable(QString)));
// Initiallize the context menu of system tray. // Initialize the context menu of system tray.
initSystemTrayIcon(); initSystemTrayIcon();
initVpnStatus(); initVpnStatus();
} }
@@ -279,12 +279,24 @@ void GPClient::portalLogin()
{ {
PortalAuthenticator *portalAuth = new PortalAuthenticator(portal(), settings::get("clientos", "Linux").toString()); PortalAuthenticator *portalAuth = new PortalAuthenticator(portal(), settings::get("clientos", "Linux").toString());
connect(portalAuth, &PortalAuthenticator::success, this, &GPClient::onPortalSuccess); connect(portalAuth, &PortalAuthenticator::success, [this, portalAuth](const PortalConfigResponse response, const QString region) {
this->onPortalSuccess(response, region);
portalAuth->deleteLater();
});
// Prelogin failed on the portal interface, try to treat the portal as a gateway interface // Prelogin failed on the portal interface, try to treat the portal as a gateway interface
connect(portalAuth, &PortalAuthenticator::preloginFailed, this, &GPClient::onPortalPreloginFail); connect(portalAuth, &PortalAuthenticator::preloginFailed, [this, portalAuth](const QString msg) {
connect(portalAuth, &PortalAuthenticator::portalConfigFailed, this, &GPClient::onPortalConfigFail); this->onPortalPreloginFail(msg);
portalAuth->deleteLater();
});
connect(portalAuth, &PortalAuthenticator::portalConfigFailed, [this, portalAuth](const QString msg) {
this->onPortalConfigFail(msg);
portalAuth->deleteLater();
});
// Portal login failed // Portal login failed
connect(portalAuth, &PortalAuthenticator::fail, this, &GPClient::onPortalFail); connect(portalAuth, &PortalAuthenticator::fail, [this, portalAuth](const QString &msg) {
this->onPortalFail(msg);
portalAuth->deleteLater();
});
ui->statusLabel->setText("Authenticating..."); ui->statusLabel->setText("Authenticating...");
updateConnectionStatus(VpnStatus::pending); updateConnectionStatus(VpnStatus::pending);
@@ -359,8 +371,14 @@ void GPClient::gatewayLogin()
GatewayAuthenticator *gatewayAuth = new GatewayAuthenticator(currentGateway().address(), params); GatewayAuthenticator *gatewayAuth = new GatewayAuthenticator(currentGateway().address(), params);
connect(gatewayAuth, &GatewayAuthenticator::success, this, &GPClient::onGatewaySuccess); connect(gatewayAuth, &GatewayAuthenticator::success, [this, gatewayAuth](const QString &authToken) {
connect(gatewayAuth, &GatewayAuthenticator::fail, this, &GPClient::onGatewayFail); this->onGatewaySuccess(authToken);
gatewayAuth->deleteLater();
});
connect(gatewayAuth, &GatewayAuthenticator::fail, [this, gatewayAuth](const QString &msg) {
this->onGatewayFail(msg);
gatewayAuth->deleteLater();
});
ui->statusLabel->setText("Authenticating..."); ui->statusLabel->setText("Authenticating...");
updateConnectionStatus(VpnStatus::pending); updateConnectionStatus(VpnStatus::pending);

View File

@@ -9,6 +9,7 @@
#include "portalconfigresponse.h" #include "portalconfigresponse.h"
#include "settingsdialog.h" #include "settingsdialog.h"
#include "vpn.h" #include "vpn.h"
#include "gatewayauthenticator.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace Ui { class GPClient; } namespace Ui { class GPClient; }
@@ -80,6 +81,8 @@ private:
SettingsDialog *settingsDialog; SettingsDialog *settingsDialog;
QPushButton *settingsButton; QPushButton *settingsButton;
GatewayAuthenticator *gatewayAuthenticator;
bool isQuickConnect { false }; bool isQuickConnect { false };
bool isSwitchingGateway { false }; bool isSwitchingGateway { false };
PortalConfigResponse portalConfig; PortalConfigResponse portalConfig;

View File

@@ -1,6 +1,5 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QString> #include <QtCore/QString>
#include <QtCore/QDir>
#include <QtCore/QStandardPaths> #include <QtCore/QStandardPaths>
#include <plog/Log.h> #include <plog/Log.h>
#include <plog/Init.h> #include <plog/Init.h>
@@ -15,6 +14,8 @@
#include "sigwatch.h" #include "sigwatch.h"
#include "version.h" #include "version.h"
#define QT_AUTO_SCREEN_SCALE_FACTOR "QT_AUTO_SCREEN_SCALE_FACTOR"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
plog::ColorConsoleAppender<plog::TxtFormatter> consoleAppender(plog::streamStdErr); plog::ColorConsoleAppender<plog::TxtFormatter> consoleAppender(plog::streamStdErr);
@@ -23,11 +24,16 @@ int main(int argc, char *argv[])
PLOGI << "GlobalProtect started, version: " << VERSION; PLOGI << "GlobalProtect started, version: " << VERSION;
QString port = QString::fromLocal8Bit(qgetenv(ENV_CDP_PORT)); QString port = QString::fromLocal8Bit(qgetenv(ENV_CDP_PORT));
QString hidpiSupport = QString::fromLocal8Bit(qgetenv(QT_AUTO_SCREEN_SCALE_FACTOR));
if (port == "") { if (port.isEmpty()) {
qputenv(ENV_CDP_PORT, "12315"); qputenv(ENV_CDP_PORT, "12315");
} }
if (hidpiSupport.isEmpty()) {
qputenv(QT_AUTO_SCREEN_SCALE_FACTOR, "1");
}
SingleApplication app(argc, argv); SingleApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false); app.setQuitOnLastWindowClosed(false);
@@ -39,6 +45,7 @@ int main(int argc, char *argv[])
parser.addOptions({ parser.addOptions({
{"json", "Write the result of the handshake with the GlobalConnect server to stdout as JSON and terminate. Useful for scripting."}, {"json", "Write the result of the handshake with the GlobalConnect server to stdout as JSON and terminate. Useful for scripting."},
{"now", "Do not show the dialog with the connect button; connect immediately instead."}, {"now", "Do not show the dialog with the connect button; connect immediately instead."},
{"start-minimized", "Launch the client minimized."},
}); });
parser.process(app); parser.process(app);
@@ -48,7 +55,7 @@ int main(int argc, char *argv[])
? static_cast<IVpn*>(new VpnJson(nullptr)) // Print to stdout and exit ? static_cast<IVpn*>(new VpnJson(nullptr)) // Print to stdout and exit
: static_cast<IVpn*>(new VpnDbus(nullptr)); // Contact GPService daemon via dbus : static_cast<IVpn*>(new VpnDbus(nullptr)); // Contact GPService daemon via dbus
GPClient w(nullptr, vpn); GPClient w(nullptr, vpn);
w.show(); parser.isSet("start-minimized") ? w.showMinimized() : w.show();
if (positional.size() > 0) { if (positional.size() > 0) {
w.portal(positional.at(0)); w.portal(positional.at(0));

View File

@@ -78,10 +78,7 @@ QList<GPGateway> PortalConfigResponse::parseGateways(QXmlStreamReader &xmlReader
// Parse the gateways -> external -> list -> entry // Parse the gateways -> external -> list -> entry
if (xmlReader.name() == "entry" && xmlReader.isStartElement()) { if (xmlReader.name() == "entry" && xmlReader.isStartElement()) {
GPGateway g; GPGateway g;
QString address = xmlReader.attributes().value("name").toString(); parseGateway(xmlReader, g);
g.setAddress(address);
g.setPriorityRules(parsePriorityRules(xmlReader));
g.setName(parseGatewayName(xmlReader));
gateways.append(g); gateways.append(g);
} }
} }
@@ -91,45 +88,44 @@ QList<GPGateway> PortalConfigResponse::parseGateways(QXmlStreamReader &xmlReader
return gateways; return gateways;
} }
QMap<QString, int> PortalConfigResponse::parsePriorityRules(QXmlStreamReader &xmlReader) void PortalConfigResponse::parseGateway(QXmlStreamReader &reader, GPGateway &gateway) {
{ PLOGI << "Start parsing gateway...";
PLOGI << "Start parsing the priority rules...";
QMap<QString, int> priorityRules; auto finished = false;
while (!finished) {
while ((xmlReader.name() != "priority-rule" || !xmlReader.isEndElement()) && !xmlReader.hasError()) { if (reader.name() == "entry") {
xmlReader.readNext(); auto address = reader.attributes().value("name").toString();
gateway.setAddress(address);
if (xmlReader.name() == "entry" && xmlReader.isStartElement()) { } else if (reader.name() == "description") { // gateway name
QString ruleName = xmlReader.attributes().value("name").toString(); gateway.setName(reader.readElementText());
// Read the priority tag } else if (reader.name() == "priority-rule") { // priority rules
while (xmlReader.name() != "priority"){ parsePriorityRule(reader, gateway);
xmlReader.readNext();
}
int ruleValue = xmlReader.readElementText().toUInt();
priorityRules.insert(ruleName, ruleValue);
} }
finished = !reader.readNextStartElement();
} }
PLOGI << "Finished parsing the priority rules.";
return priorityRules;
} }
QString PortalConfigResponse::parseGatewayName(QXmlStreamReader &xmlReader) void PortalConfigResponse::parsePriorityRule(QXmlStreamReader &reader, GPGateway &gateway) {
{ PLOGI << "Start parsing priority rule...";
PLOGI << "Start parsing the gateway name...";
while (xmlReader.name() != "description" || !xmlReader.isEndElement()) { QMap<QString, int> priorityRules;
xmlReader.readNext(); auto finished = false;
if (xmlReader.name() == "description" && xmlReader.tokenType() == xmlReader.StartElement) {
PLOGI << "Finished parsing the gateway name"; while (!finished) {
return xmlReader.readElementText(); // Parse the priority-rule -> entry
if (reader.name() == "entry") {
auto ruleName = reader.attributes().value("name").toString();
// move to the priority value
while (reader.name() != "priority") {
reader.readNextStartElement();
}
auto priority = reader.readElementText().toInt();
priorityRules.insert(ruleName, priority);
} }
finished = !reader.readNextStartElement();
} }
PLOGE << "Error: <description> tag not found"; gateway.setPriorityRules(priorityRules);
return "";
} }
QString PortalConfigResponse::userAuthCookie() const QString PortalConfigResponse::userAuthCookie() const
@@ -137,11 +133,6 @@ QString PortalConfigResponse::userAuthCookie() const
return m_userAuthCookie; return m_userAuthCookie;
} }
QString PortalConfigResponse::prelogonUserAuthCookie() const
{
return m_prelogonAuthCookie;
}
QList<GPGateway> PortalConfigResponse::allGateways() const QList<GPGateway> PortalConfigResponse::allGateways() const
{ {
return m_gateways; return m_gateways;
@@ -176,3 +167,4 @@ void PortalConfigResponse::setPrelogonUserAuthCookie(const QString cookie)
{ {
m_prelogonAuthCookie = cookie; m_prelogonAuthCookie = cookie;
} }

View File

@@ -19,7 +19,6 @@ public:
const QString &username() const; const QString &username() const;
QString password() const; QString password() const;
QString userAuthCookie() const; QString userAuthCookie() const;
QString prelogonUserAuthCookie() const;
QList<GPGateway> allGateways() const; QList<GPGateway> allGateways() const;
void setAllGateways(QList<GPGateway> gateways); void setAllGateways(QList<GPGateway> gateways);
@@ -44,8 +43,9 @@ private:
void setPrelogonUserAuthCookie(const QString cookie); void setPrelogonUserAuthCookie(const QString cookie);
static QList<GPGateway> parseGateways(QXmlStreamReader &xmlReader); static QList<GPGateway> parseGateways(QXmlStreamReader &xmlReader);
static QMap<QString, int> parsePriorityRules(QXmlStreamReader &xmlReader); static void parseGateway(QXmlStreamReader &reader, GPGateway &gateway);
static QString parseGatewayName(QXmlStreamReader &xmlReader); static void parsePriorityRule(QXmlStreamReader &reader, GPGateway &gateway);
}; };
#endif // PORTALCONFIGRESPONSE_H #endif // PORTALCONFIGRESPONSE_H

View File

@@ -15,6 +15,7 @@ SAMLLoginWindow::SAMLLoginWindow(QWidget *parent)
QVBoxLayout *verticalLayout = new QVBoxLayout(this); QVBoxLayout *verticalLayout = new QVBoxLayout(this);
webView->setUrl(QUrl("about:blank")); webView->setUrl(QUrl("about:blank"));
webView->setAttribute(Qt::WA_DeleteOnClose);
// webView->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); // webView->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);
verticalLayout->addWidget(webView); verticalLayout->addWidget(webView);

View File

@@ -4,6 +4,12 @@ project(GPService)
set(gpservice_GENERATED_SOURCES) set(gpservice_GENERATED_SOURCES)
execute_process(COMMAND logname OUTPUT_VARIABLE CMAKE_LOGNAME)
string(STRIP "${CMAKE_LOGNAME}" CMAKE_LOGNAME)
message(STATUS "CMAKE_LOGNAME: ${CMAKE_LOGNAME}")
configure_file(dbus/com.yuezk.qt.GPService.conf.in dbus/com.yuezk.qt.GPService.conf)
configure_file(dbus/com.yuezk.qt.GPService.service.in dbus/com.yuezk.qt.GPService.service) configure_file(dbus/com.yuezk.qt.GPService.service.in dbus/com.yuezk.qt.GPService.service)
configure_file(systemd/gpservice.service.in systemd/gpservice.service) configure_file(systemd/gpservice.service.in systemd/gpservice.service)
@@ -65,7 +71,7 @@ target_link_libraries(gpservice
target_compile_definitions(gpservice PUBLIC QAPPLICATION_CLASS=QCoreApplication) target_compile_definitions(gpservice PUBLIC QAPPLICATION_CLASS=QCoreApplication)
install(TARGETS gpservice DESTINATION bin) install(TARGETS gpservice DESTINATION bin)
install(FILES "dbus/com.yuezk.qt.GPService.conf" DESTINATION share/dbus-1/system.d ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dbus/com.yuezk.qt.GPService.conf" DESTINATION share/dbus-1/system.d )
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dbus/com.yuezk.qt.GPService.service" DESTINATION share/dbus-1/system-services) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dbus/com.yuezk.qt.GPService.service" DESTINATION share/dbus-1/system-services)
install(FILES "gp.conf" DESTINATION /etc/gpservice) install(FILES "gp.conf" DESTINATION /etc/gpservice)

View File

@@ -136,7 +136,7 @@ void GPService::connect(QString server, QString username, QString passwd)
<< "--cookie-on-stdin" << "--cookie-on-stdin"
<< server; << server;
log("Start process with arugments: " + args.join(" ")); log("Start process with arugments: " + args.join(", "));
openconnect->start(bin, args); openconnect->start(bin, args);
openconnect->write((passwd + "\n").toUtf8()); openconnect->write((passwd + "\n").toUtf8());

View File

@@ -42,7 +42,7 @@ Add the repository in the above table and install it with your favorite package
```sh ```sh
sudo add-apt-repository ppa:yuezk/globalprotect-openconnect sudo add-apt-repository ppa:yuezk/globalprotect-openconnect
sudo apt-get update sudo apt-get update
sudo apt install globalprotect-openconnect sudo apt-get install globalprotect-openconnect
``` ```
> For Linux Mint, you might need to import the GPG key with: `sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7937C393082992E5D6E4A60453FC26B43838D761` if you encountered an error `gpg: keyserver receive failed: General error`. > For Linux Mint, you might need to import the GPG key with: `sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7937C393082992E5D6E4A60453FC26B43838D761` if you encountered an error `gpg: keyserver receive failed: General error`.
@@ -105,7 +105,7 @@ cd GlobalProtect-openconnect
> >
> ```sh > ```sh
> sudo add-apt-repository ppa:dwmw2/openconnect > sudo add-apt-repository ppa:dwmw2/openconnect
> sudo apt update > sudo apt-get update
> ``` > ```
Build and install with: Build and install with:

View File

@@ -1 +1 @@
1.4.3 1.4.5

32
debian/changelog vendored
View File

@@ -1,3 +1,35 @@
globalprotect-openconnect (1.4.5-1) unstable; urgency=medium
* Updated VERSION, Bumped 1.4.4 > 1.4.5
* chore: refine vscode settings
* fix: rollback dbus configuration
* feat: add option to start minimized
* packaging: fix postinst for debian
* packaging: add postinst for debian
* test: test debian packaging
* ci: fix the foder path
* chore: apt -> apt-get
* ci: verify debian package
* Revert "Revert "fix: improve the dbus security""
* fix: improve the portal config parsing
* Revert "fix: improve the dbus security"
* fix: improve the dbus security
* fix: free resources in slots
* chore: refine cmake files
* fix: support high DPI screen
-- Kevin Yue <k3vinyue@gmail.com> Sun, 29 May 2022 21:15:40 +0800
globalprotect-openconnect (1.4.4-1) unstable; urgency=medium
* Updated VERSION, Bumped 1.4.3 > 1.4.4
* fix: support the HighDPI displays
* [misc] update the build script
* [ci] Enable build job for master branch
* [ci] Add ubuntu 22.04
-- Kevin Yue <k3vinyue@gmail.com> Sat, 14 May 2022 19:21:14 +0800
globalprotect-openconnect (1.4.3-1) unstable; urgency=medium globalprotect-openconnect (1.4.3-1) unstable; urgency=medium
* Updated VERSION, Bumped 1.4.2 > 1.4.3 * Updated VERSION, Bumped 1.4.2 > 1.4.3

View File

@@ -1,7 +1,7 @@
# Maintainer: Keinv Yue <yuezk001@gmail.com> # Maintainer: Keinv Yue <yuezk001@gmail.com>
_pkgver="1.4.3" _pkgver="1.4.5"
_commit="28d832195876614c6c730b430978268242235ab3" _commit="a489c5881bdc9d3565da0f2efac4963bec3f7069"
pkgname=globalprotect-openconnect-git pkgname=globalprotect-openconnect-git
pkgver=${_pkgver} pkgver=${_pkgver}
pkgrel=1 pkgrel=1

40
packaging/aur/PKGBUILD.in Normal file
View File

@@ -0,0 +1,40 @@
# Maintainer: Keinv Yue <yuezk001@gmail.com>
_pkgver="{VERSION}"
_commit="{COMMIT}"
pkgname=globalprotect-openconnect-git
pkgver=${_pkgver}
pkgrel=1
pkgdesc="A GlobalProtect VPN client (GUI) for Linux based on Openconnect and built with Qt5, supports SAML auth mode. (development version)"
arch=(x86_64 aarch64)
url="https://github.com/yuezk/GlobalProtect-openconnect"
license=('GPL3')
backup=(
etc/gpservice/gp.conf
)
install=gp.install
depends=('openconnect>=8.0.0' qt5-base qt5-webengine qt5-websockets)
makedepends=(git cmake)
conflicts=('globalprotect-openconnect')
provides=('globalprotect-openconnect' 'gpclient' 'gpservice')
source=(git+https://github.com/yuezk/GlobalProtect-openconnect#commit=${_commit})
sha256sums=('SKIP')
prepare() {
cd GlobalProtect-openconnect
echo "${_pkgver}" > VERSION
}
build() {
cd GlobalProtect-openconnect
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE=-s
make -j$(nproc) -C build
}
package() {
cd GlobalProtect-openconnect
make DESTDIR="$pkgdir/" install -C build
}

View File

@@ -1,3 +1,35 @@
-------------------------------------------------------------------
Sun May 29 13:15:40 UTC 2022 - k3vinyue@gmail.com - 1.4.5
- Update to 1.4.5
* Updated VERSION, Bumped 1.4.4 > 1.4.5
* chore: refine vscode settings
* fix: rollback dbus configuration
* feat: add option to start minimized
* packaging: fix postinst for debian
* packaging: add postinst for debian
* test: test debian packaging
* ci: fix the foder path
* chore: apt -> apt-get
* ci: verify debian package
* Revert "Revert "fix: improve the dbus security""
* fix: improve the portal config parsing
* Revert "fix: improve the dbus security"
* fix: improve the dbus security
* fix: free resources in slots
* chore: refine cmake files
* fix: support high DPI screen
-------------------------------------------------------------------
Sat May 14 11:21:14 UTC 2022 - k3vinyue@gmail.com - 1.4.4
- Update to 1.4.4
* Updated VERSION, Bumped 1.4.3 > 1.4.4
* fix: support the HighDPI displays
* [misc] update the build script
* [ci] Enable build job for master branch
* [ci] Add ubuntu 22.04
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 9 14:20:54 UTC 2022 - k3vinyue@gmail.com - 1.4.3 Mon May 9 14:20:54 UTC 2022 - k3vinyue@gmail.com - 1.4.3

View File

@@ -1,5 +1,5 @@
Name: globalprotect-openconnect Name: globalprotect-openconnect
Version: 1.4.3 Version: 1.4.5
Release: 1 Release: 1
Summary: A GlobalProtect VPN client powered by OpenConnect Summary: A GlobalProtect VPN client powered by OpenConnect
Group: Productivity/Networking/PPP Group: Productivity/Networking/PPP

View File

@@ -1,7 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
sudo apt update sudo apt-get update
sudo apt install -y \ sudo apt-get install -y \
build-essential \ build-essential \
qtbase5-dev \ qtbase5-dev \
libqt5websockets5-dev \ libqt5websockets5-dev \

View File

@@ -35,7 +35,7 @@ function update_rpm_changelog() {
function generate_pkgbuild() { function generate_pkgbuild() {
local commit_id="$(git rev-parse HEAD)" local commit_id="$(git rev-parse HEAD)"
local version="$(cat VERSION)" local version="$(cat VERSION)"
sed -i"" -e "s/{COMMIT}/${commit_id}/" -e "s/{VERSION}/${version}/" packaging/aur/PKGBUILD sed -e "s/{COMMIT}/${commit_id}/" -e "s/{VERSION}/${version}/" packaging/aur/PKGBUILD.in > packaging/aur/PKGBUILD
} }
# Update rpm version # Update rpm version

View File

@@ -0,0 +1,17 @@
#!/bin/bash -e
sudo apt-get update
sudo apt-get install -y \
build-essential \
qtbase5-dev \
libqt5websockets5-dev \
qtwebengine5-dev \
cmake \
debhelper
mkdir -p build
cp ./artifacts/*.tar.gz build/ && cd build
tar -xzf *.tar.gz && cd globalprotect-openconnect-*/
dpkg-buildpackage -us -uc