WebSocket Proxy Server

TsgcWebSocketProxyServer — accepts WebSocket connections from clients (typically browsers) and forwards data to a plain TCP/IP server. The cleanest way to expose a legacy TCP backend to a modern browser front-end.

TsgcWebSocketProxyServer

Termination proxy for WebSocket and HTTP traffic — do TLS on the edge, forward to internal backends as plain TCP, transparently pass through headers and sub-protocols.

Component class

TsgcWebSocketProxyServer

Protocol

WebSocket / HTTP — RFC 6455

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Enterprise

Drop the component, set a few properties, go

Bind a public port, point ProxyHost/ProxyPort at the backend.

uses
  sgcWebSocket_ProxyServer;

var
  Proxy: TsgcWebSocketProxyServer;
begin
  Proxy := TsgcWebSocketProxyServer.Create(nil);
  Proxy.Port := 443;
  Proxy.SSL := True;

  // Forward all websocket traffic to a backend
  Proxy.ProxyHost := '10.0.0.10';
  Proxy.ProxyPort := 8080;

  Proxy.Active := True;
end;

What's inside

19 published properties, 7 methods, 22 events — pulled from the component reference.

Connection

Published properties: Active, Port, Bindings.

Messaging

Methods: Broadcast, WriteData, Ping.

Reliability

Published properties: LoadBalancer, FallBack.

Security

Published properties: Authentication, SSL, SSLOptions.

Lifecycle

Events: OnStartup, OnShutdown, OnTCPConnect.

Data

Events: OnMessage, OnBinary, OnFragmented.

Specifications & references

Authoritative sources for the protocols this component implements.

Documentation & Demos

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

Online Help — TsgcWebSocketProxyServer Full property, method and event reference for this component.
Demo Project — 01.WebSocket\06.Proxy Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Bridge Browsers to Any TCP Backend

Download the free trial and turn any TCP service into a WebSocket-friendly endpoint.