oci java sdk via proxy

882 Views Asked by At

The Proxy connection area in this page points to an example page which results in a 404. https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/javasdk.htm

page resulting in 404

https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/HttpProxyExample.java

Basically, if I do not want to set a proxy on the JVM but want to use the following style of setting a proxy, is there a full example for this version? Is ProxyConfig supported in OCI java sdk and how do I use it?

ProxyConfig proxyConfig =
   ProxyConfig.builder()
           .host("proxy.mydomain.com")
           .port("80")
           .username("username")
           .password("password")
           .protocol(ProxyConfig.Protocol.HTTP)
           .build();
1

There are 1 best solutions below

0
On

The Apache Connector Provider add-on that is bundled with Oracle Cloud Infrastructure Java SDK 1.2.44 enables the option to specify an HTTP(S) proxy that is for a specific client and not a JVM setting.

For more information, please refer to the README.md hosted on GitHub

An example of configuring a proxy can also be found here.