The examples need to be modified to create a HttpClient that respects the Java system properties for HTTP proxies and then the system properties need to be defined upon execution.
HttpClient httpClient = HttpClientBuilder.create().useSystemProperties().build(); // or HttpClient httpClient = HttpClients.createSystem();
Execute the Java application with the following additional properties:
-Dhttps.proxyHost=<proxy hostname or ip>-Dhttps.proxyPort=<proxy port>
Example:
java -Dhttps.proxyHost=10.86.33.20 -Dhttps.proxyPort=80 -jar app.jar
For the .Net Sample app, if the system default proxy does not work, you can force a specific proxy by adding this to the app.config file (using your proxy values of course):
<configuration> ... <system.net> <defaultProxy> <proxy usesystemdefault="True" proxyaddress="http://127.0.0.1:8888" bypassonlocal="True" /> </defaultProxy> </system.net> </configuration>
I had the same problem with my new proxy provider, this may be a problem with the provider, or is it my settings? thank you in advance
Proxy settings depend on what program or language you are using. The answers above explain how to setup the proxy parameters for Java and .Net.
Assuming your proxy parameters are correct (you can get them from your provider or local IT administrator), you should be able to connect fine. Proxy parameters are usually an IP address (or hostname) and a port. In some cases there might also be a username and password.
If you still need help, please give more details on your environment and setup.
Version 10.6 of the .Net SDK supports setting the proxy on the context. For example:
context.Options.Proxy = new WebProxy("127.0.0.1", 8888);