I just read about chaining proxies and i wanted to try it in delphi,
well i played around with indy TIdHttp
component and i couldnt figure out how to do it,
do i need two TIdHttp
components? maybe one sends the request to another?
http1.ProxyParams.ProxyPort := Port1;
http1.ProxyParams.ProxyServer := Server1;
http2.ProxyParams.ProxyPort := Port2;
http2.ProxyParams.ProxyServer := Server2;
I just want to send some simple GET/POST with the chained proxies.
Is that even doable? or are there any other component to help me with this task?
Thank you.
The
TIdHTTP.ProxyParams
property does not support chaining.To use chained proxies, you need to:
Assign a
TIdIOHandlerSocket
-derived component to theTIdHTTP.IOHandler
property. Either:a.
TIdIOHandlerStack
, which is Indy's standard TCP/IP implementation.b. a
TIdSSLIOHandlerSocketBase
-derived component, such asTIdSSLIOHandlerSocketOpenSSL
. You must use this if you want to work with HTTPS urls.Assign a
TIdCustomTransparentProxy
-derived component to the IOHandler'sTransarentProxy
property. Indy provides two such components by default:a.
TIdSocksInfo
, which implements the SOCKS 4/4a/5 protocols.b.
TIdConnectThroughHttpProxy
, which implements the HTTPCONNECT
verb.Chain multiple
TIdCustomTransparentProxy
-derived components together via theTIdCustomTransparentProxy.ChainedProxy
property.