mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-29 22:26:26 -04:00
Compare commits
No commits in common. "d97b3ba350a396347d1a1f770a7f04cde741a59d" and "e69de988849bbce9f18f73b089b6d0af57177db8" have entirely different histories.
d97b3ba350
...
e69de98884
8
.github/workflows/build.yaml
vendored
8
.github/workflows/build.yaml
vendored
@ -9,9 +9,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- hotfix/*
|
||||
- feature/*
|
||||
- release/*
|
||||
tags:
|
||||
- latest
|
||||
- v*.*.*
|
||||
@ -45,7 +42,6 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
repository: yuezk/GlobalProtect-openconnect
|
||||
ref: ${{ github.ref }}
|
||||
path: source/gp
|
||||
- name: Create tarball
|
||||
run: |
|
||||
@ -118,14 +114,12 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
repository: yuezk/GlobalProtect-openconnect
|
||||
ref: ${{ github.ref }}
|
||||
path: gpgui-source/gp
|
||||
- name: Checkout gpgui@${{ github.ref_name }}
|
||||
- name: Checkout gpgui
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
repository: yuezk/gpgui
|
||||
ref: ${{ github.ref_name }}
|
||||
path: gpgui-source/gpgui
|
||||
- name: Tarball
|
||||
run: |
|
||||
|
14
Cargo.lock
generated
14
Cargo.lock
generated
@ -564,7 +564,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "common"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"is_executable",
|
||||
]
|
||||
@ -1430,7 +1430,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpapi"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.5",
|
||||
@ -1462,7 +1462,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpauth"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1482,7 +1482,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpclient"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1504,7 +1504,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpgui-helper"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1522,7 +1522,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpservice"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@ -2527,7 +2527,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "openconnect"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"common",
|
||||
|
@ -5,7 +5,7 @@ members = ["crates/*", "apps/gpclient", "apps/gpservice", "apps/gpauth", "apps/g
|
||||
|
||||
[workspace.package]
|
||||
rust-version = "1.70"
|
||||
version = "2.1.2"
|
||||
version = "2.1.1"
|
||||
authors = ["Kevin Yue <k3vinyue@gmail.com>"]
|
||||
homepage = "https://github.com/yuezk/GlobalProtect-openconnect"
|
||||
edition = "2021"
|
||||
|
@ -153,7 +153,7 @@ impl<'a> ConnectHandler<'a> {
|
||||
}
|
||||
|
||||
async fn connect_gateway_with_prelogin(&self, gateway: &str) -> anyhow::Result<()> {
|
||||
info!("Performing the gateway authentication...");
|
||||
info!("Treat the portal as the gateway, connecting...");
|
||||
|
||||
let mut gp_params = self.build_gp_params();
|
||||
gp_params.set_is_gateway(true);
|
||||
|
@ -1,9 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 2.1.2 - 2024-03-29
|
||||
|
||||
- Treat portal as gateway when the gateway login is failed (fix #338)
|
||||
|
||||
## 2.1.1 - 2024-03-25
|
||||
|
||||
- Add the `--hip` option to enable HIP report
|
||||
|
@ -6,6 +6,6 @@ pub enum PortalError {
|
||||
PreloginError(String),
|
||||
#[error("Portal config error: {0}")]
|
||||
ConfigError(String),
|
||||
#[error("Network error: {0}")]
|
||||
NetworkError(String),
|
||||
#[error("Gateway error: {0}")]
|
||||
GatewayError(String),
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ pub async fn gateway_login(gateway: &str, cred: &Credential, gp_params: &GpParam
|
||||
.form(¶ms)
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| anyhow::anyhow!(PortalError::NetworkError(e.to_string())))?;
|
||||
.map_err(|e| anyhow::anyhow!(PortalError::GatewayError(e.to_string())))?;
|
||||
|
||||
let status = res.status();
|
||||
|
||||
|
@ -102,12 +102,7 @@ pub async fn retrieve_config(portal: &str, cred: &Credential, gp_params: &GpPara
|
||||
|
||||
info!("Portal config, user_agent: {}", gp_params.user_agent());
|
||||
|
||||
let res = client
|
||||
.post(&url)
|
||||
.form(¶ms)
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| anyhow::anyhow!(PortalError::NetworkError(e.to_string())))?;
|
||||
let res = client.post(&url).form(¶ms).send().await?;
|
||||
let status = res.status();
|
||||
|
||||
if status == StatusCode::NOT_FOUND {
|
||||
|
@ -118,12 +118,7 @@ pub async fn prelogin(portal: &str, gp_params: &GpParams) -> anyhow::Result<Prel
|
||||
.user_agent(user_agent)
|
||||
.build()?;
|
||||
|
||||
let res = client
|
||||
.post(&prelogin_url)
|
||||
.form(¶ms)
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| anyhow::anyhow!(PortalError::NetworkError(e.to_string())))?;
|
||||
let res = client.post(&prelogin_url).form(¶ms).send().await?;
|
||||
let status = res.status();
|
||||
|
||||
if status == StatusCode::NOT_FOUND {
|
||||
|
Loading…
x
Reference in New Issue
Block a user