diff --git a/Cargo.lock b/Cargo.lock index 0f16567..05af74c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -801,8 +801,9 @@ dependencies = [ [[package]] name = "libunftp" -version = "0.9.0" -source = "git+https://github.com/bolcom/libunftp#332a7856a3f87c2a878e3d18e634854a8317c111" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0ea1210bf4af89f8ae543f66a726778c7519c529bf793077f5e39d09af43116" dependencies = [ "async-trait", "bytes 0.5.4", @@ -2031,7 +2032,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "unftp" -version = "0.8.4" +version = "0.9.0" dependencies = [ "async-trait", "built", diff --git a/Cargo.toml b/Cargo.toml index d478995..94457a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "unftp" -version = "0.8.4" +version = "0.9.0" authors = [ "Agoston Horvath ", "Dávid Kosztka ", @@ -18,7 +18,7 @@ readme = "README.md" [dependencies] async-trait = "0.1.30" -libunftp = { git="https://github.com/bolcom/libunftp", branch="master" } +libunftp = "0.10.0" log = "0.4" env_logger = "0.6" redis = "0.9.0" diff --git a/src/args.rs b/src/args.rs index ee08115..3e9da16 100644 --- a/src/args.rs +++ b/src/args.rs @@ -14,10 +14,10 @@ pub const FTPS_CERTS_FILE: &str = "ftps-certs-file"; pub const FTPS_CERTS_PASSWORD: &str = "ftps-certs-password"; pub const GCS_BUCKET: &str = "sbe-gcs-bucket"; pub const GCS_KEY_FILE: &str = "sbe-gcs-key-file"; -pub const HTTP_BIND_ADDR: &str = "bind-address-http"; +pub const HTTP_BIND_ADDRESS: &str = "bind-address-http"; pub const IDLE_SESSION_TIMEOUT: &str = "idle-session-timeout"; pub const PASSIVE_PORTS: &str = "passive-ports"; -pub const PROXY_EXTERNAL_CONTROL_ADDRES: &str = "proxy-external-control-address"; +pub const PROXY_EXTERNAL_CONTROL_ADDRESS: &str = "proxy-external-control-address"; pub const REDIS_HOST: &str = "log-redis-host"; pub const REDIS_KEY: &str = "log-redis-key"; pub const REDIS_PORT: &str = "log-redis-port"; @@ -116,7 +116,7 @@ pub(crate) fn clap_app(tmp_dir: &str) -> clap::App { .takes_value(true), ) .arg( - Arg::with_name(HTTP_BIND_ADDR) + Arg::with_name(HTTP_BIND_ADDRESS) .long("bind-address-http") .value_name("HOST_PORT") .help("Sets the host and port for the HTTP server used by prometheus metrics collection") @@ -237,7 +237,7 @@ pub(crate) fn clap_app(tmp_dir: &str) -> clap::App { .default_value("600"), ) .arg( - Arg::with_name(PROXY_EXTERNAL_CONTROL_ADDRES) + Arg::with_name(PROXY_EXTERNAL_CONTROL_ADDRESS) .long("proxy-external-control-address") .value_name("HOST_PORT") .help("This switches on proxy protocol mode and sets the external IP and external control port number for example 10.0.0.1:2121.") diff --git a/src/main.rs b/src/main.rs index 17defe2..0ba97e2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -266,7 +266,7 @@ where .metrics(); // Setup proxy protocol mode. - if let Some(addr) = arg_matches.value_of(args::PROXY_EXTERNAL_CONTROL_ADDRES) { + if let Some(addr) = arg_matches.value_of(args::PROXY_EXTERNAL_CONTROL_ADDRESS) { let addr: SocketAddr = String::from(addr).parse().map_err(|e| { format!( "unable to parse proxy protocol external control port address {}: {}", @@ -330,7 +330,7 @@ async fn start_http(log: &Logger, bind_addr: &str) -> Result<(), String> { } async fn main_task(arg_matches: ArgMatches<'_>, log: &Logger) -> Result<(), String> { - if let Some(addr) = arg_matches.value_of(args::HTTP_BIND_ADDR) { + if let Some(addr) = arg_matches.value_of(args::HTTP_BIND_ADDRESS) { let addr = String::from(addr); let log = log.clone(); tokio::spawn(async move {