### Run pacproxy and configure environment Source: https://github.com/williambailey/pacproxy/blob/master/README.md Starts the proxy server with a custom PAC script and configures shell environment variables to route traffic through the local proxy. ```bash # shell 1 pacproxy -c 'function FindProxyForURL(url, host){ console.log("hello pac world!"); return "PROXY random.example.com:8080"; }' # shell 2 export http_proxy="127.0.0.1:8080" export https_proxy="127.0.0.1:8080" curl -I "http://www.example.com" ``` -------------------------------- ### View pacproxy help output Source: https://github.com/williambailey/pacproxy/blob/master/README.md Displays the command-line interface usage, available flags, and version information. ```bash $ ./pacproxy -h pacproxy v2.0.7 A no-frills local HTTP proxy server powered by a proxy auto-config (PAC) file https://github.com/williambailey/pacproxy Usage: -c string PAC file name, url or javascript to use (required) -l string Interface and port to listen on (default "127.0.0.1:8080") -r string Resolve the proxies for the provided url to STDOUT and exit -v send verbose output to STDERR ``` -------------------------------- ### Resolve proxy for a URL Source: https://github.com/williambailey/pacproxy/blob/master/README.md Uses the -r flag to resolve the proxy for a specific URL based on the provided PAC script and outputs the result to STDOUT. ```bash pacproxy -c 'function FindProxyForURL(url, host){ return "PROXY random.example.com:8080"; }' -r "http://www.example.com" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.