Skip to content

🌎 代理服务器

从零开始带你搭建主流的代理服务器:shadowsocks、xray、v2ray 等,推荐使用 xray 以及 v2ray 。

proxyserver

安装与配置代理服务器

shadowsocks、xray、v2ray 安装与配置,另附一键安装脚本。

使用代理(本机与虚拟机)

分别介绍在物理机、虚拟机、路由器中使用代理的方法。

  • Git 使用代理
    • bash
      git config --global http.proxy 'socks5://127.0.0.1:1089'
      git config --global https.proxy 'socks5://127.0.0.1:1089'
  • Dnf、yum 使用代理
    • sudo vim /etc/yum.repos.d/packer.repo
    • 添加 proxy=http://127.0.0.1:8889
  • curl 使用 http 代理
    • bash
      export http_proxy="http://127.0.0.1:8889"
      export https_proxy="http://127.0.0.1:8889"

FAQ