Add basic proxy support for NuGet API V3 by k6a · Pull Request #620 · GlitchEnzo/NuGetForUnity (original) (raw)
@JoC0de Thanks for your response!
I just got started using this great plugin in about a week ago. Still figuring out how to use it in corporate proxy (harsh) environment.
Further tested and found that the symptom only occurs on Windows + (corporate) proxy enabled environment.
On MacOS, it works just fine (without the fix).
The documentation you mentioned explains the behaviour of HttpClientHandler on .NET runtime.
Since the Unity Editor runs on Mono runtime, internal structures and behaviours are slightly different than that of .NET runtime.
Reference source for both runtimes:
.NET:
- https://github.com/dotnet/runtime/blob/main/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
- https://github.com/dotnet/runtime/blob/main/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs
Mono:
- https://github.com/mono/mono/blob/main/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs
- https://github.com/mono/mono/blob/main/mcs/class/System.Net.Http/HttpClientHandler.cs
And yes, .NET does setup system proxy on initialization whereas Mono doesn't.