TsgcWebSocketProxyServer › Properties › SSL

SSL Eigenschap

Schakelt TLS/SSL in op de downstream-listener zodat clients verbinding kunnen maken met de proxy via wss:// of https://.

Syntaxis

property SSL: Boolean read FSSL write FSSL default False;

Standaardwaarde

False

Opmerkingen

Stel SSL in op True om beveiligde verbindingen aan de downstreamzijde te accepteren. U moet ook het certificaatmateriaal configureren in SSLOptions (CertFile, KeyFile, RootCertFile, Password) en SSLOptions.Port instellen op de TLS-poort. Deze eigenschap is alleen van invloed op het downstream-eindpunt dat aan clients wordt blootgesteld; of de proxy verbinding maakt met de upstream-server via TLS wordt afzonderlijk beheerd via Proxy.TLS. Certificaten moeten worden aangeleverd in PEM-formaat.

Voorbeeld


oProxy := TsgcWebSocketProxyServer.Create(nil);
oProxy.SSL := true;
oProxy.SSLOptions.CertFile := 'c:\certificates\mycert.pem';
oProxy.SSLOptions.KeyFile := 'c:\certificates\mycert.pem';
oProxy.SSLOptions.RootCertFile := 'c:\certificates\mycert.pem';
oProxy.SSLOptions.Port := 443;
oProxy.Port := 443;
oProxy.Proxy.Host := 'upstream.example.com';
oProxy.Proxy.Port := 8080;
oProxy.Active := true;

Terug naar Properties