Skip to content

Commit

Permalink
docs: update proxy configuration documentation (#6237)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong authored Dec 6, 2023
1 parent f5bd492 commit 472b0da
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 17 deletions.
20 changes: 10 additions & 10 deletions ant/src/site/markdown/config-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ Configuration: dependency-check-update Task
--------------------
The following properties can be set on the dependency-check-update task.

Property | Description | Default Value
----------------------|-------------------------------------------------------------------------|------------------
proxyServer | The Proxy Server. |  
proxyPort | The Proxy Port. |  
proxyUsername | Defines the proxy user name. |  
proxyPassword | Defines the proxy password. |  
nonProxyHosts | Defines the hosts that will not be proxied. |  
connectionTimeout | The URL Connection Timeout (in milliseconds). | 10000
readtimeout | The URL Read Timeout (in milliseconds). | 60000
failOnError | Whether the build should fail if there is an error executing the update | true
Property | Description | Default Value
----------------------|-----------------------------------------------------------------------------------------------|------------------
proxyServer | The Proxy Server; see the [proxy configuration](../data/proxy.html) page for more information.|  
proxyPort | The Proxy Port. |  
proxyUsername | Defines the proxy user name. |  
proxyPassword | Defines the proxy password. |  
nonProxyHosts | Defines the hosts that will not be proxied. |  
connectionTimeout | The URL Connection Timeout (in milliseconds). | 10000
readtimeout | The URL Read Timeout (in milliseconds). | 60000
failOnError | Whether the build should fail if there is an error executing the update | true

Advanced Configuration
====================
Expand Down
35 changes: 28 additions & 7 deletions src/site/markdown/data/proxy.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
Proxy Configuration
===================
All of the dependency-check clients (CLI, Maven, Gradle, Ant, Jenkins) can be configured
to use a proxy to connect to the Internet. See the configuration settings for each:
# Proxy Configuration

With dependency-check 9.x the proxy configuration is unfortunately in transition
and, if required, will likely need to be **configured twice**.

## Java Properties

The go-forward proxy configuration is done using standard Java proxy configuration
settings which can be set using an environment variable `JAVA_TOOL_OPTIONS`.
See https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html for
more information. The properties that can be configured are:

- https.proxyHost
- https.proxyPort
- https.proxyUser
- https.proxyPassword
- http.nonProxyHosts

As example configuration would be:

```bash
export JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=my-proxy.internal -Dhttps.proxyPort=8083"
```

## Legacy configuration

Legacy proxy configuration can be configured in any of the dependency-check integrations
(CLI, Maven, Gradle, Ant, Jenkins). See the configuration settings for each:

* [Maven Plugin](https://jeremylong.github.io/DependencyCheck/dependency-check-maven/configuration.html)
* [Gradle Plugin](https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html)
* [Ant Task](https://jeremylong.github.io/DependencyCheck/dependency-check-ant/configuration.html)
* [Command Line](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html)

Note, it may also be possible to use the core [Java proxy](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html)
system properties instead of the configuration above.

Certificate Errors
------------------
In some cases if you setup a proxy the connection may still fail due to certificate
Expand Down

0 comments on commit 472b0da

Please sign in to comment.