WebSocket Firewall
TsgcWebSocketFirewall — a comprehensive firewall component that protects your WebSocket and HTTP servers against fifteen distinct classes of attack, from IP blacklists to SQL injection and command injection.
TsgcWebSocketFirewall — a comprehensive firewall component that protects your WebSocket and HTTP servers against fifteen distinct classes of attack, from IP blacklists to SQL injection and command injection.
Pluggable firewall component — black-list / white-list incoming connections by IP, country or arbitrary rule before they reach your server logic.
TsgcWebSocketFirewall
Server-side filter — works with WebSocket and HTTP/1.1/2 listeners.
Windows, macOS, Linux, iOS, Android
Professional / Enterprise
Create a firewall, hook OnFirewallBlackList / OnFirewallWhiteList, then attach to the server.
uses
sgcWebSocket, sgcWebSocket_Server, sgcWebSocket_Firewall;
var
Firewall: TsgcWebSocketFirewall;
WSServer: TsgcWebSocketHTTPServer;
begin
Firewall := TsgcWebSocketFirewall.Create(nil);
Firewall.OnFirewallBlackList := DoBlackList;
Firewall.OnFirewallWhiteList := DoWhiteList;
WSServer := TsgcWebSocketHTTPServer.Create(nil);
WSServer.Port := 80;
WSServer.Firewall := Firewall;
WSServer.Active := True;
end;
procedure TForm1.DoBlackList(Sender: TObject;
const aIP: string; var Blocked: Boolean);
begin
Blocked := IsBannedRange(aIP);
end;
TsgcWebSocketFirewall *Firewall = new TsgcWebSocketFirewall(this);
Firewall->OnFirewallBlackList = DoBlackList;
Firewall->OnFirewallWhiteList = DoWhiteList;
TsgcWebSocketHTTPServer *WSServer = new TsgcWebSocketHTTPServer(this);
WSServer->Port = 80;
WSServer->Firewall = Firewall;
WSServer->Active = true;
16 published properties, 20 methods, 4 events — pulled from the component reference.
Properties: Enabled.
Properties: Blacklist, Whitelist, CustomRules.
Properties: BruteForce, SQLInjection, XSS.
Properties: RateLimit, FloodProtection.
Properties: ThreatScore, BanEscalation.
Properties: GeoIP.
Authoritative sources for the protocols this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcWebSocketFirewall Full property, method and event reference for this component. | Open | |
| Demo Project — 01.WebSocket\07.Firewall Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |