Questions tagged [pac]

A proxy auto config file (PAC) is used by a web browser (or other agent) to choose the proxy server to be used using the specified URL as a criteria for the selection.

A proxy auto-config (PAC) file defines how web browsers and other user agents can automatically choose the appropriate proxy server (access method) for fetching a given URL.

A PAC file contains a JavaScript function FindProxyForURL(url, host). This function returns a string with one or more access method specifications that cause the user agent to use a particular proxy server, or to connect directly.

This is an example of a very simple PAC file:

function FindProxyForURL(url, host) {
    return "PROXY proxy.example.com:8080; DIRECT";
}

this PAC file instructs the browser to retrieve all pages through the proxy on port 8080 of the server proxy.example.com. Should this proxy fail to respond, the browser tries to contacts the Web-site directly, without using a proxy.

A more complicated PAC file can be like this:

function FindProxyForURL(url, host) {
    // our local URLs from the domains below example.com don't need a proxy:
    if (shExpMatch(host, "*.example.com")) {
        return "DIRECT";
    }

    // URLs within this network are accessed through
    // port 8080 on fastproxy.example.com:
    if (isInNet(host, "10.0.0.0", "255.255.248.0")) {
        return "PROXY fastproxy.example.com:8080";
    }

    // All other requests go through port 8080 of proxy.example.com.
    // should that fail to respond, go directly to the WWW:
    return "PROXY proxy.example.com:8080; DIRECT";
}
150 questions
3
votes
1 answer

IsInNet for ASP

First Post. So I am working on a project due to some drawbacks to the abilities of a standard PAC file. Basically we need to route proxy rules based on the internal subnet of the requester. Currently the IsInNet function is the option, however…
user245637
3
votes
1 answer

proxy pac file in windows 7/ie10

I have set the proxy file as shown below: function FindProxyForURL(url, host) { return "PROXY 10.10.10.10:8080"; } Nothing exists at 10.10.10.10. In IE10/Windows 7 x64, I have disabled "Automatically Detect Settings" and "use Proxy Server for…
John
  • 768
  • 1
  • 13
  • 21
3
votes
0 answers

How to get access log of PAC(proxy auto config)

I'm using Chrome, and I want monitor brower access log for myself ( I suspect some extension send url in background, etc ), I try to use Privoxy, but it can't logging HTTPS url I think PAC is the only way for logging original url, I use PAC for few…
Zheng Kai
  • 3,473
  • 3
  • 17
  • 23
3
votes
1 answer

Where in Windows is the Javascript file which contains functions for executing PAC files?

Proxy Auto Config (PAC) is the traditional method by which web-browsers are automatically configured to use the appropriate proxy for any given site. PAC files consist of a single function implemented in JavaScript. I'd like to execute this…
Salim Fadhley
  • 22,020
  • 23
  • 75
  • 102
2
votes
2 answers

Proxy PAC file: change proxy every set time interval?

I remember a while back reading about editing the proxy pac file which would switch proxies every set time interval, such as on an hourly basis. But I cannot find the function or remember how to do this, am I mistaken or is this possible with…
KJW
  • 15,035
  • 47
  • 137
  • 243
2
votes
1 answer

javascript get my local LAN ip address

I have quite happily set up pac files using myIpAddress() as a function to resolve the local IP on my LAN to load balance my proxies. I now need to use this function, or anything that works simply, to return the local ip so that I can change the…
2
votes
0 answers

Impact of "cleartext HTTP URL schemes for Proxy Automatic Configuration (PAC) is now deprecated" on IOS 15 beta app

As in September new version ios i.e. IOS 15 is coming. There are some APIs getting depricated. I have a concern about "cleartext HTTP URL schemes for Proxy Automatic Configuration (PAC) is now deprecated". Support for cleartext HTTP URL schemes for…
Sandeep Rajbhar
  • 93
  • 1
  • 10
2
votes
1 answer

Titanium Web Proxy : How to run it only for one specific domain

I tried Titanium C# Web Prox, and I am very happy with it. The only point is about to know how can I configure the Web Proxy to handle only web traffic that concerns a specific domain, let say contoso.org. In fact, this custom web proxy is created…
Marc Alves
  • 43
  • 4
2
votes
2 answers

How to heal inconsistent parent tree mappings in a PDF created by pdfBox

We are creating pdf documents in Java using pdfBox. Since they should be accessible by Screenreaders, we are using tags and we are setting up a parentTree and we add that to the document catalog. Please find an example file here. When we check the…
rsr03
  • 41
  • 1
  • 5
2
votes
0 answers

'Java Deployment' allows 'auto proxy(PAC/WPAD)', what about the JRE?

Both files below are part of a JAVA installation and contain proxy settings C:\Users\\AppData\LocalLow\Sun\Java\Deployment\deployment.properties (also reflected in the RegKey:…
Houtman
  • 2,819
  • 2
  • 24
  • 34
2
votes
1 answer

how to make cloudant pick a .pac file?

In my python (2.7) application I make use of a Cloudant database as follows: from cloudant.client import Cloudant client = Cloudant('XXX', 'YYY', account='ZZZ') client.connect() my_db = client['my_database'] for doc in my_db: print doc The…
Bill Bridge
  • 821
  • 1
  • 9
  • 30
2
votes
1 answer

Proxy Switching on URL

I want to be able to set proxy rules on chrome so that when i go to a site defined in a rules file it will connect to it through the proxy. I have tried various extensions like Proxy SwichyOmega but it never seemed to work. What is the best way to…
Tim
  • 21
  • 1
2
votes
0 answers

Handling large pac files in C# HTTPWebRequest

I currently have a C# application which makes frequent web requests that have to potentially go through proxy authentication. In this situation, a large PAC file (200kb+) is used to automatically configure the proxy and is stored on a remote…
2
votes
1 answer

perl cant connect website due to pac file HTTP::ProxyPAC error

Im using HTTP::ProxyPAC module to get the proxy from pac file. but i get the error "neither the JavaScript module nor the JS module seems to be available" please let me know how to proceed. here is my code use strict; use warnings; use…
Techie
  • 21
  • 3
2
votes
1 answer

Linux config system proxy by pac file

Is it possible for me to config system-wide proxy by a .pac file under linux? I know I could set proxy by export $PROXY=proxyserver:port But I want to implement something like: export $PROXY=~/proxy.pac Maybe I need a local lightweight proxy…
Given92
  • 101
  • 2
  • 8
1 2
3
9 10