install-dotnet.ps1 fails behind authenticated proxy: credentials not applied from ProxyAddress

Open
#595 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
powershell
Domain
networking

Research direction

Start in install-dotnet.ps1 at the code that constructs HttpClientHandler and WebProxy from ProxyAddress. Trace how proxy credentials and environment variables are handled, then reproduce the request through an authenticated proxy. Done means requests authenticate successfully and no longer fail with 407 Proxy Authentication Required.

Written by the indexing model from the issue text.

Description

The install-dotnet.ps1 script fails behind authenticated proxy because it does not apply proxy credentials, even when they are provided via the ProxyAddress parameter.

The script constructs its own HttpClientHandler and WebProxy object. It does not extract credentials from the proxy URL or use those set in environment variables. As a result, it sends unauthenticated requests to the proxy, resulting in 407 Proxy Authentication Required errors. Failure logs show that the ProxyAddress with credentials is passed correctly, but the script still receives a 407. Web proxy logs confirm the request reaches the proxy without credentials, indicating that authentication details are not being applied.
Please find error screenshot for reference.

Environment Context
The runners are in a restricted network without direct internet access, so all outbound traffic must go through an authenticated proxy.

Image
Dominant language
PowerShell
Stars
213
Forks
120
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/install-scripts

All issues in dotnet/install-scripts

Similar issues

More Networking issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.