Skip to content

feat: add client-side telnet protocol support#96

Open
billchurch wants to merge 3 commits intomainfrom
feature/telnet-support
Open

feat: add client-side telnet protocol support#96
billchurch wants to merge 3 commits intomainfrom
feature/telnet-support

Conversation

@billchurch
Copy link
Owner

@billchurch billchurch commented Feb 26, 2026

Summary

  • Add ProtocolType ('ssh' | 'telnet') to config types and protocol signal to terminal store
  • Make Socket.IO path dynamic (/telnet/socket.io vs /ssh/socket.io) based on protocol
  • Guard host key event handlers (SSH-only, skipped for telnet)
  • LoginModal: telnet warning banner, hide SSH key upload/passphrase/keyboard-interactive, default port 23, password optional
  • Hide SFTP file browser and host key UI for telnet connections
  • Session footer shows telnet:// prefix for telnet connections

Companion to billchurch/webssh2#490.

Test plan

  • Verify SSH login modal unchanged (all fields present, port 22 default)
  • Verify telnet login modal shows warning banner, hides SSH-only fields, port 23 default
  • Verify SFTP menu item hidden for telnet
  • Verify host key modals do not appear for telnet
  • Verify socket connects to /telnet/socket.io for telnet, /ssh/socket.io for SSH

Add protocol awareness to the SolidJS client so the same codebase
serves both SSH and telnet connections. The server injects
`protocol: 'telnet'` into window.webssh2Config for telnet routes.

Changes:
- Add ProtocolType ('ssh' | 'telnet') to config types and protocol
  signal to terminal store
- Read protocol from injected config in app.tsx on mount
- Make Socket.IO path dynamic (/telnet/socket.io vs /ssh/socket.io)
- Guard hostkey event handlers (SSH-only, skipped for telnet)
- LoginModal: show telnet warning banner, hide SSH key upload,
  passphrase, keyboard-interactive; default port 23; relax
  credential validation (password optional for telnet)
- Hide SFTP file browser and host key UI for telnet connections
- Update session footer to show telnet:// prefix when appropriate
- S3776: extract buildHostPortPayload/buildCredentialPayload helpers
  to reduce cognitive complexity from 20 to under 15
- S6853: replace sr-only labels with aria-label attributes on inputs
  (SonarLint false positive for SolidJS `for` vs React `htmlFor`)
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