Mantid
Loading...
Searching...
No Matches
Framework
Kernel
src
NetworkProxyLinux.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#include "
MantidKernel/NetworkProxy.h
"
8
#include <Poco/URI.h>
9
10
namespace
Mantid::Kernel
{
11
12
//----------------------------------------------------------------------------------------------
15
NetworkProxy::NetworkProxy
() : m_logger(
"network_proxy_logger_generic"
) {}
16
17
ProxyInfo
NetworkProxy::getHttpProxy
(
const
std::string &
/*unused*/
) {
18
ProxyInfo
proxyInfo;
// NoProxy.
19
char
*proxy_var = getenv(
"http_proxy"
);
20
if
(proxy_var ==
nullptr
)
21
proxy_var = getenv(
"HTTP_PROXY"
);
22
23
if
(proxy_var !=
nullptr
) {
24
Poco::URI uri_p(proxy_var);
25
proxyInfo =
ProxyInfo
(uri_p.getHost(), uri_p.getPort(),
true
/*http proxy*/
);
26
}
27
return
proxyInfo;
28
}
29
30
}
// namespace Mantid::Kernel
NetworkProxy.h
Mantid::Kernel::NetworkProxy::NetworkProxy
NetworkProxy()
Constructor.
Definition:
NetworkProxyLinux.cpp:15
Mantid::Kernel::NetworkProxy::getHttpProxy
ProxyInfo getHttpProxy(const std::string &targetURLString)
Get http proxy information.
Definition:
NetworkProxyLinux.cpp:17
Mantid::Kernel::ProxyInfo
ProxyInfo : Container for carrying around network proxy information.
Definition:
ProxyInfo.h:17
Mantid::Kernel
Definition:
AnnularRingAbsorption.h:15
Generated on Tue Jan 3 2023 11:57:51 for Mantid by
1.9.5