Jump to content
softtouch

Delphi 11.2 - Unable to use proxy with macOS target

Recommended Posts

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.

Project1_-_Delphi_11_-_System.Net.HttpClient.Mac_[_2023-01-14_12-21-44.png

 

What am I doing wrong?

Edited by softtouch

Share this post


Link to post
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 by softtouch

Share this post


Link to post
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 by Fr0sT.Brutal

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×