mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Compare commits
8 Commits
4fbd373e29
...
v2.2.1
Author | SHA1 | Date | |
---|---|---|---|
|
200d13ef15 | ||
|
ddeef46d2e | ||
|
97c3998383 | ||
|
93aea4ee60 | ||
|
546dbf542e | ||
|
005410d40b | ||
|
3b384a199a | ||
|
b62b024a8b |
16
Cargo.lock
generated
16
Cargo.lock
generated
@@ -564,7 +564,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common"
|
name = "common"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"is_executable",
|
"is_executable",
|
||||||
]
|
]
|
||||||
@@ -1430,7 +1430,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpapi"
|
name = "gpapi"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.21.5",
|
"base64 0.21.5",
|
||||||
@@ -1439,6 +1439,7 @@ dependencies = [
|
|||||||
"dotenvy_macro",
|
"dotenvy_macro",
|
||||||
"log",
|
"log",
|
||||||
"md5",
|
"md5",
|
||||||
|
"open",
|
||||||
"redact-engine",
|
"redact-engine",
|
||||||
"regex",
|
"regex",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
@@ -1461,7 +1462,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpauth"
|
name = "gpauth"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -1470,7 +1471,6 @@ dependencies = [
|
|||||||
"gpapi",
|
"gpapi",
|
||||||
"html-escape",
|
"html-escape",
|
||||||
"log",
|
"log",
|
||||||
"open",
|
|
||||||
"regex",
|
"regex",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri",
|
"tauri",
|
||||||
@@ -1483,7 +1483,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpclient"
|
name = "gpclient"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -1505,7 +1505,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpgui-helper"
|
name = "gpgui-helper"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -1523,7 +1523,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpservice"
|
name = "gpservice"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -2537,7 +2537,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openconnect"
|
name = "openconnect"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"common",
|
"common",
|
||||||
|
@@ -5,7 +5,7 @@ members = ["crates/*", "apps/gpclient", "apps/gpservice", "apps/gpauth", "apps/g
|
|||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
rust-version = "1.70"
|
rust-version = "1.70"
|
||||||
version = "2.1.4"
|
version = "2.2.1"
|
||||||
authors = ["Kevin Yue <k3vinyue@gmail.com>"]
|
authors = ["Kevin Yue <k3vinyue@gmail.com>"]
|
||||||
homepage = "https://github.com/yuezk/GlobalProtect-openconnect"
|
homepage = "https://github.com/yuezk/GlobalProtect-openconnect"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -44,7 +44,6 @@ compile-time = "0.2"
|
|||||||
serde_urlencoded = "0.7"
|
serde_urlencoded = "0.7"
|
||||||
md5="0.7"
|
md5="0.7"
|
||||||
sha256="1"
|
sha256="1"
|
||||||
open = "5"
|
|
||||||
|
|
||||||
# Tauri dependencies
|
# Tauri dependencies
|
||||||
tauri = { version = "1.5" }
|
tauri = { version = "1.5" }
|
||||||
|
57
README.md
57
README.md
@@ -43,6 +43,12 @@ Options:
|
|||||||
See 'gpclient help <command>' for more information on a specific command.
|
See 'gpclient help <command>' for more information on a specific command.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To use the default browser for authentication with the CLI version, you need to use the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo -E gpclient connect --default-browser <portal>
|
||||||
|
```
|
||||||
|
|
||||||
### GUI
|
### GUI
|
||||||
|
|
||||||
The GUI version is also available after you installed it. You can launch it from the application menu or run `gpclient launch-gui` in the terminal.
|
The GUI version is also available after you installed it. You can launch it from the application menu or run `gpclient launch-gui` in the terminal.
|
||||||
@@ -55,7 +61,7 @@ The GUI version is also available after you installed it. You can launch it from
|
|||||||
|
|
||||||
### Debian/Ubuntu based distributions
|
### Debian/Ubuntu based distributions
|
||||||
|
|
||||||
#### Install from PPA
|
#### Install from PPA (Ubuntu 18.04 and later, except 24.04)
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt-get install gir1.2-gtk-3.0 gir1.2-webkit2-4.0
|
sudo apt-get install gir1.2-gtk-3.0 gir1.2-webkit2-4.0
|
||||||
@@ -68,12 +74,29 @@ 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`.
|
||||||
|
|
||||||
#### Install from deb package
|
#### **Ubuntu 24.04**
|
||||||
|
|
||||||
Download the latest deb package from [releases](https://github.com/yuezk/GlobalProtect-openconnect/releases) page. Then install it with `dpkg`:
|
The `libwebkit2gtk-4.0-37` package was [removed](https://bugs.launchpad.net/ubuntu/+source/webkit2gtk/+bug/2061914) from its repo, before [the issue](https://github.com/yuezk/GlobalProtect-openconnect/issues/351) gets resolved, you need to install them manually:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dpkg -i globalprotect-openconnect_*.deb
|
wget http://launchpadlibrarian.net/704701349/libwebkit2gtk-4.0-37_2.43.3-1_amd64.deb
|
||||||
|
wget http://launchpadlibrarian.net/704701345/libjavascriptcoregtk-4.0-18_2.43.3-1_amd64.deb
|
||||||
|
|
||||||
|
sudo dpkg --install *.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
And the latest package is not available in the PPA, you can follow the [Install from deb package](#install-from-deb-package) section to install the latest package.
|
||||||
|
|
||||||
|
#### **Ubuntu 18.04**
|
||||||
|
|
||||||
|
The latest package is not available in the PPA either, but you still needs to add the `ppa:yuezk/globalprotect-openconnect` repo beforehand to use the required `openconnect` package. Then you can follow the [Install from deb package](#install-from-deb-package) section to install the latest package.
|
||||||
|
|
||||||
|
#### Install from deb package
|
||||||
|
|
||||||
|
Download the latest deb package from [releases](https://github.com/yuezk/GlobalProtect-openconnect/releases) page. Then install it with `apt`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install --fix-broken globalprotect-openconnect_*.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arch Linux / Manjaro
|
### Arch Linux / Manjaro
|
||||||
@@ -120,6 +143,30 @@ Download the latest RPM package from [releases](https://github.com/yuezk/GlobalP
|
|||||||
```bash
|
```bash
|
||||||
sudo rpm -i globalprotect-openconnect-*.rpm
|
sudo rpm -i globalprotect-openconnect-*.rpm
|
||||||
```
|
```
|
||||||
|
### Gentoo
|
||||||
|
|
||||||
|
Install from the ```rios``` or ```slonko``` overlays. Example using rios:
|
||||||
|
|
||||||
|
#### 1. Enable the overlay
|
||||||
|
```
|
||||||
|
sudo eselect repository enable rios
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. Sync with the repository
|
||||||
|
|
||||||
|
- If you have eix installed, use it:
|
||||||
|
```
|
||||||
|
sudo eix-sync
|
||||||
|
```
|
||||||
|
- Otherwise, use:
|
||||||
|
```
|
||||||
|
sudo emerge --sync
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. Install
|
||||||
|
|
||||||
|
```sudo emerge globalprotect-openconnect```
|
||||||
|
|
||||||
|
|
||||||
### Other distributions
|
### Other distributions
|
||||||
|
|
||||||
@@ -151,6 +198,8 @@ You can also build the client from source, steps are as follows:
|
|||||||
|
|
||||||
1. How to deal with error `Secure Storage not ready`
|
1. How to deal with error `Secure Storage not ready`
|
||||||
|
|
||||||
|
Try upgrade the client to `2.2.0` or later, which will use a file-based storage as a fallback.
|
||||||
|
|
||||||
You need to install the `gnome-keyring` package, and restart the system (See [#321](https://github.com/yuezk/GlobalProtect-openconnect/issues/321), [#316](https://github.com/yuezk/GlobalProtect-openconnect/issues/316)).
|
You need to install the `gnome-keyring` package, and restart the system (See [#321](https://github.com/yuezk/GlobalProtect-openconnect/issues/321), [#316](https://github.com/yuezk/GlobalProtect-openconnect/issues/316)).
|
||||||
|
|
||||||
2. How to deal with error `(gpauth:18869): Gtk-WARNING **: 10:33:37.566: cannot open display:`
|
2. How to deal with error `(gpauth:18869): Gtk-WARNING **: 10:33:37.566: cannot open display:`
|
||||||
|
@@ -8,7 +8,11 @@ license.workspace = true
|
|||||||
tauri-build = { version = "1.5", features = [] }
|
tauri-build = { version = "1.5", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
gpapi = { path = "../../crates/gpapi", features = ["tauri", "clap"] }
|
gpapi = { path = "../../crates/gpapi", features = [
|
||||||
|
"tauri",
|
||||||
|
"clap",
|
||||||
|
"browser-auth",
|
||||||
|
] }
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
env_logger.workspace = true
|
env_logger.workspace = true
|
||||||
@@ -22,4 +26,3 @@ html-escape = "0.2.13"
|
|||||||
webkit2gtk = "0.18.2"
|
webkit2gtk = "0.18.2"
|
||||||
tauri = { workspace = true, features = ["http-all"] }
|
tauri = { workspace = true, features = ["http-all"] }
|
||||||
compile-time.workspace = true
|
compile-time.workspace = true
|
||||||
open.workspace = true
|
|
||||||
|
@@ -3,6 +3,7 @@ use gpapi::{
|
|||||||
auth::{SamlAuthData, SamlAuthResult},
|
auth::{SamlAuthData, SamlAuthResult},
|
||||||
clap::args::Os,
|
clap::args::Os,
|
||||||
gp_params::{ClientOs, GpParams},
|
gp_params::{ClientOs, GpParams},
|
||||||
|
process::browser_authenticator::BrowserAuthenticator,
|
||||||
utils::{normalize_server, openssl},
|
utils::{normalize_server, openssl},
|
||||||
GP_USER_AGENT,
|
GP_USER_AGENT,
|
||||||
};
|
};
|
||||||
@@ -11,10 +12,7 @@ use serde_json::json;
|
|||||||
use tauri::{App, AppHandle, RunEvent};
|
use tauri::{App, AppHandle, RunEvent};
|
||||||
use tempfile::NamedTempFile;
|
use tempfile::NamedTempFile;
|
||||||
|
|
||||||
use crate::{
|
use crate::auth_window::{portal_prelogin, AuthWindow};
|
||||||
auth_window::{portal_prelogin, AuthWindow},
|
|
||||||
browser_authenticator::BrowserAuthenticator,
|
|
||||||
};
|
|
||||||
|
|
||||||
const VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), " (", compile_time::date_str!(), ")");
|
const VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), " (", compile_time::date_str!(), ")");
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
|
|
||||||
mod auth_window;
|
mod auth_window;
|
||||||
mod browser_authenticator;
|
|
||||||
mod cli;
|
mod cli;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2.2.1 - 2024-05-07
|
||||||
|
|
||||||
|
- GUI: Restore the default browser auth implementation (fix [#360](https://github.com/yuezk/GlobalProtect-openconnect/issues/360))
|
||||||
|
|
||||||
|
## 2.2.0 - 2024-04-30
|
||||||
|
|
||||||
|
- CLI: support authentication with external browser (fix [#298](https://github.com/yuezk/GlobalProtect-openconnect/issues/298))
|
||||||
|
- GUI: support using file-based storage when the system keyring is not available.
|
||||||
|
|
||||||
## 2.1.4 - 2024-04-10
|
## 2.1.4 - 2024-04-10
|
||||||
|
|
||||||
- Support MFA authentication (fix [#343](https://github.com/yuezk/GlobalProtect-openconnect/issues/343))
|
- Support MFA authentication (fix [#343](https://github.com/yuezk/GlobalProtect-openconnect/issues/343))
|
||||||
|
@@ -31,7 +31,9 @@ sha256.workspace = true
|
|||||||
|
|
||||||
tauri = { workspace = true, optional = true }
|
tauri = { workspace = true, optional = true }
|
||||||
clap = { workspace = true, optional = true }
|
clap = { workspace = true, optional = true }
|
||||||
|
open = { version = "5", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
tauri = ["dep:tauri"]
|
tauri = ["dep:tauri"]
|
||||||
clap = ["dep:clap"]
|
clap = ["dep:clap"]
|
||||||
|
browser-auth = ["dep:open"]
|
||||||
|
@@ -2,6 +2,8 @@ pub(crate) mod command_traits;
|
|||||||
pub(crate) mod gui_helper_launcher;
|
pub(crate) mod gui_helper_launcher;
|
||||||
|
|
||||||
pub mod auth_launcher;
|
pub mod auth_launcher;
|
||||||
|
#[cfg(feature = "browser-auth")]
|
||||||
|
pub mod browser_authenticator;
|
||||||
pub mod gui_launcher;
|
pub mod gui_launcher;
|
||||||
pub mod hip_launcher;
|
pub mod hip_launcher;
|
||||||
pub mod service_launcher;
|
pub mod service_launcher;
|
||||||
|
Reference in New Issue
Block a user