Skip to content

Handle MCCP1 non-standard SB terminator, fix nanvaent connection#6

Merged
powerje merged 3 commits intotrunkfrom
add_swift_mth_client
Mar 30, 2026
Merged

Handle MCCP1 non-standard SB terminator, fix nanvaent connection#6
powerje merged 3 commits intotrunkfrom
add_swift_mth_client

Conversation

@powerje
Copy link
Copy Markdown
Member

@powerje powerje commented Mar 30, 2026

Summary

  • MCCP1 (option 85) uses a non-standard SB start sequence: IAC SB 85 WILL SE where SE appears without a preceding IAC. Our skipSB only recognized IAC SE, so the MCCP1 start marker was treated as an incomplete subnegotiation and buffered in telbuf — swallowing all subsequent data including the login banner.
  • Adds MCCP1 constant (option 85) and a TeloptPattern to recognize and skip the 5-byte MCCP1 start sequence.
  • Adds nanvaent.org replay tests using captured bytes to verify MCCP2 decompression with standard zlib (windowBits=15) and embedded telnet commands in the compressed stream.

Test plan

  • nanvaentNegotiationAndMCCP2 — full replay of nanvaent's negotiation (split packets), verifies MSSP reception and banner text
  • nanvaentCombinedMCCP2Packet — same replay with coalesced MCCP2 + compressed packet
  • nanvaentInflateStreamDirectly — verifies InflateStream handles standard zlib format
  • All 142 existing tests still pass

@powerje powerje merged commit 4d9b743 into trunk Mar 30, 2026
4 of 5 checks passed
@powerje powerje deleted the add_swift_mth_client branch March 30, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant