MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getProxyHost

Function getProxyHost

src/Common/EnvironmentProxyConfigurationResolver.cpp:25–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace
24{
25 const char * getProxyHost(DB::ProxyConfiguration::Protocol protocol)
26 {
27 /*
28 * getenv is safe to use here because ClickHouse code does not make any call to `setenv` or `putenv`
29 * aside from tests and a very early call during startup: https://github.com/ClickHouse/ClickHouse/blob/master/src/Daemon/BaseDaemon.cpp#L791
30 * */
31 switch (protocol)
32 {
33 case ProxyConfiguration::Protocol::HTTP:
34 return std::getenv(PROXY_HTTP_ENVIRONMENT_VARIABLE); // NOLINT(concurrency-mt-unsafe)
35 case ProxyConfiguration::Protocol::HTTPS:
36 return std::getenv(PROXY_HTTPS_ENVIRONMENT_VARIABLE); // NOLINT(concurrency-mt-unsafe)
37 }
38 }
39
40 const char * getNoProxyHosts()
41 {

Callers 3

connectMethod · 0.85
proxyConnectMethod · 0.85
resolveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected