NIS.Protocols.Telnet 1.0.0

NIS.Protocols.Telnet

RFC 854/855 compliant Telnet protocol implementation for .NET.

Installation

dotnet add package NIS.Protocols.Telnet --version 1.0.0

Quick Start

using NIS.Protocols.Telnet;

var client = new TelnetClient("192.168.1.1", 23);
client.DataReceived += (sender, e) => Console.WriteLine(e.Data);
client.CommandReceived += (sender, e) => Console.WriteLine($"Command: {e.Command}");
await client.ConnectAsync();
await client.SendAsync("username\n");
await client.SendAsync("password\n");

RFC Compliance

  • RFC 854: Telnet Protocol Specification (IAC escape, commands, subnegotiation)
  • RFC 855: Telnet Option Specification (subnegotiation format, IAC inside params)

RFC documents are included in the docs/ directory of this repository.

BaGetter Feed Configuration

To install from a private BaGetter feed:

# Add the BaGetter source
dotnet nuget add source https://your-bagetter-url/v3/index.json --name BaGetter

# Install the package
dotnet add package NIS.Protocols.Telnet --version 1.0.0 --source BaGetter

Or add to your NuGet.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="BaGetter" value="https://your-bagetter-url/v3/index.json" />
  </packageSources>
</configuration>

Public API

The public API surface is intentionally minimal:

  • TelnetClient - Main consumer API (connect, send, receive, disconnect)
  • TelnetCommand - Enum of Telnet commands (IAC, WILL, WONT, DO, DONT, etc.)
  • TelnetDataEventArgs - Event args for data received
  • TelnetCommandEventArgs - Event args for commands received

Implementation classes (TelnetStreamParser, OptionNegotiator, NvtDataProcessor) are internal to allow future refactoring without breaking changes.

License

GPL v3 - see LICENSE

No packages depend on NIS.Protocols.Telnet.

.NET 10.0

  • No dependencies.

Version Downloads Last updated
1.0.0 0 05/26/2026