Clash Proxy

Open the PowerShell’s profile through notepad:

notepad $PROFILE

If the file does not exist, create it using the following command:

if (!(Test-Path -Path $PROFILE)) {
  New-Item -ItemType File -Path $PROFILE -Force
}

Paste into the file:

$env:http_proxy="http://127.0.0.1:7890";
$env:https_proxy="http://127.0.0.1:7890";

Scoop

Aka homebrew in Windows.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop bucket add extras
scoop install extras/psreadline
$env:http_proxy="http://127.0.0.1:7890";
$env:https_proxy="http://127.0.0.1:7890";
 
Import-Module PSReadLine

Thanks