zoukankan      html  css  js  c++  java
  • 各种应用使用代理的方法

      每次使用一个应用,就学习一种代理配置方法,慢慢的埋了不少的坑,更换代理又各种重新搜索,重新学习,这下搞个汇总:

    1. tomcat:bin/catalina.sh
      JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=ip -Dhttp.proxyPort=port -Dhttp.nonProxyHosts='localhost|appserver1|127.*|10.*|100.*'"
    2. maven:settings.xml
      <settings>
        <proxies>
          <proxy>
            <id>optional</id>
            <host>ip</host>
            <port>port</port>
            <nonProxyHosts>192.*.*.*</nonProxyHosts>
            <protocol>http</protocol>
            <active>true</active>
          </proxy>
        </proxies>
      </settings>
    3. jenkins:插件管理-高级-代理设置
    4. linux全局配置:/etc/profile、单个用户配置:~/.bashrc
      export http_proxy="http://user:pwd@proxyip:3128"
      export https_proxy="http://user:pwd@proxyip:3128"
    5. yum
      配置方式:/etc/yum.conf
      proxy=http://proxyip:3128
      proxy_username=username
      proxy_password=password
    6. rpm
      配置方式:~/.bash_profile
      export http_proxy=http://proxyip:3128/ 
      export ftp_proxy=http://proxyip:3128/ 
    7. wget
      配置方式: /etc/wgetrc
      http_proxy = http://proxyip:3128/
      ftp_proxy = http://proxyip:3128/
      命令方式:
    8. curl
      配置方式:~/.curlrc
      export http_proxy="http://user:pwd@proxyip:3128"
      export https_proxy="http://user:pwd@proxyip:3128"
      命令方式:
      curl -x "http://user:pwd@proxyip:3128" "http://destination"
    9. npm:~/.npmrc
      proxy=http://ip:3128/
      https-proxy=http://ip:3128/
      命令行:
      npm --proxy http://username:password@cacheaddress.com.br:80 install packagename
  • 相关阅读:
    求子数组最大和
    <转>Android APP字体大小,不随系统的字体大小变化而变化的方法
    模块25 pageobject改造【进阶】
    第5阶段直播
    web测试-赠送课程
    模块四 -使用postman发送请求
    模块三 使用tcpdump抓包分析tcp三次握手四次挥手
    模块二 常见接口协议解析
    20200611_19元素操作
    20200609_18八大元素定位
  • 原文地址:https://www.cnblogs.com/badwood316/p/15594220.html
Copyright © 2011-2022 走看看