1

I have this proxy.pac

function FindProxyForURL(url, host) {
  if (isPlainHostName(host) ||
      shExpMatch(host, "*.local") ||
      isInNet(dnsResolve(host), "192.168.1.0",  "255.255.0.0") ||
      isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0"))
      return "DIRECT";
  return "PROXY 192.168.1.10:3128";
}

how do I also include the name (netbios) of my server in proxy.pac so that the PCs of my local network can find the proxy, by the name of the server or its IP (both)

PD: According to Wikipedia, you can put one next to the other, but when they are different proxies:

 return "PROXY proxy1.example.com:80; PROXY proxy2.example.com:8080";

Considering this, I suppose that for my case it should be something like that, but I'm not sure about this:

 return "PROXY serveradmin:3128; PROXY 192.168.1.10:3128";
  • Why would you want to specify the same proxy by address and by name? If your DNS works, use the name, if you are not sure, use the address? – RalfFriedl Jul 20 at 15:08
  • I want both, because there are applications in my local network that work with the name and others with IP (they are already programmed by the manufacturer) – ajcg Jul 20 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.