Cross-platform proxy resolution with support for Linux, macOS, & Windows.
JavaScriptCore
or Windows Script Host
.WinHTTP
, ProxyConfiguration
, and CFNetwork
.
WPAD
using DHCP
and DNS
.Source code examples can be found in the docs for each class or in the command line test application proxycli.
Use CMake to generate project and solution files for your environment:
cmake -S . -B build
cmake --build build
To run CMake tests use the following command:
ctest --verbose -C Debug
Name | Description | Default |
---|---|---|
PROXYRES_CURL | Enables downloading PAC scripts using curl. Without this option set, PAC scripts will only be downloaded using HTTP 1.0. | OFF |
PROXYRES_EXECUTE | Enables support for PAC script execution. Required on Linux due to the lack of a system level proxy resolver. | ON |
PROXYRES_BUILD_CLI | Build command line utility. | ON |
PROXYRES_BUILD_TESTS | Build Googletest unit tests project. | ON |
PROXYRES_CODE_COVERAGE | Build for code coverage. | OFF |
Portions of the code for this library started many years ago as part of a custom HTTP/HTTPS stack we developed at Solid State Networks. Recently we made the decision to switch over to libcurl
but realized that we still needed to retain our own proxy resolution code. We investigated using libproxy
, however it did not allow us to statically link the library for closed source commerical purposes. In the end we decided to separate parts of our proxy implementation to its own library.