Board index » delphi » Indy SOCKS Proxy Usage

Indy SOCKS Proxy Usage

I'm new to using Indy 9.0.2, and I am converting code using another
component set to Indy. I am unsure of how to use Indy's SOCKS proxy support,
though ...

... for example, if I'm using a TIdSocksInfo component to provide SOCKS
proxy support to for an Http client:

1. Do I need to set all the TIdSocksInfo properties and then call
MakeSocksConnection(), using the same host address and port number already
assigned to the TIdSocksInfo.Host and TIdSocksInfo.Port properties, or do I
not set TIdSocksInfo.Host and TIdSocksInfo.Port at all, and rely on
MakeSocksConnection() to set them for me?

2. Do I need to do anything further to have the SOCKS proxy server
connection work with a TIdHttp component?

3. Once established, does the SOCKS connection also apply to any TIdFtp
component I am also using? If so, how do I restrict the SOCKS connection to
a TIdHttp component? Can I close the SOCKS connection?

Thanks in advance.

--------------------
Regards,
Steve Moss, CoCo Systems Ltd.

 

Re:Indy SOCKS Proxy Usage


OK, I might(?) have figured this one out. Can someone in the know kindly let
me know if this is the correct approach:

1. Add a TIdIOHandlerSocket to my form, and assign it to the IOHandler
property of my TIdHttp component.
2. Add a TIdSocksInfo component to my form, and assign it to the SocksInfo
property of the TIdIOHandlerSocket component.
3. Assign values to the Host, Password, Port and Username properties of the
TIdSocksInfo component as desired.

Well, it seems that at run time, the TIdSocksInfo's MakeSocksConnection()
method is called as expected (e.g., on using the TIdHttp's Head() or Get()).

Is this the whole solution, or am I missing something? TIA.

--------------------
Regards,
Steve Moss, CoCo Systems Ltd.

Re:Indy SOCKS Proxy Usage


Yes. ;-))

Quote
"Steve Moss" <nos...@coco.co.uk> wrote in message news:3bf3b83d$1_1@dnews...
> OK, I might(?) have figured this one out. Can someone in the know kindly
let
> me know if this is the correct approach:

> 1. Add a TIdIOHandlerSocket to my form, and assign it to the IOHandler
> property of my TIdHttp component.
> 2. Add a TIdSocksInfo component to my form, and assign it to the SocksInfo
> property of the TIdIOHandlerSocket component.
> 3. Assign values to the Host, Password, Port and Username properties of
the
> TIdSocksInfo component as desired.

> Well, it seems that at run time, the TIdSocksInfo's MakeSocksConnection()
> method is called as expected (e.g., on using the TIdHttp's Head() or
Get()).

> Is this the whole solution, or am I missing something? TIA.

> --------------------
> Regards,
> Steve Moss, CoCo Systems Ltd.

Other Threads