TsgcHTTP2Client › Properties › Proxy
Routes the HTTP/2 connection through an HTTP CONNECT tunnel or SOCKS proxy server.
property Proxy: TsgcTCPProxy_Options read FProxy write SetProxy;
Enabled=False, Port=8080
Set Proxy.Enabled to True and fill in Host and Port to tunnel the HTTP/2 connection through an intermediate proxy. Because HTTP/2 requires an end-to-end TLS (or TCP) pipe between client and origin, HTTP proxies are contacted with the CONNECT method and simply relay the encrypted stream. Supported proxy types (ProxyType) are pxyHTTP, pxySocks4, pxySocks4A and pxySocks5. Username and Password are optional; leave them blank for anonymous proxies.
oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;
oHTTP2.Proxy.Enabled := True;
oHTTP2.Proxy.Host := '80.55.44.12';
oHTTP2.Proxy.Port := 8080;
oHTTP2.Proxy.Username := 'user';
oHTTP2.Proxy.Password := 'secret';