Exclude host from proxy settings

oc-internals

#1

Hello,
Is there a way to exclude a host from the proxy settings?

In the config.php we defined a proxy server according to this.
https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/config_sample_php_parameters.html#proxy-configurations

My app uses HTTP:CLient:IClientService to issue a post to a privacyIDEA server. The App will only issue posts to this very server, which is located in our network, in a secure subnet, which can not be reached by the proxy server. Thus I need the possibility to exclude this very host from being passed to the proxy.

So I wonder, if there is either a way in the central config.php to exclude the host or if there is an undocumented parameter in the post request of the IClientService
https://doc.owncloud.org/api/classes/OCP.Http.Client.IClient.html
which would tell the IClient to not pass the request to the proxy?

Thanks a lot
Cornelius


#2

I see that the guzzle client is used in lib/private/Http/Client/Client.php, which sets the proxy via

The settings are set the OC client code sets the settings before each post requst,

$this->client->setDefaultOption('proxy', $this->getProxyUri());

which in my opinion is a bit suboptimal. This means that before each POST request the proxy system config is read, which does not allow me to issue a POST request without a proxy.
Will create an issue and probably a pull request.


#3

Here is the reference: