Report server version in doctor
ci / test (push) Has been cancelled
ci / remote-bench (push) Has been cancelled

This commit is contained in:
DuProcess
2026-06-13 22:34:09 -04:00
parent f66de64b3f
commit dd9c4daeda
3 changed files with 11 additions and 0 deletions
+8
View File
@@ -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!(
+1
View File
@@ -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)?;
+2
View File
@@ -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)]