Add configuration option for SSH server socket address
Diff
config.toml | 3 +++
src/config.rs | 3 ++-
src/main.rs | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
@@ -1,3 +1,6 @@
listen-address = "[::]:2222"
state-directory = "/var/lib/gitlab-cargo-shim"
@@ -1,8 +1,8 @@
#![allow(clippy::module_name_repetitions)]
use clap::Parser;
use serde::{de::DeserializeOwned, Deserialize};
use std::path::PathBuf;
use std::{path::PathBuf, net::SocketAddr};
use url::Url;
#[derive(Parser)]
@@ -15,6 +15,7 @@
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct Config {
pub listen_address: SocketAddr,
pub state_directory: PathBuf,
pub gitlab: GitlabConfig,
}
@@ -97,7 +97,7 @@
thrussh::server::run(
thrussh_config,
"127.0.0.1:2210",
&args.config.listen_address.to_string(),
Server {
gitlab,
metadata_cache: MetadataCache::default(),