0

Trying to use Amazon SQS on a corporate environment where they have Windows OS servers but they have a force http proxy pool.

Using standard java code I can get through the http proxy fine using JVM config:

-Djava.net.useSystemProxies=true

Is there a similar option within the AWS-SDK for Java. Specifically for SQS?

I am asking because the OS get given a proxy based on a pool. If we assume one specific proxy in the code then it will not work.

The AWS ClientConfiguration appears to want only one specific server which if we do may clash with what is given to the or what we have told it to point to hence the certs would end up being signed wrong.

Is there an equivalent way of telling the AWS SDK to use the System Proxy and if so how.

Thank you in advance for your help.

DevilCode
  • 1,054
  • 3
  • 35
  • 61
  • 1
    If you need to connect via proxy, then you should use `ClientConfiguration`. Have you tried retrieving the system proxy with `System.getProperties().get("http.proxyHost")` and setting it to `ClientConfiguration` if the proxy is from a pool? Otherwise if you want to set the JVM parameter `useSystemProxies`, then setting it on the server startup would be best option. – Prasann Mar 12 '19 at 21:36
  • Yes have been looking at this but if you set JVM to useSystemProxies calling System.getProperties().get("http.proxyHost") returns null. SEE: https://stackoverflow.com/questions/31360161/retrieving-default-values-defined-in-java-net-properties-file – DevilCode Mar 12 '19 at 22:42

0 Answers0