Report server version in doctor
This commit is contained in:
@@ -606,6 +606,14 @@ async fn run_doctor_command(config: &dosh::config::ClientConfig, args: &Args) ->
|
|||||||
{
|
{
|
||||||
Ok(check) => {
|
Ok(check) => {
|
||||||
println!("[ok] native udp: reachable");
|
println!("[ok] native udp: reachable");
|
||||||
|
println!(
|
||||||
|
"[ok] server version: {}",
|
||||||
|
if check.server_version.is_empty() {
|
||||||
|
"<unknown>"
|
||||||
|
} else {
|
||||||
|
&check.server_version
|
||||||
|
}
|
||||||
|
);
|
||||||
println!("[ok] known host: trusted");
|
println!("[ok] known host: trusted");
|
||||||
println!("[ok] native auth: authorized as {}", check.requested_user);
|
println!("[ok] native auth: authorized as {}", check.requested_user);
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
@@ -524,6 +524,7 @@ async fn handle_native_user_auth(
|
|||||||
allow_remote_forwarding: locked.config.allow_remote_forwarding,
|
allow_remote_forwarding: locked.config.allow_remote_forwarding,
|
||||||
allow_agent_forwarding: locked.config.allow_agent_forwarding,
|
allow_agent_forwarding: locked.config.allow_agent_forwarding,
|
||||||
policy_flags: Vec::new(),
|
policy_flags: Vec::new(),
|
||||||
|
server_version: env!("CARGO_PKG_VERSION").to_string(),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let body = protocol::to_body(&check)?;
|
let body = protocol::to_body(&check)?;
|
||||||
|
|||||||
@@ -290,6 +290,8 @@ pub struct NativeAuthCheckOkBody {
|
|||||||
pub allow_remote_forwarding: bool,
|
pub allow_remote_forwarding: bool,
|
||||||
pub allow_agent_forwarding: bool,
|
pub allow_agent_forwarding: bool,
|
||||||
pub policy_flags: Vec<String>,
|
pub policy_flags: Vec<String>,
|
||||||
|
#[serde(default)]
|
||||||
|
pub server_version: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
|||||||
Reference in New Issue
Block a user