Milestone 2.1: Engine hardening + protocol emulators#25
Merged
Conversation
Fix byte cap to track total bytes_in instead of buffer size; flush after DATA terminator reply.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone 2.1 — Engine Hardening + Protocol Emulators
Hardens the deception engine for production and makes it far more convincing by adding five protocol emulators. All within
blackwall-deception+ theblackwalld runwiring.Hardening
EngineLimits) — a shared semaphore bounds concurrent deception sessions (at-cap connections are dropped, never queued, so a flood can't exhaust tasks/FDs), and each session is wrapped in atokio::time::timeoutto kill slow-loris clients. Closes [A·M2 follow-up] Idle timeout + connection cap on emulators #21.blackwalld runcollects the v4/v6 TPROXYservetasks and the NFQUEUE loop into aJoinSetraced against the session-drain loop; a transport death now logs and yields a non-zero exit instead of silently running degraded. Closes [A·M2 follow-up] Supervise engine transport tasks #19.BannerSource::{Fixed,Live}(callingcurrent()per connection), and anotifyfile-watcher inrundrivesSharedBanners::reloadso banner edits take effect without a restart. Closes [A·M2 follow-up] Wire runtime banner hot-reload into run #20.Emulators (interactive
ServiceEmulators)220greeting then correct250/354/221/502reply codes through a basic envelope, with byte/command caps.PING→+PONG,INFOwithredis_version,+OK/-ERR, parses both array and inline commands.ERRpacket.StartupMessage, replies with a framedErrorResponse.All registered in
default_registryon standard ports (22, 25/587, 80/8080, 3306, 5432, 6379) with the generic banner/tarpit fallback. Closes #13, closes #14.Quality
--deny warningsclippy + rustfmt clean.Deferred (tracked)