Skip to content

Commit

Permalink
feat(doc): update for PAC file use and new priority
Browse files Browse the repository at this point in the history
  • Loading branch information
jmkerloch committed Oct 4, 2024
1 parent cb6b6ea commit bc0d4bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docs/guides/howto_behind_proxy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How to use behind a network proxy

:::{info}
Only HTTP and HTTPS proxies are supported. No socks, no PAC.
Only HTTP and HTTPS proxies are supported. No socks. Automatic values definition from PAC file available.
:::

> See [Requests official documentation](https://docs.python-requests.org/en/latest/user/advanced/#proxies)
Expand All @@ -19,9 +19,13 @@ qdt --proxy-http "http://user:[email protected]:8765"

## Using environment variables

### Generic `HTTP_PROXY` and `HTTPS_PROXY`
For proxy definition, QDT use this order of priority:

- it allows a specific URL by protocol (scheme)
- `QDT_PROXY_HTTP`
- `QDT_PAC_FILE`
- PAC file from system
- Proxy configuration from system
- Generic `HTTP_PROXY` and `HTTPS_PROXY`

### Custom `QDT_PROXY_HTTP`

Expand All @@ -32,10 +36,12 @@ qdt --proxy-http "http://user:[email protected]:8765"

[PAC file](https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file) can be used by SysAdmin to define proxy with a set of rules depending on the url.

For QDT, PAC file can be used if no environment variable for proxy are already defined (`HTTP_PROXY`,`HTTPS_PROXY`, `QDT_PROXY_HTTP`).

[PyPac](https://pypac.readthedocs.io/en/latest/) is used for PAC file management. By default we are using the PAC file defined by system but a custom PAC file can be defined with `QDT_PAC_FILE` environment variable (local file or url).

### Generic `HTTP_PROXY` and `HTTPS_PROXY`

- it allows a specific URL by protocol (scheme)

#### Example on Windows PowerShell

Only for the QDT command scope:
Expand Down
1 change: 1 addition & 0 deletions docs/usage/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Some others parameters can be set using environment variables.
| `QDT_STREAMED_DOWNLOADS` | If set to `false`, the content of remote files is fully downloaded before being written locally. | `true` |
| `QDT_SSL_USE_SYSTEM_STORES` | By default, a bundle of SSL certificates is used, through [certifi](https://pypi.org/project/certifi/). If this environment variable is set to `true`, QDT tries to uses the system certificates store. Based on [truststore](https://truststore.readthedocs.io/). See also [How to use custom SSL certificates](../guides/howto_use_custom_ssl_certs.md). | `False` |
| `QDT_SSL_VERIFY` | Enables/disables SSL certificate verification. Useful for environments where the proxy is unreliable with HTTPS connections. Boolean: `true` or `false`. | `True` |
| `QDT_PAC_FILE` | Define PAC file for proxy definition. See also [How to use behind a proxy](../guides/howto_behind_proxy.md). | `` |

----

Expand Down

0 comments on commit bc0d4bc

Please sign in to comment.