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

我的梦境 提交于 2019-12-07 18:16:58

问题


Both GetSystemWebProxy and DefaultWebProxy return null.

WebRequest.GetSystemWebProxy();
WebRequest.DefaultWebProxy;

回答1:


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.



来源:https://stackoverflow.com/questions/8004011/in-mono-on-osx-how-do-i-get-access-to-the-current-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!