まめちしき

まめちしき

PAC

const dmm_dict = new Set([
  'www.dmm.com',
  'osapi.dmm.com',
  'accounts.dmm.com',
  'play.games.dmm.com',
  'artemis.games.dmm.com',
  'cdnjs.cloudflare.com'
]);

function FindProxyForURL(url, host) {
    
    if (dnsDomainIs(host, ".kancolle-server.com")) {
        return "SOCKS5 127.0.0.1:1080; DIRECT";
    }

    if (dmm_dict.has(host)) return "PROXY 10.1.1.9:8124; DIRECT";

    // local ips -> direct
    if (
        isInNet(host, "127.0.0.0", "255.0.0.0") || 
        isInNet(host, "10.0.0.0", "255.0.0.0") || 
        isInNet(host, "172.16.0.0", "255.240.0.0") || 
        isInNet(host, "192.168.0.0", "255.255.0.0")
    ) return "DIRECT";
    
    // final -> block everthing
    return "PROXY 127.0.0.1:4444";
}
Last updated on