www

www::proxypac manual page
Login

Proxy auto-config for Tcl HTTP client library

www::proxypac - Proxy auto-config add-on for the www Tcl library

SYNOPSIS

package require Tcl 8.6
package require www 2.0
package require www::proxypac 2.1

DESCRIPTION

The www::proxypac package adds support for proxy auto-configuration (PAC) files to the www package. After the www::proxypac package has been loaded, the -proxy configuration option of the www command can be set to "proxypac pacurl", where pacurl is the URL of the Automatic proxy configuration resource.

A PAC file contains a JavaScript function FindProxyForURL(url, host). If available, the duktape package is used to run the JavaScript code. Alternatively, the proxypac module translates the JavaScript code to Tcl to make repeatedly running it reasonably fast. As it is not feasible to implement a full JS->Tcl conversion, only a small subset of JavaScript is supported. But since PAC files don't normally use very complex code, it should work for most PAC files. If the conversion fails, the filter defaults to DIRECT.

If the simple JS conversion is too limited to properly handle the PAC file, consider installing the duktape package: https://github.com/dbohdan/tcl-duktape

SEE ALSO

www

COPYRIGHT

Copyright © 2021 Schelte Bron