Except that HttpCli doesn't get this far when supplied with a domain name. 
As Angus suggests in his post, it tries to do a dns lookup first, and 
fails.

--
Colin

"TWSocket" <twsocket-boun...@lists.elists.org> wrote on 24/11/2017 
01:24:18 a.m.:

> From: "A.S." <an...@rambler.ru>
> To: twsocket@lists.elists.org
> Date: 24/11/2017 01:24 a.m.
> Subject: Re: [twsocket] THttpCli and Socks Proxy
> Sent by: "TWSocket" <twsocket-boun...@lists.elists.org>
> 
> TCustomSocksWSocket.SocksDoConnect has this code for SocksLevel <> '4':
> 
>          Buf[3] := #$03;            { Address type is domain name }
>          Buf[4] := AnsiChar((Length(FAddrStr)));
>          { Should check buffer overflow }
>          Move(AnsiString(FAddrStr)[1], Buf[5], Length(FAddrStr)); // No 
> length change expected (ASCII)
> 
> So everything is as it should be
> 
> > Is there some way I can encourage it to use the proxy for DNS 
resolution?
> > Alternatively, how can I get the remote IP address from the existing
> > TWSocket connection? (PeerAddr only gives me the IP of the proxy 
server).
> >
> > Any assistance with this issue will be much appreciated.
> >
> > Thanks,
> > Colin
> >
> 
> -- 
> A.S.
> 
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
###########################################################################
This email is confidential and may contain information subject to legal 
privilege.  If you are not the intended recipient please advise us of our
error by return e-mail then delete this email and any attached files.  
You may not copy, disclose or use the contents in any way.  

The views expressed in this email may not be those of Gallagher Group 
Ltd or subsidiary companies thereof.
###########################################################################
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to