Guest User

Untitled

a guest
Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function FindProxyForURL(url, host) {
  2.  
  3. const proxyAddressWithPort = '127.0.0.1:80'
  4.  
  5. const inList = (host, list) => list.some(h => {
  6. return dnsDomainIs(host, h) || dnsDomainIs(host, `www.${h}`)
  7. })
  8.  
  9. host = host.toLowerCase();
  10.  
  11. if (inList(host, [
  12. 'ip-ping.ru', // for checking.
  13. 'telegram.org',
  14. 'web.telegram.org'
  15. ]))
  16. return "PROXY ${proxyAddressWithPort}";
  17.  
  18. return "DIRECT";
  19. }
Add Comment
Please, Sign In to add comment