選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

java-proxy-config.sh 997B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # To set the proxy configuration, specify the following host name and port
  3. #PROXY_HOST=
  4. #PROXY_PORT=
  5. # To exclude any hosts from proxy configuration such that they directly accessed by Gitblit without passing through the proxy server, append the host name to the following variable using "|" as the separator
  6. NON_PROXY_HOSTS="localhost|127.0.0.*|*.local|192.168.*.*|10.193.*.*"
  7. ### The following should not need to be modified
  8. JAVA_PROXY_CONFIG=""
  9. if [ -n "${PROXY_HOST}" -a -n "${PROXY_PORT}" ]; then
  10. JAVA_PROXY_CONFIG=" -DproxySet=true -Dhttp.proxyHost=${PROXY_HOST} -Dhttp.proxyPort=${PROXY_PORT} -Dhttps.proxyHost=${PROXY_HOST} -Dhttps.proxyPort=${PROXY_PORT} -Dftp.proxyHost=${PROXY_HOST} -Dftp.proxyPort=${PROXY_PORT} "
  11. fi
  12. if [ -n "${PROXY_HOST}" -a -n "${PROXY_PORT}" -a -n "${NON_PROXY_HOSTS}" ]; then
  13. JAVA_PROXY_CONFIG="${JAVA_PROXY_CONFIG} -Dhttp.nonProxyHosts=\"${NON_PROXY_HOSTS}\" -Dftp.nonProxyHosts=\"${NON_PROXY_HOSTS}\" "
  14. fi
  15. export JAVA_PROXY_CONFIG