zoukankan      html  css  js  c++  java
  • linux 命令行下设置代理

    当linux 代理软件设置好后,我们需要设置命令行代理的连接方式,这样在命令行中的软件才能使用:

    设置http/https代理:

    export https_proxy="127.0.0.1:12333"

    export http_proxy="127.0.0.1:12333"

    如果有密码:

    export http_proxy_user=test
    export http_proxy_pass=test

    测试代理http/https:

    curl http://www.google.com

    curl https://www.google.com

    当然我们也可以设置 proxychains-ng 进行设置代理:(推荐) 

    apt install proxychains4 或者下载仓库代码进行编译;

    vim /etc/proxychains4.conf 修改配置文件配置 socks5  127.0.0.1 1080 

    测试:proxychains4 curl www.google.com 

    这样支持tcp协议的软件也能进行使用了;

    # 此种方案,适合使用 aaex 代理,electron-ssr 和 git 配合使用;用来使用github进行辅助开发; 

    保持更新,转载请注明出处;更多内容请关注 cnblogs.com/xuyaowen;

  • 相关阅读:
    find
    fdisk
    falcon-eye
    ethtools
    e2fsck
    dpkg
    declare
    df
    debconf-utils
    区块链从零开始做开发(0):hyperledger Fabric2.3安装
  • 原文地址:https://www.cnblogs.com/xuyaowen/p/linux-cmdline-http-https-tcp-proxy.html
Copyright © 2011-2022 走看看