use std::net::SocketAddr;
mod commands;
mod connector;
mod feat;
mod ftp_finish;
mod negotiation;
mod parser;
mod proxy_get;
mod proxy_tunnel;
mod tls;
mod transfer;
mod types;
pub(crate) fn active_data_bind_addr(local_addr: SocketAddr) -> SocketAddr {
SocketAddr::new(local_addr.ip(), 0)
}
#[cfg(test)]
mod tests;
pub use types::{
FtpClient, FtpControlStream, FtpDataStream, FtpFeatures, FtpFileInfo, FtpMode, FtpResponse,
FtpTlsMode, FtpsConfig, TlsVersion,
};
pub use tls::{
build_tls_connector, perform_tls_handshake, upgrade_control_stream, upgrade_data_stream,
};
pub use negotiation::{
FtpDataProxyConfig, FtpNegotiationConfig, FtpNegotiationResult, FtpNegotiator, FtpTransferType,
RawFtpControl, ServerCapabilities,
};
pub(crate) use negotiation::{
cwd_targets, parse_mdtm_timestamp, parse_pwd_response, percent_decode, read_response_impl,
split_decoded_remote_path,
};
pub use ftp_finish::{FtpFinishConfig, FtpFinishHandler, FtpFinishResult, PooledFtpControl};
pub use proxy_tunnel::{FtpProxyTunnel, FtpProxyTunnelConfig, FtpProxyTunnelResult};
pub use proxy_get::{
FtpProxyConfig, FtpProxyGetRequest, FtpProxyGetRequestBuilder, FtpProxyGetResponse,
ProxyMethod, execute_proxy_get, resolve_proxy_method,
};