教程概述: GitHub克隆慢?npm/pip安装超时?Windows与Mac终端一键开启HTTP/SOCKS5代理配置全景代码指南。
一、Windows PowerShell 临时代理配置
在当前终端窗口中执行以下命令(假设本地代理端口为 7890):
$env:http_proxy="http://127.0.0.1:7890"
$env:https_proxy="http://127.0.0.1:7890"
# 测试是否生效
curl.exe -I https://www.google.com
二、Git 命令行单独加速配置
为了让 git clone 享受千兆专线速度,可专门为 GitHub 域名指定本地代理:
# 仅针对 github.com 走本地代理
git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy http://127.0.0.1:7890
# 若需取消配置执行:
git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy
🚀 顺延探索 · 下一篇教程
进度:第 19 篇 / 共 30 篇
安全与风控 阅读时长:6分钟 • 发布:2026-03-05
浏览器WebRTC真实IP泄漏检测与防范指南
翻墙后真实IP依然被网站识别?手把手教你检测WebRTC STUN打洞泄漏,并在Chrome/Edge/Firefox中彻底阻断真实IP暴露。