GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - proxyres/proxyres: Cross-platform proxy resolution library written in C.

BranchesTags
Open more actions menu

Latest commit

 

History

810 Commits
810 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
doc
doc
 
 
include/proxyres
include/proxyres
 
 
test
test
 
 
.clang-format
.clang-format
 
 
.codecov.yaml
.codecov.yaml
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
config.c
config.c
 
 
config_env.c
config_env.c
 
 
config_env.h
config_env.h
 
 
config_gnome2.c
config_gnome2.c
 
 
config_gnome2.h
config_gnome2.h
 
 
config_gnome3.c
config_gnome3.c
 
 
config_gnome3.h
config_gnome3.h
 
 
config_i.h
config_i.h
 
 
config_kde.c
config_kde.c
 
 
config_kde.h
config_kde.h
 
 
config_mac.c
config_mac.c
 
 
config_mac.h
config_mac.h
 
 
config_win.c
config_win.c
 
 
config_win.h
config_win.h
 
 
event.h
event.h
 
 
event_pthread.c
event_pthread.c
 
 
event_win.c
event_win.c
 
 
execute.c
execute.c
 
 
execute_duktape.c
execute_duktape.c
 
 
execute_duktape.h
execute_duktape.h
 
 
execute_i.h
execute_i.h
 
 
execute_jsc.c
execute_jsc.c
 
 
execute_jsc.h
execute_jsc.h
 
 
execute_jscore.c
execute_jscore.c
 
 
execute_jscore.h
execute_jscore.h
 
 
execute_wsh.c
execute_wsh.c
 
 
execute_wsh.h
execute_wsh.h
 
 
execute_wsh_dispatch.h
execute_wsh_dispatch.h
 
 
execute_wsh_site.h
execute_wsh_site.h
 
 
fetch.h
fetch.h
 
 
fetch_curl.c
fetch_curl.c
 
 
fetch_mac.m
fetch_mac.m
 
 
fetch_posix.c
fetch_posix.c
 
 
log.c
log.c
 
 
log.h
log.h
 
 
mozilla_js.h
mozilla_js.h
 
 
mutex.h
mutex.h
 
 
mutex_pthread.c
mutex_pthread.c
 
 
mutex_win.c
mutex_win.c
 
 
net_adapter.c
net_adapter.c
 
 
net_adapter.h
net_adapter.h
 
 
net_adapter_linux.c
net_adapter_linux.c
 
 
net_adapter_mac.c
net_adapter_mac.c
 
 
net_adapter_win.c
net_adapter_win.c
 
 
net_util.c
net_util.c
 
 
net_util.h
net_util.h
 
 
proxyres.c
proxyres.c
 
 
proxyres_config.h.in
proxyres_config.h.in
 
 
resolver.c
resolver.c
 
 
resolver_gnome3.c
resolver_gnome3.c
 
 
resolver_gnome3.h
resolver_gnome3.h
 
 
resolver_i.h
resolver_i.h
 
 
resolver_mac.c
resolver_mac.c
 
 
resolver_mac.h
resolver_mac.h
 
 
resolver_posix.c
resolver_posix.c
 
 
resolver_posix.h
resolver_posix.h
 
 
resolver_win8.c
resolver_win8.c
 
 
resolver_win8.h
resolver_win8.h
 
 
resolver_winrt.c
resolver_winrt.c
 
 
resolver_winrt.h
resolver_winrt.h
 
 
resolver_winxp.c
resolver_winxp.c
 
 
resolver_winxp.h
resolver_winxp.h
 
 
testing.h
testing.h
 
 
threadpool.h
threadpool.h
 
 
threadpool_pthread.c
threadpool_pthread.c
 
 
threadpool_winvista.c
threadpool_winvista.c
 
 
threadpool_winxp.c
threadpool_winxp.c
 
 
util.c
util.c
 
 
util.h
util.h
 
 
util_linux.c
util_linux.c
 
 
util_linux.h
util_linux.h
 
 
util_win.c
util_win.c
 
 
util_win.h
util_win.h
 
 
wpad_dhcp.c
wpad_dhcp.c
 
 
wpad_dhcp.h
wpad_dhcp.h
 
 
wpad_dhcp_mac.c
wpad_dhcp_mac.c
 
 
wpad_dhcp_mac.h
wpad_dhcp_mac.h
 
 
wpad_dhcp_posix.c
wpad_dhcp_posix.c
 
 
wpad_dhcp_posix.h
wpad_dhcp_posix.h
 
 
wpad_dhcp_posix_p.h
wpad_dhcp_posix_p.h
 
 
wpad_dhcp_win.c
wpad_dhcp_win.c
 
 
wpad_dhcp_win.h
wpad_dhcp_win.h
 
 
wpad_dns.c
wpad_dns.c
 
 
wpad_dns.h
wpad_dns.h
 
 

Repository files navigation

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, JavaScriptCoreGTK, Windows Script Host or Duktape.
  • 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 script execution using system scripting libraries or Duktape.
      • Support for downloading PAC scripts using HTTPS with curl.
  • Handles multiple simultaneous resolution requests by utilizing a thread pool.
  • 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_DUKTAPE Build with Duktape JavaScript engine for PAC script execution. OFF
PROXYRES_EXECUTE Enables support for PAC script execution. Required on Linux due to the lack of a system level proxy resolver. ON
PROXYRES_CFNETWORK Use the native CFNetwork PAC resolver on Apple. Set to OFF to use the JavaScript engine, which supports HTTPS proxies. Without PROXYRES_CURL, http PAC urls may then need an ATS exception. 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 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.

Resources

  • Wikipedia - Proxy Auto-config
  • Mozilla - Proxy Auto-Configuration (PAC)
  • RFC Drafts
    • Web Proxy Auto-Discovery Protocol
    • Generalize Client UDP Port Number of DHCP Relay
  • Windows Proxy Setting "Bypass proxy server for local addresses"

About

Cross-platform proxy resolution library written in C.

Topics

ccross-platformcurlduktapegnomejavascriptcorelinuxmacosproxiesproxyresolverubuntuwindowswinhttpwsh

Resources

Readme
MIT license
Activity
Custom properties

Stars

17 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.