mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-11-10 09:12:56 +08:00
lint
This commit is contained in:
parent
c5cf5bf1d1
commit
744d686027
3 changed files with 13 additions and 5 deletions
|
@ -18,7 +18,8 @@ use russh_keys::PublicKeyBase64;
|
|||
pub use server::run_server;
|
||||
use uuid::Uuid;
|
||||
use warpgate_common::{
|
||||
ProtocolName, ProtocolServer, Services, Target, TargetOptions, TargetTestError, SshHostKeyVerificationMode,
|
||||
ProtocolName, ProtocolServer, Services, SshHostKeyVerificationMode, Target, TargetOptions,
|
||||
TargetTestError,
|
||||
};
|
||||
|
||||
use crate::client::{RCCommand, RemoteClient};
|
||||
|
@ -82,7 +83,15 @@ impl ProtocolServer for SSHProtocolServer {
|
|||
println!("\nHost key ({}): {}", key.name(), key.public_key_base64());
|
||||
println!("There is no trusted {} key for this host.", key.name());
|
||||
|
||||
match self.services.config.lock().await.store.ssh.host_key_verification {
|
||||
match self
|
||||
.services
|
||||
.config
|
||||
.lock()
|
||||
.await
|
||||
.store
|
||||
.ssh
|
||||
.host_key_verification
|
||||
{
|
||||
SshHostKeyVerificationMode::AutoAccept => {
|
||||
let _ = reply.send(true);
|
||||
}
|
||||
|
|
|
@ -1064,8 +1064,7 @@ impl ServerSession {
|
|||
};
|
||||
|
||||
login_url.set_path("@warpgate");
|
||||
login_url
|
||||
.set_fragment(Some(&format!("/login/{auth_state_id}")));
|
||||
login_url.set_fragment(Some(&format!("/login/{auth_state_id}")));
|
||||
|
||||
russh::server::Auth::Partial {
|
||||
name: Cow::Owned(format!(
|
||||
|
|
|
@ -53,7 +53,7 @@ pub(crate) async fn command(cli: &crate::Cli, target_name: &String) -> Result<()
|
|||
}
|
||||
Ok(()) => {
|
||||
info!("Connection successful!");
|
||||
return Ok(())
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue