sgcIndy Features

Enhanced Indy TCP/IP components with OpenSSL 1.1/3.0 support, XOAuth2 authentication, and improved networking for Delphi and Free Pascal.

Modern OpenSSL Support

Bring your Indy applications up to date with the latest OpenSSL libraries and TLS standards.

OpenSSL 1.1

Full support for OpenSSL 1.1.x with TLS 1.2 and TLS 1.3. Drop-in replacement for the legacy Indy OpenSSL integration.

OpenSSL 3.0

Support for the latest OpenSSL 3.x series with the new provider architecture, FIPS compliance, and improved cipher suite management.

TLS 1.3

First-class TLS 1.3 support with 0-RTT resumption, improved handshake performance, and modern cipher suites.

XOAuth2 & Enhanced TCP/IP

XOAuth2 Authentication

Built-in XOAuth2 support for Gmail, Outlook, and other OAuth 2.0 providers. Authenticate SMTP, IMAP, and POP3 connections with modern OAuth flows.

Enhanced TCP/IP

Improved connection handling, keep-alive management, timeout control, and buffer management over standard Indy components.

Free & Open

sgcIndy is free to use. Compatible with Delphi 7 through RAD Studio 13 and Free Pascal/Lazarus. No license fees or royalties.

SSH Client — TIdSSHClient

Full-featured SSH 2.0 client for secure remote connections. Execute commands, open interactive shells, and set up port forwarding — all over encrypted channels.

Secure Remote Execution

TIdSSHClient handles the complete SSH lifecycle: version exchange, key negotiation, user authentication, and channel management. Connect to any SSH server and run commands, open shells, or forward ports with a clean Delphi component API.

  • Password, Public Key & Keyboard-Interactive authentication
  • Execute() — run a remote command and get the output in one call
  • RequestShell / RequestPTY — open interactive terminal sessions
  • Port forwarding — local and remote TCP/IP tunneling via OpenDirectTCPIP and RequestForwarding
  • Multi-channel — open multiple simultaneous sessions over a single connection
SSH_Example.pas
var
  SSH: TIdSSHClient;
  Output: string;
begin
  SSH := TIdSSHClient.Create(nil);
  try
    SSH.Host := 'server.example.com';
    SSH.Port := 22;
    SSH.Authentication.Username := 'admin';
    SSH.Authentication.Password := 'secret';
    SSH.Connect;

    // Execute a command and get output
    Output := SSH.Execute('ls -la /var/log');
    Memo1.Text := Output;

    SSH.Disconnect;
  finally
    SSH.Free;
  end;
end;

Authentication

Password, public key (RSA, ECDSA, ED25519), and keyboard-interactive methods. Load private keys from PEM files with optional passphrase. Host key verification via OnSSHHostKey event.

Modern Cryptography

Curve25519, ECDH, and Diffie-Hellman key exchange. AES-CTR and AES-GCM ciphers. HMAC-SHA2 message authentication. Configurable algorithm preferences via the Algorithms property.

Channels & Subsystems

Open multiple channels over one connection with OpenChannel. Request exec, shell, or subsystem (like SFTP) per channel. Send data, signals, and EOF independently per channel.

Keep-Alive & Timeouts

Configurable keep-alive interval and max count to detect dead connections. Connect and read timeouts via SSHOptions. Automatic re-keying support via Rekey().

Port Forwarding

Local-to-remote tunneling with OpenDirectTCPIP. Remote-to-local forwarding with RequestForwarding and CancelForwarding. Tunnel any TCP traffic through the encrypted SSH connection.

Rich Events

OnSSHChannelData for incoming data, OnSSHChannelExitStatus for command results, OnSSHAuthBanner for server banners, and OnSSHError for error handling. Full event-driven architecture.

SFTP Client — TIdSFTPClient

Secure file transfer over SSH. Upload, download, and manage remote files and directories with progress tracking and full attribute support.

Secure File Operations

TIdSFTPClient is built on top of TIdSSHClient and handles the SFTP subsystem automatically. It provides a high-level API for all common file operations — no need to manage SSH channels or the SFTP protocol manually.

  • Get / Put — download and upload files by path or stream
  • ListDirectory — list remote directory contents with file attributes
  • Delete / Rename — manage remote files and directories
  • MakeDirectory / RemoveDirectory — create and remove folders
  • OnSFTPProgress — track transfer progress with bytes transferred, total size, and cancel support
SFTP_Example.pas
var
  SFTP: TIdSFTPClient;
  Items: TIdSFTPDirectoryItems;
  i: Integer;
begin
  SFTP := TIdSFTPClient.Create(nil);
  try
    SFTP.Host := 'sftp.example.com';
    SFTP.Authentication.Username := 'admin';
    SFTP.Authentication.PrivateKeyFile :=
      'C:\Keys\id_rsa';
    SFTP.Connect;

    // Upload a file
    SFTP.Put('C:\local\report.pdf',
      '/remote/reports/report.pdf');

    // List directory
    Items := SFTP.ListDirectory('/remote/reports');
    for i := 0 to Items.Count - 1 do
      Memo1.Lines.Add(Items[i].FileName);

    // Download a file
    SFTP.Get('/remote/data.csv',
      'C:\local\data.csv');

    SFTP.Disconnect;
  finally
    SFTP.Free;
  end;
end;

File Transfers

Get() downloads remote files to a local path or TStream. Put() uploads from a local path or TStream. Configurable buffer size via SFTPBufferSize for optimal throughput. OnSFTPProgress fires during transfer with bytes transferred, total size, and a Cancel flag.

Directory Operations

ListDirectory() returns TIdSFTPDirectoryItems with file name, size, permissions, timestamps, and type for each entry. MakeDirectory() and RemoveDirectory() for folder management. GetCurrentDirectory() returns the remote working path.

File Attributes

Stat() and LStat() retrieve size, permissions, UID/GID, and timestamps. SetStat() modifies remote attributes. FileExists(), DirectoryExists(), and FileSize() for quick checks. Symlink support via Symlink() and ReadLink().

String Helpers

GetFileAsString() reads a remote file directly into a Delphi string. PutFileFromString() writes a string to a remote file. RealPath() resolves relative or symbolic paths to their absolute location on the server.

SSH Authentication

Inherits all SSH authentication from TIdSSHClient: password, public key (RSA, ECDSA, ED25519), and keyboard-interactive. Set credentials via the Authentication property. OnSSHHostKey event for server verification.

Events & Progress

OnSFTPProgress tracks bytes transferred and total size with a Cancel flag to abort transfers. OnSFTPError provides error code and message. OnSFTPStatus for status updates. OnSFTPDirectoryList fires when directory listing completes.

Upgrade Your Indy Components

Download sgcIndy for free and bring modern TLS support to your applications.