Compare commits

..

12 Commits

Author SHA1 Message Date
Kevin Yue
f089996cdc Release 1.2.9 2021-08-03 22:20:36 +08:00
Tom Almeida
260b557238 Properly handle gateway responses that return Javascript errors (#74)
This was previously causing a segmentation fault, as the gateway
response would not be valid XML to be parsed.

Closes: #38, #71
2021-08-03 22:17:50 +08:00
Robert M Flight
3495dbfe18 Remove qt5 default (#68)
* removing qt5-default

as of ubuntu 21.04 it doesn't exist anymore

* update readme

based on ubuntu 21, and actually installing the deb for ubuntu

* missed the other package
2021-07-04 18:31:28 +08:00
Matt McHenry
cdf193024c README.md: add section for NixOS (#65) 2021-06-18 21:35:28 +08:00
Kevin Yue
76de070d78 Update publish.yml 2021-05-07 13:42:33 +08:00
Kevin Yue
420ae27888 Update publish.yml 2021-05-07 13:34:22 +08:00
Tobias Sarnowski
6a347746cc Mark for inclusion in aarch64 archlinux repository (#58)
This version of the software was tested on current Manjaro as of this
commit date on a Pinebook Pro with the official aarch64 KDE image.
2021-05-06 15:19:07 +08:00
Kevin Yue
624babb380 Update publish.yml 2021-04-25 21:24:08 +08:00
Kevin Yue
511b20fdcd Update publish.yml 2021-04-25 10:36:44 +08:00
Kevin Yue
abe33c7407 Update publish.yml 2021-04-25 10:29:03 +08:00
Kevin Yue
99a82c8641 Update publish.yml 2021-04-24 23:08:10 +08:00
Kevin Yue
e5d0acad3c Update publish.yml 2021-04-24 22:44:24 +08:00
6 changed files with 42 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ jobs:
- name: Install Qt - name: Install Qt
uses: jurplel/install-qt-action@v2 uses: jurplel/install-qt-action@v2
with: with:
version: '5.15.2' version: 5.15.2
modules: 'qtwebengine qtwebsockets' modules: 'qtwebengine qtwebsockets'
# Checkout repository and submodules # Checkout repository and submodules
@@ -24,7 +24,6 @@ jobs:
qmake CONFIG+=release qmake CONFIG+=release
make make
aur-publish: aur-publish:
needs: needs:
- build - build
@@ -33,6 +32,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get latest version - name: Get latest version
id: get-version id: get-version
@@ -42,14 +43,14 @@ jobs:
- name: Get the sha256sum - name: Get the sha256sum
id: get-sha256sum id: get-sha256sum
run: | run: |
echo ::set-output name=SHA::$(curl -L https://github.com/yuezk/GlobalProtect-openconnect/archive/refs/tags/v${{ steps.get-version.outputs.VERSION }}.tar.gz | sha256sum) echo ::set-output name=SHA::$(curl -L https://github.com/yuezk/GlobalProtect-openconnect/archive/refs/tags/v${{ steps.get-version.outputs.VERSION }}.tar.gz | sha256sum | cut -f1 -d" ")
- name: Generate PKGBUILD - name: Generate PKGBUILD
run: | run: |
sed "s/{PKG_VERSION}/${{ steps.get-version.outputs.VERSION }}/g;s/{SOURCE_SHA}/${{ steps.get-sha256sum.outputs.SHA }}/g" PKGBUILD.template > PKGBUILD sed "s/{PKG_VERSION}/${{ steps.get-version.outputs.VERSION }}/g;s/{SOURCE_SHA}/${{ steps.get-sha256sum.outputs.SHA }}/g" PKGBUILD.template > PKGBUILD
- name: Publish AUR package - name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.2.3 uses: KSXGitHub/github-actions-deploy-aur@v2.2.4
with: with:
pkgname: globalprotect-openconnect pkgname: globalprotect-openconnect
pkgbuild: ./PKGBUILD pkgbuild: ./PKGBUILD

View File

@@ -44,8 +44,9 @@ void GatewayAuthenticator::login(const LoginParams &params)
void GatewayAuthenticator::onLoginFinished() void GatewayAuthenticator::onLoginFinished()
{ {
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender()); QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
QByteArray response;
if (reply->error()) { if (reply->error() || (response = reply->readAll()).contains("Authentication failure")) {
PLOGE << QString("Failed to login the gateway at %1, %2").arg(loginUrl).arg(reply->errorString()); PLOGE << QString("Failed to login the gateway at %1, %2").arg(loginUrl).arg(reply->errorString());
if (normalLoginWindow) { if (normalLoginWindow) {
@@ -61,7 +62,7 @@ void GatewayAuthenticator::onLoginFinished()
normalLoginWindow->close(); normalLoginWindow->close();
} }
const QUrlQuery params = gpclient::helper::parseGatewayResponse(reply->readAll()); const QUrlQuery params = gpclient::helper::parseGatewayResponse(response);
emit success(params.toString()); emit success(params.toString());
} }

View File

@@ -6,7 +6,7 @@
#include <plog/Log.h> #include <plog/Log.h>
#include <plog/Appenders/ColorConsoleAppender.h> #include <plog/Appenders/ColorConsoleAppender.h>
static const QString version = "v1.2.8"; static const QString version = "v1.2.9";
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

View File

@@ -5,7 +5,7 @@ _gitname=GlobalProtect-openconnect
pkgver={PKG_VERSION} pkgver={PKG_VERSION}
pkgrel=1 pkgrel=1
pkgdesc="A GlobalProtect VPN client (GUI) for Linux based on Openconnect and built with Qt5, supports SAML auth mode." pkgdesc="A GlobalProtect VPN client (GUI) for Linux based on Openconnect and built with Qt5, supports SAML auth mode."
arch=(x86_64) arch=(x86_64 aarch64)
url="https://github.com/yuezk/${_gitname}" url="https://github.com/yuezk/${_gitname}"
license=('GPL3') license=('GPL3')
depends=('openconnect>=8.0.0' qt5-base qt5-webengine qt5-websockets) depends=('openconnect>=8.0.0' qt5-base qt5-webengine qt5-websockets)

View File

@@ -20,12 +20,27 @@ A GlobalProtect VPN client (GUI) for Linux based on Openconnect and built with Q
### Ubuntu ### Ubuntu
1. Install openconnect v8.x 1. Install openconnect v8.x
```sh
sudo apt install openconnect
openconnect --version
```
For Ubuntu 18.04 you might need to [build the latest openconnect from source code](https://gist.github.com/yuezk/ab9a4b87a9fa0182bdb2df41fab5f613). For Ubuntu 18.04 you might need to [build the latest openconnect from source code](https://gist.github.com/yuezk/ab9a4b87a9fa0182bdb2df41fab5f613).
2. Install the Qt dependencies 2. Install the Qt dependencies
For Ubuntu 20, this should work.
```sh ```sh
sudo apt install qt5-default libqt5websockets5-dev qtwebengine5-dev qttools5-dev sudo apt install qtbase5-dev libqt5websockets5-dev qtwebengine5-dev qttools5-dev debhelper
``` ```
For Ubuntu 21, you need to install the base pieces separately as QT5 is the default.
```sh
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5websockets5-dev qtwebengine5-dev qttools5-dev debhelper
```
### OpenSUSE ### OpenSUSE
Install the Qt dependencies Install the Qt dependencies
@@ -76,15 +91,28 @@ Relatively manual process for now:
git-archive-all --force-submodules --prefix=globalprotect-openconnect-1.3.0/ ../globalprotect-openconnect_1.3.0.orig.tar.gz git-archive-all --force-submodules --prefix=globalprotect-openconnect-1.3.0/ ../globalprotect-openconnect_1.3.0.orig.tar.gz
``` ```
* Finally extract the source tree and build the debian package. * Finally extract the source tree, build the debian package, and install it.
``` ```
cd .. cd ..
tar -xzvf globalprotect-openconnect_1.3.0.orig.tar.gz tar -xzvf globalprotect-openconnect_1.3.0.orig.tar.gz
cd globalprotect-openconnect-1.3.0 cd globalprotect-openconnect-1.3.0
fakeroot dpkg-buildpackage -uc -us -sa 2>&1 | tee ../build.log fakeroot dpkg-buildpackage -uc -us -sa 2>&1 | tee ../build.log
sudo dpkg -i globalprotect-openconnect_1.3.0-1ppa1_amd64.deb
``` ```
### NixOS
In `configuration.nix`:
```
services.globalprotect = {
enable = true;
# if you need a Host Integrity Protection report
csdWrapper = "${pkgs.openconnect}/libexec/openconnect/hipreport.sh";
};
environment.systemPackages = [ globalprotect-openconnect ];
```
## [License](./LICENSE) ## [License](./LICENSE)

2
debian/control vendored
View File

@@ -2,7 +2,7 @@ Source: globalprotect-openconnect
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Kevin Yue <k3vinyue@gmail.com> Maintainer: Kevin Yue <k3vinyue@gmail.com>
Build-Depends: debhelper (>=11~), qt5-default (>=5.9), qttools5-dev (>=5.9), libqt5websockets5-dev (>=5.9), qtwebengine5-dev (>=5.9) Build-Depends: debhelper (>=11~), qtbase5-dev, qttools5-dev (>=5.9), libqt5websockets5-dev (>=5.9), qtwebengine5-dev (>=5.9)
Standards-Version: 4.1.4 Standards-Version: 4.1.4
Homepage: https://github.com/yuezk/GlobalProtect-openconnect Homepage: https://github.com/yuezk/GlobalProtect-openconnect