All pastes #674540 Raw Edit

Untitled

public text v1 · immutable
#674540 ·published 2007-08-29 10:30 UTC
rendered paste body
function FindProxyForURL(url, host) {

  use_socks = 'SOCKS 192.168.1.200:5555; DIRECT';
  use_squid = 'PROXY 192.168.1.200:3128; DIRECT';
  no_proxy = 'DIRECT;';

  if (isInNet(host, "192.168.1.0", "255.255.255.0")) {
    return no_proxy;
  }

  if (shExpMatch(url, "http://*example.com*")) {
    return use_socks;
  }

  return use_squid;

}