Files
kumomta/crates/proxy-server/Cargo.toml
T
Jack c4dbaa743b proxy-server: add tcp_keepalive option
Some upstream peers (e.g. QQ Mail's rate-limiter) silently hold a
proxied TCP connection open indefinitely — sending no data, FIN, or RST
— rather than cleanly refusing.  Without some kind of timeout
management, the two file descriptors for such a session remain open for
the lifetime of the process, slowly exhausting the kernel's
file-descriptor table and occupying proxy-server worker slots.

This commit configures kernel level keepalive options with reasonable
defaults to detect and close out this class of connection.

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

Closes: https://github.com/KumoCorp/kumomta/pull/509
2026-05-06 21:09:10 +01:00

42 lines
1.2 KiB
TOML

[package]
name = "proxy-server"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = {workspace=true}
clap = {workspace=true}
config = {path="../config"}
data-loader = {path="../data-loader"}
duration-serde = {path="../duration-serde"}
gethostname = {workspace=true}
kumo-prometheus = {path="../kumo-prometheus"}
kumo-server-common = {path="../kumo-server-common"}
kumo-server-lifecycle = {path="../kumo-server-lifecycle"}
kumo-server-memory = {path="../kumo-server-memory"}
kumo-server-runtime = {path="../kumo-server-runtime"}
kumo-tls-helper = {path="../kumo-tls-helper"}
libc = {workspace=true}
linkme = {workspace=true}
mlua = {workspace=true}
nix = {workspace=true, features=["resource", "user"]}
parking_lot = {workspace=true}
rustls = {workspace=true}
serde = {workspace=true}
serde_json.workspace = true
socket2 = {workspace=true}
socksv5 = {workspace=true}
tempfile = {workspace=true}
tokio = {workspace=true, features=["full", "tracing"]}
tokio-rustls = {workspace=true}
tracing = {workspace=true}
utoipa = {workspace=true}
version-info = {path="../version-info"}
axum = {workspace=true}
[target.'cfg(target_os = "linux")'.dependencies]
tokio-splice = {workspace=true}
[dev-dependencies]
k9 = {workspace=true}