My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ConsumerForwardProxy  
Forward-proxy configuration for consumer sites / Relying Parties
zh-Hans , en
Updated Feb 4, 2010 by Johnny.B...@gmail.com

Consumer Forward Proxy

If your Relying Party / consumer site needs to access the internet through a proxy, the following proxy configuration is necessary, before the ConsumerManager is instantiated:

// --- Forward proxy setup (only if needed) ---
ProxyProperties proxyProps = new ProxyProperties();
proxyProps.setProxyName("proxy.example.com");
proxyProps.setProxyPort(8080);
HttpClientFactory.setProxyProperties(proxyProps);
Comment by akio.shi...@gmail.com, Feb 13, 2009

Is there a way to define proxying exceptions? i.e., let it work like below?

  • example.com -> non-Proxy
Other destinations -> Proxy

There is no getter/setter for ProxyProperties? like:

ProxyProperties#setProxyExceptions?(String)

Comment by akio.shi...@gmail.com, Jan 13, 2010

Hi, no response for the comment? maybe my explanation was bad...

What I meant was that the current design of HttpClientFactory? and ProxyProperties? seems not able to handle something equivalent to env variable "NO_PROXY".

For example, if following Env Variables are set, then "wget" command on unix systems use proxy for such uri's as "http://google.com" but does not use one for "http://sales.my-company.com"

HTTP_PROXY=proxy.my-company.com
NO_PROXY=.my-company.com,.my-company.net

http://java.sun.com/javase/6/docs/api/java/net/Proxy.html


Sign in to add a comment
Powered by Google Project Hosting