Debian Codegraph @

crt/aws-c-http/include/aws/http/private/no_proxy.h

raw symbols SCIP
1 #ifndef AWS_NO_PROXY_H
2 #define AWS_NO_PROXY_H
3
4 /**
5 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6 * SPDX-License-Identifier: Apache-2.0.
7 */
8 #include <aws/http/http.h>
9 AWS_PUSH_SANE_WARNING_LEVEL
10 AWS_EXTERN_C_BEGIN
11
12 /*
13 * Check if a host should bypass the proxy based on the NO_PROXY environment variable or provided no_proxy value.
14 * Since NO_PROXY has no standard yet. Follows the curl implementation from noproxy.c at 8.14.1.
15 * https://github.com/curl/curl/blob/curl-8_14_1/lib/noproxy.c
16 *
17 * NO_PROXY is a comma-separated list of domain names, hostnames, or IP addresses that
18 * should bypass the proxy.
19 *
20 * If no_proxy is NULL, the function will read the NO_PROXY environment variable.
21 * If no_proxy is provided, it will be used instead of the environment variable.
22 *
23 * Returns true if the host should bypass the proxy.
24 */
25 AWS_HTTP_API bool aws_http_host_matches_no_proxy(
26 struct aws_allocator *allocator,
27 struct aws_byte_cursor host,
28 struct aws_string *no_proxy_str);
29
30 AWS_EXTERN_C_END
31 AWS_POP_SANE_WARNING_LEVEL
32
33 #endif /* AWS_NO_PROXY_H */