dotnet / dotnet/runtime

"Proxy Auto Update on Windows" no longer seems to work

Open
#126,822 11 comments 0 reactions 0 assignees View on GitHub
area-System.Net.Http documentation
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

### Description

I refer to https://devblogs.microsoft.com/dotnet/dotnet-9-networking-improvements/#proxy-auto-update-on-windows

I was testing this in a NativeAOT dotnet 10 app and confirmed that I need to have Fiddler running before an HttpClient request, otherwise subsequent requests are not captured

### Reproduction Steps

```
while (true)
{
using var resp = await client.GetAsync("https://httpbin.org/");
Console.WriteLine(HttpClient.DefaultProxy.GetProxy(new Uri("https://httpbin.org/"))?.ToString() ?? "null");
await Task.Delay(1_000);
}
```

### Expected behavior

See link, it describes how it should work

### Actual behavior

HttpClient uses the original proxy settings from the first request

### Regression?

I believe so, at least the blog implies it worked in dotnet 9

### Known Workarounds

_No response_

### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.