STUN Client

TsgcSTUNClient component for discovering public IP addresses and NAT traversal in peer-to-peer Delphi applications.

Capabilities

  • Binding requests to discover public IP and port
  • NAT type detection with multiple test sequences
  • Short-term and long-term credential support
  • UDP and TCP transport options
  • Event-driven response handling

Delphi Example

uses
  sgcSTUN_Client;

var
  Client: TsgcSTUNClient;
begin
  Client := TsgcSTUNClient.Create(nil);
  Client.Host := 'stun.l.google.com';
  Client.Port := 19302;
  Client.OnSTUNBinding := HandleBinding;
  Client.Bind;
  // Public IP and port returned in event
end;

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Ready to Discover Your Public Address?

Download the free trial and start building in minutes.