Put proxy settings ?

Hi there,

In my project developpement I figured that i’m going to hit an uncommon problem.

I’m using Orthanc kind of a dirty way, with a Java app that deploy a temporary install of Orthanc to do some anonymize and send operation.

I have a problem of connectivity, in several hospital the outgoing connexion have to pass over a proxy. I found an hopital where the proxy stops my Java app to communicate with my web server.
In Java I can handle the proxy in my interface, but the proxy that break the external connexion in Java will also break the Orthanc Peer transfers mechanism that I’m driving though my app.

In my project I would want to make a generic package for this local orthanc client, so I wan’t to avoid having to encode some personalized Orthanc.json in my “distribution” that will force me to build dedicated package to each users.

My question is : Would it be possible to dynamically change some settings in Orthanc ?
I see the Orthanc API already have some settings defined parameters that can be add with a “PUT” restAPI such as OrthancPeer or /tools/default-encoding.

On my side I would be interested to change the “HttpProxy” settings dynamically. Thus I will be able to set the proxy settings in my Orthanc Session according to the user’s input that I will get in my Java App.

I was wondering if that could be add in the next releases if it is not too difficult ?

Best regards,

Salim

Hi Salim,

Given the fact that we’re using libCurl and that libcurl seems to honor the http_proxy environment variable (https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html), I think you should give it a try.

If no “HttpProxy” setting is defined in the orthanc configuration file, Orthanc will use the libCurl defaults (that should therefore be the http_proxy env var).

Best regards,

Alain

Hi Salim,

You wouldn’t need to set the system-wide HTTP proxy. You could simply try and set the environment variable only when launching the Orthanc process, e.g. using bash on GNU/Linux:

$ http_proxy=http://foo:bar@202.54.1.1:3128/ ./Orthanc

NB: I haven’t tested this by myself.

Sébastien-

Ok thanks got it !

I will try this way when my colleague will come back,

Best regards

Salim