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
0
votes
1 answer

GCP - Proxy .pac File Configuration

I would like to know if someone knows how to configure proxy on GCP Sdk. My proxy is an .pac file, eg http//hostname:port/proxy.pac. Does anyone know how to set this?. Regards.
vyplow
  • 69
  • 1
  • 2
  • 10
0
votes
1 answer

How to determine a specific proxy in use determined by wpad.dat outside of IE

My company has a very large and complex web proxy auto configuration (PAC) file. Is there any way to determine from command line, or maybe Java/Powershell, which proxy will be used by IE i.e. I want to determine the output from FindProxyForURL(url,…
JerryH
  • 1
0
votes
0 answers

iTextSharp table cell not wrap through ScreenReader viewer in PAC 2.0

I used iTextSharp to create PDF document. Added table. Checked the PDF accessibility through PAC 2.0. When I read the document through "ScreenReader Preview" option of the PAC tool,table cells are not wrapped. PDF document is generated the table as…
Briyatis
  • 57
  • 2
  • 14
0
votes
0 answers

internet properties - read configuration script path

I would like to read the value in the "Use automatic configuration script" Address field. I need to set the proxy for CefSharp like this settings.CefCommandLineArgs.Add("proxy-pac-url","proxy address"); I have tried different variations of…
Martin Andersen
  • 2,460
  • 2
  • 38
  • 66
0
votes
1 answer

Registering PAC Proxy file from Firefox WebExtension - Functions not defined

When I try to register a .pac file from a webextension background script in Firefox using browser.proxy.register("proxy.pac"), all the PAC functions expected to be available are not. Using isNetName(), dnsResolve(), shExpMatch(), etc. all throw an…
0
votes
0 answers

how to start meteor app behind a corporate proxy in windows 7?

I have a meteor app which i want to run on my local machine using webstorm IDE in my Windows 7 OS. I have navigated to the meteor project folder and then entered command meteor run. The output is D:\test\Dashboard>meteor run [[[[[…
Snkini
  • 571
  • 1
  • 5
  • 16
0
votes
1 answer

c++ tiny-js execute javascript function from external file

I have a C++ application which has to execute a Javascript-function from a dynamic file. (I need to read a proxy.pac file). E.g. I have a C++ application running which reads the following file: proxy.pac (which contains the javascript function…
TVA van Hesteren
  • 1,031
  • 3
  • 20
  • 47
0
votes
0 answers

PAC file & IIS - Redirect unwanted HTTPS URLs to an error page

I am trying to redirect unwanted HTTPS URLs to a proxy and display a custom error page. First, my pac file is served by an IIS10 Website bound on port 80 to the clients. Second, in my pac file i check a few URL with dnsDomainIs and if the domain…
Yopplay
  • 1
  • 1
0
votes
1 answer

Modify the PAC address of the WiFi network

I want to modify the PAC address of the WiFi network through the code, how should I do? like this picture, please help me.
kyle
  • 11
  • 1
0
votes
1 answer

PAC File Return Options towards localhost

Unable to find a definite answer in regards to my question. I was wondering if it was possible to poison the pac file to point to loopback address so that the traffic dies out. Seems that the traffic I am pointing to 127.0.0.1 is still going towards…
SREEK
  • 38
  • 10
0
votes
1 answer

Pac's file URL, how to retrieve a query param value in FindProxyForURL function

How can I read query param value of PAC's file URL inside FindProxyForURL function? For example: my pac file url: ....../proxy.pac?port=8082 I'd like to be able to get a port value in FindProxyForURL function.
El Kopyto
  • 1,157
  • 3
  • 18
  • 33
0
votes
0 answers

ASIHTTP JavacriptCore WTFCrash

My APP use ASIHTTP request net data.But I got some crash like This. I guess this crash will happen when user set Pac Proxy.


    0  JavaScriptCore                 0x18be7f418 WTFCrash + 72
    1  JavaScriptCore                 0x18be7f410…
ganvinalix
  • 65
  • 5
0
votes
1 answer

Accessing Auto Proxy URL in Android?

My Android app uses curl to make network calls. I want to find out how I can get the URL that's present in the WiFi proxy auto config in an android device, inside of my application to actually be able to route the charles call through the proxy URL…
Anton Unt
  • 1,835
  • 1
  • 21
  • 47
0
votes
1 answer

Testing Proxy auto-config FindProxyForURL() via Javascript Console

Is it possible to test a Proxy auto-config (PAC) script by manually executing the FindProxyForURL(url, host) function from the browser JavaScript console? Can the internal implementation of the PAC functions (such as dnsDomainIs, shExpMatch,…
ryanmonk
  • 171
  • 1
  • 7
0
votes
1 answer

Change system Proxy settings using Android SDK

I'm migrating a Google Chrome extension that I made to an Android version, but I'm facing some questions. It is basically a Proxy server for certain websites that were blocked in my country. This is working on Chrome by changing the proxy settings…
Henrique Mouta
  • 43
  • 1
  • 1
  • 10
1 2 3
9
10