linux中的常用的proxy 代理方式

  1. 设置ALL_PROXY环境变量
    export ALL_PROXY=socks5://127.0.0.1:1080
    支持socks5 http https
    取消
    export ALL_PROXY=""

2.使用proxychains

github开源地址:https://github.com/rofl0r/proxychains-ng

  1. vpxN方式全局代理

...

4 GO下载模块代理

# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.io

5 Git下的代理

#全局的
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

#取消代理
git config --global --unset http.https://github.com.proxy

6 wget或aria2c[HTTP方式]
aria2c --http-proxy 'http://127.0.0.1:1087'
wget -e http_proxy='http://127.0.0.1:1087'

posted @   lvusyy  阅读(14808)  评论(1编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
点击右上角即可分享
微信分享提示