mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
feat: add gpclient session refresh support (#595)
* Add session info events for GUI warnings * fix macOS local build * fix session expiry parsing * chore: remove session info debug logging * fix: decouple session info from vpn connect * refactor: share gpapi response helpers * fix: restore blocking session info fetch * refactor: remove service session info flow * refactor: share session protocol helpers * refactor: separate cli session runtime
This commit is contained in:
13 files changed
+800
-16
No files matched your search
@@ -1,4 +1,4 @@
|
||||
pub(crate) mod xml;
|
||||
pub mod xml;
|
||||
|
||||
pub mod base64;
|
||||
pub mod checksum;
|
||||
@@ -48,7 +48,7 @@ pub fn remove_url_scheme(s: &str) -> String {
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
#[error("GP response error: reason={reason}, status={status}, body={body}")]
|
||||
pub(crate) struct GpError {
|
||||
pub struct GpError {
|
||||
pub status: StatusCode,
|
||||
pub reason: String,
|
||||
body: String,
|
||||
@@ -60,7 +60,7 @@ impl GpError {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn parse_gp_response(res: Response) -> anyhow::Result<String, GpError> {
|
||||
pub async fn parse_gp_response(res: Response) -> anyhow::Result<String, GpError> {
|
||||
let status = res.status();
|
||||
|
||||
if status.is_client_error() || status.is_server_error() {
|
||||
|
||||
Reference in new issue
Block a user