TsgcQUICClient › Properties › Proxy
Routes the underlying UDP socket through a SOCKS proxy server.
TsgcUDPProxy_Options
property Proxy: TsgcUDPProxy_Options read FProxy write SetProxy;
Disabled (Enabled = False).
| Name | Type | Default | Description |
|---|---|---|---|
Enabled | Boolean | False | Attaches the proxy to the UDP socket. When False the client connects directly and the other sub-properties are ignored. |
Host | String | empty | Address of the proxy server. |
Port | Integer | 0 | Port of the proxy server. |
ProxyType | TwsProxy | — | Which proxy protocol to speak. |
Username | String | empty | User name, for proxies that require authentication. |
Password | String | empty | Password, for proxies that require authentication. |
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.
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;