mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
7a8514bdfa
The session watchdog now selects its detection method per platform. It previously probed kernel TCP state through a Linux-only procfs path, so on macOS every healthy idle session was killed within a minute, and on Windows the watchdog never spawned at all, leaving wedged sessions with no cleanup. Linux keeps its fast-kill watchdog unchanged. Other platforms get a silence-only backstop that kills a session only at the documented 30-minute idle ceiling. The host-key loader now has a Windows arm. It loads OpenSSH format host keys from the configured directory and logs a one-time warning to restrict NTFS ACLs on the key directory, the same operator-managed approach FTPS, WebDAV, KMS, and IAM already use on Windows. Startup previously aborted with UnsupportedPlatform because the Unix mode-bit permission check has no Windows equivalent. tokio's io-uring feature is now enabled only in Linux builds. io-uring is a Linux kernel interface and enabling it unconditionally broke the Windows build. Co-authored-by: houseme <housemecn@gmail.com>
143 lines
4.8 KiB
TOML
143 lines
4.8 KiB
TOML
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
[package]
|
|
name = "rustfs-protocols"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
homepage.workspace = true
|
|
description = "Protocol implementations for RustFS (FTPS, SFTP, etc.)"
|
|
keywords = ["ftp", "sftp", "protocol", "storage", "rustfs"]
|
|
categories = ["network-programming", "filesystem"]
|
|
|
|
[features]
|
|
default = []
|
|
ftps = ["dep:libunftp", "dep:unftp-core", "dep:rustls", "dep:rustfs-tls-runtime"]
|
|
swift = [
|
|
"dep:rustfs-keystone",
|
|
"dep:rustfs-ecstore",
|
|
"dep:rustfs-rio",
|
|
"dep:axum",
|
|
"dep:http",
|
|
"dep:tower",
|
|
"dep:regex",
|
|
"dep:percent-encoding",
|
|
"dep:sha2",
|
|
"dep:uuid",
|
|
"dep:futures",
|
|
"dep:http-body-util",
|
|
"dep:tokio-util",
|
|
"dep:serde",
|
|
"dep:urlencoding",
|
|
"dep:md5",
|
|
"dep:quick-xml",
|
|
"dep:hmac",
|
|
"dep:sha1",
|
|
"dep:hex",
|
|
"dep:astral-tokio-tar",
|
|
"dep:base64",
|
|
"dep:async-compression",
|
|
]
|
|
webdav = ["dep:dav-server", "dep:hyper", "dep:hyper-util", "dep:http-body-util", "dep:tokio-rustls", "dep:base64", "dep:rustls", "dep:percent-encoding", "dep:rustfs-tls-runtime"]
|
|
sftp = ["dep:russh", "dep:russh-sftp", "dep:uuid", "dep:subtle", "dep:tokio-util", "dep:socket2"]
|
|
|
|
[dependencies]
|
|
# Core RustFS dependencies
|
|
rustfs-iam = { workspace = true }
|
|
rustfs-credentials = { workspace = true }
|
|
rustfs-policy = { workspace = true }
|
|
rustfs-utils = { workspace = true }
|
|
rustfs-config = { workspace = true }
|
|
rustfs-storage-api = { workspace = true }
|
|
rustfs-tls-runtime = { workspace = true, optional = true }
|
|
|
|
# Async dependencies
|
|
tokio = { workspace = true, features = ["fs", "io-util", "sync", "time"] }
|
|
tracing = { workspace = true }
|
|
futures-util = { workspace = true }
|
|
|
|
# Error handling
|
|
thiserror = { workspace = true }
|
|
|
|
# Serialization
|
|
serde_json = { workspace = true }
|
|
|
|
# Utilities
|
|
async-trait = { workspace = true }
|
|
time = { workspace = true }
|
|
bytes = { workspace = true }
|
|
|
|
# S3 API dependencies
|
|
s3s = { workspace = true }
|
|
|
|
# FTPS specific dependencies (optional)
|
|
libunftp = { workspace = true, optional = true }
|
|
unftp-core = { workspace = true, optional = true }
|
|
rustls = { workspace = true, optional = true }
|
|
|
|
# Swift specific dependencies (optional)
|
|
rustfs-keystone = { workspace = true, optional = true }
|
|
rustfs-ecstore = { workspace = true, optional = true }
|
|
rustfs-rio = { workspace = true, optional = true }
|
|
axum = { workspace = true, optional = true }
|
|
http = { workspace = true, optional = true }
|
|
tower = { workspace = true, optional = true }
|
|
regex = { workspace = true, optional = true }
|
|
percent-encoding = { workspace = true, optional = true }
|
|
sha2 = { workspace = true, optional = true }
|
|
uuid = { workspace = true, optional = true }
|
|
futures = { workspace = true, optional = true }
|
|
http-body-util = { workspace = true, optional = true }
|
|
tokio-util = { workspace = true, optional = true, features = ["rt"] }
|
|
serde = { workspace = true, optional = true }
|
|
urlencoding = { workspace = true, optional = true }
|
|
md5 = { workspace = true, optional = true }
|
|
quick-xml = { workspace = true, optional = true, features = ["serialize"] }
|
|
hmac = { workspace = true, optional = true }
|
|
sha1 = { workspace = true, optional = true }
|
|
hex = { workspace = true, optional = true }
|
|
astral-tokio-tar = { workspace = true, optional = true }
|
|
base64 = { workspace = true, optional = true }
|
|
async-compression = { workspace = true, optional = true, features = ["tokio", "gzip", "bzip2"] }
|
|
|
|
# WebDAV specific dependencies (optional)
|
|
dav-server = { workspace = true, optional = true }
|
|
hyper = { workspace = true, optional = true }
|
|
hyper-util = { workspace = true, optional = true }
|
|
tokio-rustls = { workspace = true, optional = true }
|
|
|
|
# SFTP specific dependencies (optional)
|
|
russh = { workspace = true, optional = true }
|
|
russh-sftp = { workspace = true, optional = true }
|
|
subtle = { workspace = true, optional = true }
|
|
socket2 = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
tempfile = { workspace = true }
|
|
proptest = "1"
|
|
tracing-subscriber = { workspace = true }
|
|
tokio = { workspace = true, features = ["test-util", "macros", "rt"] }
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
|
|
# io-uring is Linux-only. Scope the feature to Linux targets.
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
tokio = { workspace = true, features = ["io-uring"] }
|