Set proxy doesn't work in Terminal (PowerShell 7.2.3) #21280

Closed
opened 2026-01-31 07:38:32 +00:00 by claunia · 6 comments
Owner

Originally created by @pilot513 on GitHub (Feb 20, 2024).

Windows Terminal version

1.15.2524.0

Windows build number

10.0.19044.3693

Other Software

No response

Steps to reproduce

Open Terminal:
$Wcl=New-Object System.Net.WebClient
$Creds=Get-Credential
$Wcl.Proxy.Credentials=$Creds

cd c:\tmp
curl https://github.com/PowerShell/PowerShell/releases/download/v7.2.3/PowerShell-7.2.3-win-x64.msi -o PowerShell-7.2.3-win-x64.msi

Expected Behavior

image

Actual Behavior

The file must be downloaded. The file itself is available.

Originally created by @pilot513 on GitHub (Feb 20, 2024). ### Windows Terminal version 1.15.2524.0 ### Windows build number 10.0.19044.3693 ### Other Software _No response_ ### Steps to reproduce Open Terminal: $Wcl=New-Object System.Net.WebClient $Creds=Get-Credential $Wcl.Proxy.Credentials=$Creds cd c:\tmp curl https://github.com/PowerShell/PowerShell/releases/download/v7.2.3/PowerShell-7.2.3-win-x64.msi -o PowerShell-7.2.3-win-x64.msi ### Expected Behavior ![image](https://github.com/microsoft/terminal/assets/28645933/bc263131-0d25-492e-9dcc-7779f9c82879) ### Actual Behavior The file must be downloaded. The file itself is available.
claunia added the Needs-TriageIssue-BugResolution-ExternalNeeds-Attention labels 2026-01-31 07:38:33 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 20, 2024):

Which version of curl are you using/? I suspect this isn't a Terminal issue, but perhaps a curl (or even, a PowerShell/Invoke-WebRequest bug)

(also, Terminal 1.12 is like, years out of date at this point. I'd recommend updating 😉 )

@zadjii-msft commented on GitHub (Feb 20, 2024): Which version of `curl` are you using/? I suspect this isn't a Terminal issue, but perhaps a `curl` (or even, a PowerShell/`Invoke-WebRequest` bug) (also, Terminal 1.12 is like, years out of date at this point. I'd recommend updating 😉 )
Author
Owner

@zadjii-msft commented on GitHub (Feb 20, 2024):

Actually, looking closer, that looks like you're calling curl.exe, and -OutFile ... is getting treated as the -O and -u <user:password> flags:

image

You probably want invoke-webrequest, to use -OutFile

@zadjii-msft commented on GitHub (Feb 20, 2024): Actually, looking closer, that looks like you're calling `curl.exe`, and `-OutFile ...` is getting treated as the `-O` and `-u <user:password>` flags: ![image](https://github.com/microsoft/terminal/assets/18356694/c5ddd48e-b3c0-4946-a4e8-8d23a04926c8) You probably want `invoke-webrequest`, to use `-OutFile`
Author
Owner

@pilot513 commented on GitHub (Feb 20, 2024):

Sorry, I was inattentive to the 'curl' options.
image

@pilot513 commented on GitHub (Feb 20, 2024): Sorry, I was inattentive to the 'curl' options. ![image](https://github.com/microsoft/terminal/assets/28645933/711c0832-be74-4e5e-b4b1-5b2f599f8656)
Author
Owner

@pilot513 commented on GitHub (Feb 20, 2024):

Update Terminal to 1.15.2524.0 version didn't help

@pilot513 commented on GitHub (Feb 20, 2024): Update Terminal to 1.15.2524.0 version didn't help
Author
Owner

@pilot513 commented on GitHub (Feb 21, 2024):

Doesn't work in powershell directly. So far I've decided this:

$env:http_proxy = "http://username:password@your_proxy_address:your_proxy_port"
$env:https_proxy = "http://username:password@your_proxy_address:your_proxy_port"

@pilot513 commented on GitHub (Feb 21, 2024): Doesn't work in powershell directly. So far I've decided this: $env:http_proxy = "http://username:password@your_proxy_address:your_proxy_port" $env:https_proxy = "http://username:password@your_proxy_address:your_proxy_port"
Author
Owner

@carlos-zamora commented on GitHub (Feb 21, 2024):

PowerShell respects your Windows proxy settings. Please refer to those to configure.

@carlos-zamora commented on GitHub (Feb 21, 2024): PowerShell respects your Windows proxy settings. Please refer to those to configure.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21280