优化部署
This commit is contained in:
@@ -13,7 +13,7 @@ use crate::rtr::cache::SharedRtrCache;
|
||||
use crate::rtr::server::config::RtrServiceConfig;
|
||||
use crate::rtr::server::listener::RtrServer;
|
||||
use crate::rtr::server::notifier::RtrNotifier;
|
||||
use crate::rtr::server::ssh::load_rtr_ssh_runtime_config;
|
||||
use crate::rtr::server::ssh::{SshAuthMode, load_rtr_ssh_runtime_config};
|
||||
|
||||
pub struct RtrService {
|
||||
cache: SharedRtrCache,
|
||||
@@ -167,6 +167,7 @@ impl RtrService {
|
||||
authorized_keys_path: impl AsRef<Path>,
|
||||
username: &str,
|
||||
subsystem_name: &str,
|
||||
auth_mode: SshAuthMode,
|
||||
password: Option<&str>,
|
||||
) -> JoinHandle<()> {
|
||||
let host_key_path = host_key_path.as_ref().to_path_buf();
|
||||
@@ -184,6 +185,7 @@ impl RtrService {
|
||||
&authorized_keys_path,
|
||||
&username,
|
||||
&subsystem_name,
|
||||
auth_mode,
|
||||
password.as_deref(),
|
||||
inactivity_timeout,
|
||||
keepalive_interval,
|
||||
@@ -213,6 +215,7 @@ impl RtrService {
|
||||
authorized_keys_path: impl AsRef<Path>,
|
||||
username: &str,
|
||||
subsystem_name: &str,
|
||||
auth_mode: SshAuthMode,
|
||||
password: Option<&str>,
|
||||
) -> RunningRtrService {
|
||||
let tcp_handle = self.spawn_tcp(tcp_bind_addr);
|
||||
@@ -222,6 +225,7 @@ impl RtrService {
|
||||
authorized_keys_path,
|
||||
username,
|
||||
subsystem_name,
|
||||
auth_mode,
|
||||
password,
|
||||
);
|
||||
|
||||
@@ -244,6 +248,7 @@ impl RtrService {
|
||||
authorized_keys_path: impl AsRef<Path>,
|
||||
username: &str,
|
||||
subsystem_name: &str,
|
||||
auth_mode: SshAuthMode,
|
||||
password: Option<&str>,
|
||||
) -> RunningRtrService {
|
||||
let tcp_handle = self.spawn_tcp(tcp_bind_addr);
|
||||
@@ -255,6 +260,7 @@ impl RtrService {
|
||||
authorized_keys_path,
|
||||
username,
|
||||
subsystem_name,
|
||||
auth_mode,
|
||||
password,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user