TsgcQUICClient › Properties › Proxy

Proxy Property

Routes the underlying UDP socket through a SOCKS proxy server.

Type

TsgcUDPProxy_Options

Syntax

property Proxy: TsgcUDPProxy_Options read FProxy write SetProxy;

Default

Disabled (Enabled = False).

Sub-Properties

NameTypeDefaultDescription
EnabledBooleanFalseAttaches the proxy to the UDP socket. When False the client connects directly and the other sub-properties are ignored.
HostStringemptyAddress of the proxy server.
PortInteger0Port of the proxy server.
ProxyTypeTwsProxy—Which proxy protocol to speak.
UsernameStringemptyUser name, for proxies that require authentication.
PasswordStringemptyPassword, for proxies that require authentication.

Remarks

Proxy is applied to the Indy UDP client that carries the QUIC datagrams: when Enabled is True the socket is given a transparent SOCKS proxy, otherwise it is cleared. The settings are read when the socket is created, so configure them before opening the connection.

Note that QUIC is a UDP protocol, so proxying only works through a proxy that relays UDP (SOCKS5 UDP ASSOCIATE). HTTP CONNECT style proxies tunnel TCP and cannot carry a QUIC connection. If the proxy in your network only handles TCP, use TsgcHTTP2Client or another TCP-based client instead.

This member is currently available in the Delphi/C++Builder implementation only.

Example


oClient := TsgcQUICClient.Create(nil);
oClient.Host := 'www.example.com';
oClient.Port := 443;

oClient.Proxy.Enabled := True;
oClient.Proxy.Host := '192.168.1.10';
oClient.Proxy.Port := 1080;
oClient.Proxy.Username := 'user';
oClient.Proxy.Password := 'secret';

oClient.Connect;

Back to Properties