Repository navigation
Move to TelnetNegotiationCore 4.13.5, probe telnet over WebSocket, report WEBSOCKET support - #216
Merged
Merged
Conversation
TelnetNegotiationCore 4.6.1 -> 4.13.2 and MarkupString.Ansi 2.31.0 -> 2.31.3. The probe now starts its sessions with StartAsync on an ITelnetTransport rather than BuildAndStartAsync on a TcpClient or SslStream. ProbeLine owns the socket under a session (TCP, TLS or WebSocket) and is the only place the three differ; the two copies of the connect-and-handshake code in SessionAsync and the plaintext MSSP trial are gone. OnStarting sets PromptSink's interpreter and the MCP plugin before the read loop reads a byte, instead of straight after the build and arguing that no prompt could arrive in between. Live() reads TelnetConnection.Closed instead of polling the TcpClient, so it works on every transport and sees a TLS peer's close the same way. ProbeTarget.ForWebSocket(uri) dials a ws:// or wss:// URL offering telnet.mudstandards.org and telnet. The upgrade goes through a one-dial SocketsHttpHandler whose ConnectCallback dials the scope guard's vetted addresses, never a fresh lookup. DialFailure unwraps WebSocketException and HttpRequestException to the socket or TLS error under them. mui-probe takes a ws:// or wss:// URL in place of the host. The crawl loop does not dial WebSockets yet; CatalogueBinder and CrawlCycle are made correct for a WebSocket result so wiring it later cannot mislabel one as telnet or clear a target's TLS flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7VYxc7wynmb9N719J4
|
Caution Review failedThe pull request is closed. WalkthroughThe probe now supports Telnet traffic over WebSocket. Crawl results distinguish WebSocket endpoints from Telnet and TLS endpoints. Capability queries derive WebSocket support states and subprotocols, which the API and capability matrix expose. ChangesWebSocket Telnet probing and capability reporting
Estimated code review effort: 4 (Complex) | ~50 minutes Sequence Diagram(s)sequenceDiagram
participant TelnetProbe
participant ProbeLine
participant WebSocketEndpoint
participant TelnetConnection
TelnetProbe->>ProbeLine: Open WebSocket target
ProbeLine->>WebSocketEndpoint: Upgrade using offered subprotocols
WebSocketEndpoint-->>ProbeLine: WebSocket connection
ProbeLine-->>TelnetProbe: Expose bridge transport
TelnetProbe->>TelnetConnection: Start Telnet over bridge transport
TelnetConnection-->>TelnetProbe: Telnet session data
Merge Risk:
|
WEBSOCKET joins the capability pairs. A game's MSSP WEBSOCKET value already became capability.websocket.declared; the crawl loop now dials the first ws:// or wss:// URL it names and writes capability.websocket.measured under the handshake source (rule 1). The check runs after a game's own probe answers, at most once a day per address (crawl_target.websocket_checked_at, migration 0045, DiscoveryOptions.WebSocketCheckInterval). It goes through the opt-out and the scope guard on the URL's host with no operator-seed exemption, dials the vetted addresses, and types nothing (ProbeTarget.AsksNothing): the measurement already asked what there was to ask. True needs a telnet session that said something. False only for an answer from the far end: refused, a TLS handshake it would not finish, or an upgrade it turned down. A timeout, no route or failed lookup writes nothing about the game, and nothing from the check reaches presence, availability or endpoints. The game page's disagreement sentence for WEBSOCKET says the URL was dialled and did not answer with a telnet session, not that a handshake never offered it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7VYxc7wynmb9N719J4
The probe's WebSocket dial now offers gmcp.mudstandards.org and terminal.mudstandards.org after the telnet names, and reads a server that picks one through TNC's client bridge. Evennia has no telnet layer on its WebSocket and picks gmcp; before this, a check of its declared URL could only fail. The bridge drops the probe's telnet commands, so a server with no telnet layer never sees IAC bytes in front of its login. The dial still connects its own ClientWebSocket so it can dial the scope guard's addresses. 4.13.5's redial with no subprotocol after an HTTP error (websockify, Apache) needs ConnectAsync to accept an invoker, which is TelnetNegotiationCore#201. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7VYxc7wynmb9N719J4
#217 (merged on main) checks each declared WEBSOCKET URL with a handshake through the opt-out and the scope guard, retries with no subprotocol after an HTTP refusal, and records the result as an endpoint. This branch's check measured the same URLs again, under a second migration numbered 0045. This commit removes it: WebSocketCheck, websocket_checked_at, capability.websocket.measured, AsksNothing and the disagreement sentence. What stays from this branch is TelnetNegotiationCore 4.13.5 and the probe's telnet-over-WebSocket transport (ProbeLine, mui-probe wss://). The transport test now names System.Net.WebSockets.WebSocket in full, because main's MUI.Crawl.Tests.WebSocket namespace shadows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7VYxc7wynmb9N719J4
The matrix gains a WEBSOCKET row. Declared comes from MSSP's WEBSOCKET variable like any other capability. Measured comes from the WebSocket endpoints the crawl recorded (#217), which no telnet handshake can show: - standard: a live endpoint chose a mudstandards.org subprotocol. The cell links https://mudstandards.org/websocket/ and names the choice. - none: a live endpoint upgraded but chose none (websockify, MUME's Apache, The Last Outpost). - unknown: no live endpoint, which is also what a declared URL that never upgraded looks like. None is never shown as absent and measured is never Absent: a failed upgrade writes no endpoint, so nothing here says a game has no WebSocket (rule 5). The API's capability gains webSocket and subProtocol on that row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7VYxc7wynmb9N719J4
HarryCordewener
marked this pull request as ready for review
November 16, 2026 05:05
This was referenced Nov 16, 2026
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.
Requested by Grave · project thread
This PR does three things:
An earlier commit here checked each declared
WEBSOCKETURL during the crawl. #217, now on main, already does that and records the result as an endpoint, and the commit clashed with #217's migration 0045. It has been reverted on this branch.Packages
The probe
StartAsyncon anITelnetTransportreplacesBuildAndStartAsyncon aTcpClientorSslStream. The newProbeLineowns whatever is under a session (TCP, TLS or WebSocket) and is the only place the three differ.OnStartingsetsPromptSink's interpreter and reads the MCP plugin before the read loop starts.Live()readsTelnetConnection.Closed, the same on every transport.ProbeTarget.ForWebSocket(uri)dialsws://orwss://:SocketsHttpHandlerwhoseConnectCallbackdials the addresses the scope guard vetted (§7.2)gmcpandterminal. A server that picksgmcporterminal(Evennia) is read through TNC's client bridge, which drops the probe's telnet commands.DialFailureunwrapsWebSocketExceptionandHttpRequestException.mui-probe wss://host/pathprobes a URL by hand.Not adopted: TNC's retry with no subprotocol after an HTTP 400 or 502.
ConnectAsyncresolves the name itself. HarryCordewener/TelnetNegotiationCore#201 adds an overload that takes an invoker. This affectsmui-probeonly.WEBSOCKET in the capability matrix
A new
WEBSOCKETrow.Declared comes from MSSP's
WEBSOCKETvariable, like any other capability.Measured comes from the WebSocket endpoints #217 records. Only endpoints that are not gone count.
● standard, linked to https://mudstandards.org/websocket/, with the chosen name○ none– unknown"None" is never shown as the ✕ of an absent capability, and the measured state is never
absent. A failed upgrade writes no endpoint, so nothing can say a game has no WebSocket (rule 5).The API's
capabilities[]entry for that row gainswebSocket(unknown,noneorstandard) andsubProtocol. The labels are translated into en/de/nl/ja/zh-Hans.Tests
WebSocketTransportTests(12) covers:🤖 Generated with Claude Code
https://claude.ai/code/session_01Rqqt7VYxc7wynmb9N719J4
Summary by CodeRabbit
ws://andwss://targets.