the_usik

pac

Jul 22nd, 2021 (edited)
870
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var proxy = "213.166.90.124:30009";
  2. // var proxy = "45.128.231.73:30009";
  3. function FindProxyForURL (url, host) {
  4.     var whiteListDomains = [
  5.         "userapi.com",
  6.         "ya.ru",
  7.         "tns-counter.ru",
  8.         "vk.com",
  9.         "mail.ru",
  10.         "yandex.ru"
  11.     ];
  12.  
  13.     var useProxy = false;
  14.    
  15.     for (var index in whiteListDomains) {
  16.         //var matched = shExpMatch(host, whiteListDomains[index]);
  17.         var matched = host.indexOf(whiteListDomains[index]);
  18.        
  19.         if (matched != -1) {
  20.             useProxy = true;
  21.             break;
  22.         }
  23.     }
  24.  
  25.     if (useProxy) {
  26.         return "PROXY " + proxy;
  27.     }
  28.    
  29.     return 'DIRECT';
  30. }
RAW Paste Data