Skip to content

Instantly share code, notes, and snippets.

@yukixz
Created April 30, 2016 05:07
Show Gist options
  • Save yukixz/33593782f5b9931144b8308d6c2d6315 to your computer and use it in GitHub Desktop.
Save yukixz/33593782f5b9931144b8308d6c2d6315 to your computer and use it in GitHub Desktop.
PAC file to different proxy for HTTP and HTTPS connection.
// MyFleetGirls: "PROXY 127.0.0.1:8080"
// Shimakaze Go: "PROXY 127.0.0.1:8099"
// Shadowsocks: "SOCKS5 127.0.0.1:1080"
var http_proxy = "PROXY 127.0.0.1:8080"; // Proxy for HTTP connection
var https_proxy = "PROXY 127.0.0.1:8099"; // Proxy for HTTPS connection
function FindProxyForURL(url, host) {
if (url.startsWith('https:')) {
return https_proxy;
} else {
return http_proxy;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment