Code Monkey home page Code Monkey logo

proxyres's Introduction

proxyres - proxy resolution library in C

CodeFactor codecov License: MIT

Cross-platform proxy resolution with support for Linux, macOS, & Windows.

Read the Documentation

Features

  • Read the user's proxy configuration from the operating system.
  • Execute a PAC script using JavaScriptCore or Windows Script Host.
  • Get the proxies for a URL asynchronously using WinHTTP, ProxyConfiguration, and CFNetwork.
    • Or with a fallback proxy resolver featuring:
      • Support for WPAD using DHCP and DNS.
      • Support for PAC file execution using system scripting libraries.
      • Support for downloading PAC scripts using HTTPS with curl.
  • Example command line utility.

Supported Platforms

  • Windows XP+, RT (UWP)
  • Ubuntu 18
  • macOS 10.13

Example

Source code examples can be found in the docs for each class or in the command line test application proxycli.

Build

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

Options

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

History & Motivation

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 implement 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.

Resources

proxyres's People

Contributors

nmoinvaz avatar sergio-nsk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gmh5225 odzhan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.