Skip to content

Instantly share code, notes, and snippets.

@rjocoleman
Created April 10, 2012 02:16
Show Gist options
  • Save rjocoleman/2347930 to your computer and use it in GitHub Desktop.
Save rjocoleman/2347930 to your computer and use it in GitHub Desktop.
simple proxy pac configuration
function FindProxyForURL(url, host) {
// bypass proxy for localhost
if (host == "localhost") {return "DIRECT";}
if (host == "127.0.0.1") {return "DIRECT";}
// traffic we want to let in
if (dnsDomainIs(host, ".example.com") ||
dnsDomainIs(host, ".example.net")) {
return "DIRECT";
}
// else send it to our local proxy
return "PROXY 127.0.0.1:8080;"
}
@rjocoleman
Copy link
Author

@one909
Copy link

one909 commented Apr 12, 2020

Ok ขอบคุณ

@Str1ker17
Copy link

Must be return "PROXY 127.0.0.1:8080"; (look at the semicolon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment