reges007

load-balance pac_proxy

Apr 2nd, 2017
1,972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. function FindProxyForURL(url, host)
  2. {
  3. {
  4. if (isPlainHostName(host))
  5. {
  6. return "DIRECT";
  7. }
  8. if (shExpMatch(url, "https:*")){
  9. var bypass = new Array(
  10. "*wormate.io*",
  11. "*torcache.net*",
  12. "*wormax.io*",
  13. "*google-analytics.com*",
  14. "*comwgi.com*",
  15. "*c*bukalapak.com*",
  16. "*platformdl.adobe.com*",
  17. "*fpdownload.adobe.com*",
  18. "*lionair.co.id*",
  19. "*get.adobe.com*",
  20. "*mega.nz*",
  21. "*code.jquery.com*",
  22. "*openpilot.org*",
  23. "*arenatiket.com*",
  24. "*esev.com*",
  25. "*upload.facebook.com*",
  26. "*channel*facebook.com*",
  27. "*login.yahoo.com*",
  28. "*secure.cacert.org*",
  29. "*paspor.siap-online.com*",
  30. "*calomel.org*",
  31. "*ib.bankmandiri.co.id*",
  32. "*glympse.com*",
  33. "*mol.com*",
  34. "*api.wordpress.com*",
  35. "*pixel.wp.com*",
  36. "*dops-ppob.com*",
  37. "*ibank.bni.co.id*",
  38. "*widgets.wp.com*",
  39. "*messenger.yahoo.com*",
  40. "*elasticbeanstalk.com*",
  41. "*web.whatsapp.com*",
  42. "*ibank.klikbca.com*",
  43. "*chat.facebook.com",
  44. "*paypal.com*",
  45. "*drive.google.com*",
  46. "*cimbclicks.co.id*",
  47. "*danamonline.com*",
  48. "*ib.bri.co.id*",
  49. "*bsmnet.syariahmandiri.co.id*",
  50. "*ibank.bni.co.id*",
  51. "*ib.bankmandiri.co.id*",
  52. "*my.telkom.co.id*",
  53. "*shop.telkom.co.id*",
  54. "*arindo.net",
  55. "*pln.co.id*"
  56. );
  57.  
  58. for (var i = 0; i < bypass.length; i++){
  59. var value = bypass[i];
  60. if (shExpMatch(url, value) ) {
  61. return DIRECT;
  62. }
  63. }
  64. var proxy;
  65. if(Math.random() < 0.5){
  66. proxy = "PROXY ip_serv:port1; PROXY ip_serv:port2; DIRECT";
  67. }
  68. else{
  69. proxy = "PROXY ip_serv:port2; PROXY ip_serv:port1; DIRECT";
  70. }
  71. return proxy;
  72. }
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment