Created
May 18, 2012 11:18
-
-
Save Seacolor/2724756 to your computer and use it in GitHub Desktop.
nicoCache自動構成スクリプト(Zero対応)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host) { | |
// variable strings to return | |
var proxy_nicocache = "PROXY localhost:3573"; | |
var proxy_non = "DIRECT"; | |
if (shExpMatch(host, "msg*.nicovideo.jp*")) | |
return proxy_non; | |
if (shExpMatch(host, "riapi.nicovideo.jp*")) | |
return proxy_non; | |
if ((shExpMatch(host, "*nicovideo.jp*") || | |
shExpMatch(host, "*smilevideo.jp*")) && | |
url.substring(0, 5) == "http:") { | |
return proxy_nicocache; | |
} | |
return proxy_non; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment