nntp-proxy 0.4.0

High-performance NNTP proxy server with connection pooling and authentication
Documentation
# NNTP Caching Proxy Configuration

# Backend NNTP servers
[[servers]]
host = "news.example.com"
port = 119
name = "Example News Server"
# username = "your_username"
# password = "your_password"
max_connections = 10
# Connection health check interval (omit to disable, recommended: 60-120 seconds)
# Sends DATE command to detect stale connections before reuse
connection_keepalive = 60
# TLS/SSL configuration
use_tls = false
tls_verify_cert = true
# tls_cert_path = "/path/to/ca-cert.pem"

# Cache configuration
[cache]
# Maximum memory cache size (default: 64mb)
# Supports human-readable formats: "1gb", "500mb", "64mb"
# For availability-only mode: ~1000 bytes per article
# For full caching: depends on article sizes (avg ~700 KB)
max_capacity = "64mb"
# Time-to-live for cached articles (default: 1 hour)
ttl_secs = 3600
# Cache article bodies (default: true)
# Set to false for availability-only mode (tracks which backends have articles)
cache_articles = true
# Enable adaptive prechecking for STAT/HEAD commands (default: false)
# Queries all backends simultaneously to build availability data
adaptive_precheck = false

# Disk Cache Configuration (optional)
# When configured, creates two-tier cache: memory -> disk -> backend
# Articles evicted from memory are written to disk for later retrieval
#
# [cache.disk]
# # Path to disk cache directory (will be created if needed)
# # Recommended: Use a fast SSD or NVMe drive
# path = "/var/cache/nntp-proxy"
# # Maximum disk cache size (default: 10gb)
# # Supports: "100gb", "10gb", "1tb", or raw bytes
# capacity = "10gb"
# # Enable LZ4 compression (default: true)
# # Reduces disk usage by ~60% for typical NNTP articles
# compression = true
# # Number of shards for concurrent disk access (default: 4)
# # Higher values improve concurrency but use more file handles
# shards = 4

# Health check configuration
[health_check]
# Interval between health checks in seconds
interval_secs = 30
# Timeout for each health check in seconds
timeout_secs = 5
# Number of consecutive failures before marking unhealthy
unhealthy_threshold = 3