# Connecting through a proxy

The client can work behind a proxy, which is a common situation in large enterprises. The client will read the standard variables “http\_proxy” or "https\_proxy" in order to detect such configuration automatically.

The configuration however can also be done through these system properties (or [specific controls](/the-client/command-line-parameters/specific-controls.md)):

`-Dhttp.proxy.host=<host>`\
`-Dhttp.proxy.port=<port>`\
`-Dhttp.proxy.user=<username>`\
`-Dhttp.proxy.pass=<password>`&#x20;

Both “host” and “port” properties need to be defined in order for the proxy to be used. When that happens, the client will echo to you that a proxy is being used while he tries to authorize itself, in a format similar to this one:

```
$ java -Dhttp.proxy.host=proxy.acme.org -Dhttp.proxy.port=3128 -jar
~/apps/meterian-cli.jar -

Meterian Client v0.4.6
All rights reserved
[…]

Authorizing the client...
Using http proxy: http://proxy.acme.org:3128
[…]
```

Furthermore, when you launch the client with the “--help” parameter it will also test the connectivity to the servers, as in this example:

```
$ java -jar ~/apps/meterian-cli.jar --help

Meterian Client v1.2.6, build 09ce5de-283
All rights reserved

 --help Displays this help end exits(0)
[...]

Using http proxy http://proxy.acme.org:3128
Using authentication for proxy username:***

Meterian servers are reachable from this system
```

You also have a couple of fine grained controls over your http stack, which we honestly think will be rarely used but we list here as a matter of completeness, with their default:

`-Dhttp.connect.timeout.millis=9000`

The timeout in milliseconds to estabilish a connection over http/https

`-Dhttp.socket.timeout.millis=8000`

The timeout in milliseconds before declaring a connection over http/https dead.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meterian.io/the-client/general-operations/connecting-through-a-proxy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
