Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Mono on OSX how do I get access to the current proxy?

Both GetSystemWebProxy and DefaultWebProxy return null.

WebRequest.GetSystemWebProxy();
WebRequest.DefaultWebProxy;
like image 453
Simon Avatar asked Feb 03 '26 06:02

Simon


1 Answers

If you use a recent version of monomac (or build it from source) then you should be able to call the static method CFNetwork.GetDefaultProxy (source, look at the end of the file) to get an IWebProxy instance that should match what OSX is using.

like image 162
poupou Avatar answered Feb 04 '26 22:02

poupou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!