1

Is there a way to get RestSharp to automatically use the system proxy in .NET Core 3.1? I've found a post implying this should work but for me it doesn't. I have to explicitly define the proxy with the code below or RestSharp doesn't use the proxy (e.g. Fiddler). Am I doing something wrong or has there been a regression in RestSharps behaviour?

        if (useFiddlerProxy)
        {
            ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
            var proxy = new WebProxy("127.0.0.1", 8888);
            proxy.BypassProxyOnLocal = false;
            _client.Proxy = proxy;
        }

EDIT: It looks like I'm not the only one struggling with this: Default Proxy in .NET Core 3.1

NickG
  • 9,315
  • 16
  • 75
  • 115
  • From [github issue](https://github.com/restsharp/RestSharp/issues/1043#issuecomment-355776442): "Referring to #1061 .NET Core will not support system proxy. Full framework does." – Preben Huybrechts Jul 24 '20 at 12:36

0 Answers0