Commit 4135acd5 authored by Tom Zierbock's avatar Tom Zierbock

fix: Correctly get upstream proxy from system

By creating a new WebProxy object the PAC script installed on the
system is ignored for some reason. Using WebRequest.GetSystemWebProxy()
gives us the result we want.
parent 7e4c20f8
...@@ -607,7 +607,7 @@ namespace Titanium.Web.Proxy ...@@ -607,7 +607,7 @@ namespace Titanium.Web.Proxy
private Task<ExternalProxy> GetSystemUpStreamProxy(SessionEventArgs sessionEventArgs) private Task<ExternalProxy> GetSystemUpStreamProxy(SessionEventArgs sessionEventArgs)
{ {
// Use built-in WebProxy class to handle PAC/WAPD scripts. // Use built-in WebProxy class to handle PAC/WAPD scripts.
var systemProxyResolver = new WebProxy(); var systemProxyResolver = WebRequest.GetSystemWebProxy();
var systemProxyUri = systemProxyResolver.GetProxy(sessionEventArgs.WebSession.Request.RequestUri); var systemProxyUri = systemProxyResolver.GetProxy(sessionEventArgs.WebSession.Request.RequestUri);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment