Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delphi INDY + SSL + Socks
There is a problem: When using a Socks4 proxy is not running https, the redirect goes to http. Libraries are, uses are connected.

 https: TIdHTTP;
 ssl: TIdSSLIOHandlerSocketOpenSSL;
 sock: TIdSocksInfo;
 ssl := TIdSSLIOHandlerSocketOpenSSL.Create(https);
 ssl.SSLOptions.CipherList := 'ALL';
 ssl.PassThrough := False;
 sock := TIdSocksInfo.Create;
 sock.authentication := sanoauthentication;
 sock.version := svSocks4; := '';
 sock.port := 4145;
 ssl.transparentproxy := sock;
 https.IOHandler := ssl;


[Image: uFycM.png]
If you remove the socks4, then all is well:

[Image: b7vAQ.png]
Copied from my comment to your same question on StackOverflow:

Quote:You are not supposed to set PassThrough manually when using TIdHTTP. You are trying to force SSL on the connection to the proxy server, before it has connected to the HTTP server. Let TIdHTTP manage PassThrough for you. It will initialize SSL after connecting to the proxy.


Forum Jump:

Users browsing this thread: 1 Guest(s)