mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Improve code style
This commit is contained in:
@@ -130,13 +130,15 @@ pub struct GpParamsBuilder {
|
||||
|
||||
impl GpParamsBuilder {
|
||||
pub fn new() -> Self {
|
||||
let computer = whoami::fallible::hostname().unwrap_or_else(|_| String::from("localhost"));
|
||||
|
||||
Self {
|
||||
is_gateway: false,
|
||||
user_agent: GP_USER_AGENT.to_string(),
|
||||
client_os: ClientOs::Linux,
|
||||
os_version: Default::default(),
|
||||
client_version: Default::default(),
|
||||
computer: whoami::hostname(),
|
||||
computer,
|
||||
ignore_tls_errors: false,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user