PAC files

Proxy Auto-Configuration (PAC) #

Forwarder implements Proxy Auto-Configuration (PAC) file support. PAC file is a JavaScript file that returns a proxy URL for a given URL. It can be used to implement complex proxy rules.

Forwarder also implements Microsoft’s PAC extensions for IPv6. So you can use FindProxyForURL and FindProxyForURLEx functions to implement IPv6-aware proxy rules.

PAC file server #

Forwarder can be used as a PAC file server. See forwarder pac server command reference for more details.

PAC file evaluation #

Forwarder can be used to evaluate PAC files. See forwarder pac eval command reference for more details.

Functions you can use in PAC files #

The following JavaScript functions are implemented in Forwarder:

  • alert
  • convert_addr
  • dateRange
  • dnsDomainIs
  • dnsDomainLevels
  • dnsResolve
  • dnsResolveEx
  • getClientVersion
  • getDay
  • getMonth
  • isInNet
  • isInNetEx
  • isPlainHostName
  • isResolvable
  • isResolvableEx
  • isValidIpAddress
  • localHostOrDomainIs
  • myIpAddress
  • myIpAddressEx
  • shExpMatch
  • sortIpAddressList
  • timeRange
  • weekdayRange

© 2024 Sauce Labs Inc.