Conversation
5d3a70d to
64ba0e8
Compare
also allow for mixed TCP/UDP
64ba0e8 to
2ec2986
Compare
tridge
added a commit
that referenced
this pull request
May 10, 2026
Per-row 'kill' button on the owner /me/ and admin /admin/connections pages drops one connection at a time: POST /me/kill/<conn_index> (owner kills own session) POST /admin/<port2>/kill/<conn_index> (admin kills any session) conn_index 0 is the user side: dropping it ends the whole session (no proxy without conn1). conn_index >= 1 is an engineer slot — only that slot is closed, user + other engineers stay up. Mechanism: webadmin sets CONN_FLAG_DROP_REQUESTED on the matching ConnEntry in connections.tdb (read-modify-write that preserves any forward-compat trailing bytes), then SIGUSR1's the child PID. The PID is validated against /proc/<pid>/comm == 'supportproxy' before signalling so we never hit a recycled PID. SIGUSR1 sets a sig_atomic_t flag in the child; main_loop checks it on the next iteration (select returns EINTR), tdb_traverses for entries belonging to its port2 with the bit set, closes the matching slot, and tdb_deletes the record so the heartbeat doesn't republish it. Tests cover both the routing/auth boundary (request_drop sets the flag on the right record only; admin route is admin-only; PID with mismatched comm or dead PID is skipped; forward-compat tail bytes survive the read-modify-write) and the C++ end-to-end drop path (real proxy + 1 user + 2 signed engineers; drop engineer #2 keeps others; drop user ends the whole session). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
also allow for mixed TCP/UDP