Choose an HTTP(S) proxy string, applying no_proxy exclusions and environment defaults.

Synopsis

Declared in <openssl/http.h>

char const*
OSSL_HTTP_adapt_proxy(
    char const* proxy,
    char const* no_proxy,
    char const* server,
    int use_ssl);

Return Value

Constant proxy hostname string to use, or NULL when no proxy should be used.

Parameters

Name

Description

proxy

Explicit proxy hostname, or NULL to use http_proxy/HTTP_PROXY (or https variants when use_ssl).

no_proxy

Exclusion list (comma/whitespace), or NULL to use no_proxy/NO_PROXY.

server

Destination host; if listed in the exclusion set, no proxy is used.

use_ssl

Nonzero selects HTTPS proxy environment variables when proxy is NULL.

Created with MrDocs