Add RFC1143 compliant negotiation to prevent telnet loops#83
Open
chodurkhyun wants to merge 1 commit into9swampy:developfrom
Open
Add RFC1143 compliant negotiation to prevent telnet loops#83chodurkhyun wants to merge 1 commit into9swampy:developfrom
chodurkhyun wants to merge 1 commit into9swampy:developfrom
Conversation
…he telnet loop - Add NegotiationMode enum with Simple and Rfc1143 options - Implement Rfc1143OptionNegotiator with Q-method state machine - Add NegotiationStateManager for cross-handler state persistence - Improve subnegotiation handling with proper variable-length data parsing
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.
Summary
This PR introduces RFC1143 compliant telnet option negotiation support to address potential negotiation loops and improve subnegotiation handling.
Background
As discussed in issue #82 , I encountered telnet negotiation loops in production where clients and servers would get stuck in infinite WILL-SGA <-> DO-SGA cycles. And during the debugging process to resolve these loops, I also discovered that the current subnegotiation implementation couldn't handle sequences like IAC SB TERMINAL-TYPE 01 01 IAC SE sent by my target server, causing the client to send WONT instead of properly responding with terminal type information.
Key Improvements
I'd be happy to address any feedback or questions you might have about this implementation. Thank you for your time reviewing this PR!