In corporate environments all cross-node communication may be required to go through a corporate proxy. You can accomplish this by using the router services to establish:
Internal communication between services and their local router within a JPD.
Outbound communication through a proxy.
To configure the router, set the following in each service's System YAML Configuration File.
The following example assumes the proxy is listening on 126.96.36.199:7777 for HTTP and on 188.8.131.52:8888 for HTTPS.
router: proxy: # Proxy url for all outgoing http requests httpUrl: "http://184.108.40.206:7777" # Proxy url for all outgoing https requests httpsUrl: "https://220.127.116.11:8888" # List of target hosts to communicate with directly, bypassing the proxy. # "localhost" will always be added to this list automatically. ignoredHosts: - "example1.ignored.host" - "example2.ignored.host"
The router automatically adds localhost to the ignored hosts.
The example uses the system configuration file, but you can do the the same with environment variables (
The router respects also the standard proxy related environment variables (
NO_PROXY), but the router's system configuration takes precedence if defined.
Configure all other services in a similar way to prevent them to go through proxy when calling the local router and to use the proxy when going out to external third party services like Artifactory remote repositories.