各种应用使用代理的方法(Methods of using agents for various applications)

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

  • tomcat:bin/catalina.sh

    JAVA_OPTS=”$JAVA_OPTS -Dhttp.proxyHost=ip -Dhttp.proxyPort=port -Dhttp.nonProxyHosts=’localhost|appserver1|127.*|10.*|100.*'”

JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=ip -Dhttp.proxyPort=port -Dhttp.nonProxyHosts='localhost|appserver1|127.*|10.*|100.*'"
  • maven:settings.xml

    optional
    ip port 192.*.*.* http true

<settings>
  <proxies>
    <proxy>
      <id>optional</id>
      <host>ip</host>
      <port>port</port>
      <nonProxyHosts>192.*.*.*</nonProxyHosts>
      <protocol>http</protocol>
      <active>true</active>
    </proxy>
  </proxies>
</settings>
  • jenkins:插件管理-高级-代理设置
————————

Each time you use an application, you learn an agent configuration method, slowly burying a lot of holes, changing agents, re searching and re learning. Here’s a summary:

  • tomcat:bin/catalina.sh

    JAVA_OPTS=”$JAVA_OPTS -Dhttp.proxyHost=ip -Dhttp.proxyPort=port -Dhttp.nonProxyHosts=’localhost|appserver1|127.*|10.*|100.*'”

JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=ip -Dhttp.proxyPort=port -Dhttp.nonProxyHosts='localhost|appserver1|127.*|10.*|100.*'"
  • maven:settings.xml

    optional
    ip port 192.*.*.* http true

<settings>
  <proxies>
    <proxy>
      <id>optional</id>
      <host>ip</host>
      <port>port</port>
      <nonProxyHosts>192.*.*.*</nonProxyHosts>
      <protocol>http</protocol>
      <active>true</active>
    </proxy>
  </proxies>
</settings>
  • Jenkins: plug in management – Advanced – agent settings