diff --git a/src/bin/dosh-client.rs b/src/bin/dosh-client.rs index 7d54774..746b11b 100644 --- a/src/bin/dosh-client.rs +++ b/src/bin/dosh-client.rs @@ -606,6 +606,14 @@ async fn run_doctor_command(config: &dosh::config::ClientConfig, args: &Args) -> { Ok(check) => { println!("[ok] native udp: reachable"); + println!( + "[ok] server version: {}", + if check.server_version.is_empty() { + "" + } else { + &check.server_version + } + ); println!("[ok] known host: trusted"); println!("[ok] native auth: authorized as {}", check.requested_user); println!( diff --git a/src/bin/dosh-server.rs b/src/bin/dosh-server.rs index e241236..2f5f90e 100644 --- a/src/bin/dosh-server.rs +++ b/src/bin/dosh-server.rs @@ -524,6 +524,7 @@ async fn handle_native_user_auth( allow_remote_forwarding: locked.config.allow_remote_forwarding, allow_agent_forwarding: locked.config.allow_agent_forwarding, policy_flags: Vec::new(), + server_version: env!("CARGO_PKG_VERSION").to_string(), } }; let body = protocol::to_body(&check)?; diff --git a/src/protocol.rs b/src/protocol.rs index ebbc2fc..ac6ac84 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -290,6 +290,8 @@ pub struct NativeAuthCheckOkBody { pub allow_remote_forwarding: bool, pub allow_agent_forwarding: bool, pub policy_flags: Vec, + #[serde(default)] + pub server_version: String, } #[derive(Debug, Clone, Serialize, Deserialize)]