# Unified Blossom-BitTorrent Gateway Configuration # Mode: unified (all services), gateway-only, blossom-only, dht-only mode: unified # Gateway HTTP API server gateway: enabled: true port: 9877 max_upload_size: 10GB # Embedded Blossom server blossom_server: enabled: true port: 8082 storage_path: "./data/blobs" max_blob_size: 100MB rate_limit: requests_per_minute: 100 burst_size: 20 # DHT node configuration dht: enabled: true port: 6883 node_id: "" # auto-generate if empty bootstrap_self: true bootstrap_nodes: - "router.bittorrent.com:6881" - "dht.transmissionbt.com:6881" - "router.utorrent.com:6881" - "dht.libtorrent.org:25401" announce_interval: 900s # 15 minutes cleanup_interval: 3600s # 1 hour max_torrents: 10000 max_nodes: 5000 max_peers_per_torrent: 200 # Shared storage configuration storage: blob_threshold: 104857600 # 100MB in bytes chunk_size: 2097152 # 2MB chunks for large files metadata_db: "./data/metadata.db" blob_storage: "./data/blobs" chunk_storage: "./data/chunks" strategy: small_files: "blob" # <100MB use Blossom directly large_files: "torrent" # >=100MB use chunking # External Blossom servers (currently not implemented - using local storage only) # blossom: # servers: # - "https://cdn.sovbit.host" # BitTorrent configuration torrent: trackers: - "udp://tracker.opentrackr.org:1337" - "udp://tracker.openbittorrent.com:6969" # Built-in BitTorrent tracker configuration tracker: enabled: true announce_interval: 1800 # 30 minutes min_interval: 900 # 15 minutes default_numwant: 50 # peers to return max_numwant: 100 # maximum peers cleanup_interval: 300s # cleanup every 5 minutes peer_timeout: 2700s # 45 minutes # Nostr relay configuration nostr: relays: - "wss://freelay.sovbit.host" # Smart proxy configuration proxy: enabled: true cache_size: 100 # Maximum number of cached reassembled files cache_max_age: 1h # Maximum age for cached files # Admin configuration admin: enabled: true pubkeys: - "44dc1c2db9c3fbd7bee9257eceb52be3cf8c40baf7b63f46e56b58a131c74f0b" # Replace with actual admin pubkey auto_cleanup: true cleanup_age: "90d" max_file_age: "365d" report_threshold: 3 default_user_storage_limit: "10GB" # Default storage limit per user # Rate limiting configuration - tune these values based on your server capacity rate_limiting: upload: requests_per_second: 1.0 # Max uploads per second per IP address burst_size: 5 # Allow burst of 5 uploads max_file_size: "3GB" # Maximum individual file size download: requests_per_second: 50.0 # Global download rate limit (all users combined) burst_size: 100 # Global download burst allowance stream: requests_per_second: 10.0 # Max streaming requests per second per file burst_size: 20 # Stream burst allowance per file max_concurrent: 50 # Maximum concurrent streaming connections auth: login_attempts_per_minute: 10 # Login attempts per IP per minute burst_size: 5 # Login burst allowance per IP