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:
Kevin Yue committed 2026-05-06 23:20:57 +08:00
1 parent 1d715f059d
commit cdcf03ff2f
13 files changed
+800 -16

No files matched your search

+3 -3
View File
@@ -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() {