Forum How do I...?

Proxy by pass options

warnaarKennisnet
As mentioned by Fran in this Topic : https://www.princexml.com/forum/topic/668/java-http-proxy

Is it possible to define a list to exclude some domains to by pass the http-proxy?

Regards,
Andreas
mikeday
We don't have an option for this yet, we will investigate.
mikeday
The easiest solution might be to setup a proxy for the proxy. :D
warnaarKennisnet
Thx for your replies.

We shared the shame idea, but yesterday I found another solution.

Because princexml uses curl, I can use the curl supported environment variables http_proxy and no_proxy.

By removing the proxy parameter from the command
prince --http-proxy=export-proxy:3128
And define the proxy rules in the environment variables that curls supports, I was able to exclude specific and wildcard domains from the proxy.

Example:
 https_proxy=export-proxy:3128 http_proxy=export-proxy:3128 no_proxy=www.wikipedia.org,.lorempixel.com "/usr/bin/prince"



more information can be found here: https://curl.haxx.se/libcurl/c/CURLOPT_NOPROXY.html

I tested this on Debian 10

Hopefully its is useful for others.


mikeday
That's excellent! Thanks for sharing.
csant
Excellent, Andreas! Do you mind if we mention this approach in our documentation?
warnaarKennisnet
That would be perfect!,
so.. no I dont mind

Edited by warnaarKennisnet