softtouch 9 Posted January 14, 2023 (edited) The following code (compiled under Delphi 11.2, target macOS 64 bit, macOS is Ventura 13, sdk is 13.1) h:=THTTPClient.Create; h.ProxySettings.Create(<IP>,<PORT>,<USER>,<PASS>); h.Get(<URL>); h.Free; works fine on Windows 32 and 64 bit target, and it use the proxy. With macOS target, it trigger an exception class 6. The exception happen in System.Net.HTTPClient.Mac, see attached image. What am I doing wrong? Edited January 14, 2023 by softtouch Share this post Link to post
Fr0sT.Brutal 900 Posted January 16, 2023 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_an_HTTP_Client#Sending_a_Request_Behind_a_Proxy Quote macOS The HTTP Client always uses the system proxy settings. Even if you provide alternative proxy settings for the HTTP Client, the HTTP Client uses the system proxy settings. Proxy settings aren't the abilities you need. Apple knows best (/sarcasm/) Share this post Link to post
softtouch 9 Posted January 16, 2023 (edited) 2 hours ago, Fr0sT.Brutal said: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_an_HTTP_Client#Sending_a_Request_Behind_a_Proxy Proxy settings aren't the abilities you need. Apple knows best (/sarcasm/) That sounds bad. I thought that was fixed in 10.4. At leat, it should not crash the app... Is there any other http client out there which works with Windows and macOS and does not relay openssl libs? I need to do GET, HEAD, POST, and all by using various proxies, multithreaded. Edited January 16, 2023 by softtouch Share this post Link to post
Fr0sT.Brutal 900 Posted January 16, 2023 (edited) 1 hour ago, softtouch said: Is there any other http client out there which works with Windows and macOS and does not relay openssl libs? Proxy is not some black magic. HTTP CONNECT is the simplest, socks5 is a bit more complex but again nothing serious. Just implement this functionality by yourself. HTTP CONNECT you should be able to implement with regular request, for socks5 you have to access socket object but TNetHTTPClient seems to not expose any corresponding property. Or maybe try curl lib. Edited January 16, 2023 by Fr0sT.Brutal Share this post Link to post