<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 5/5/10 5:48 PM, Simon Lockhart wrote:<br>
<blockquote cite="mid:20100505214837.GV2911@virtual.bogons.net"
 type="cite">
  <pre wrap="">No - logic in the PAC file can be executed for every URL request (or, at
least that was the case when I wrote PAC files about 10 years ago). I have
no idea how much it has been updated to support IPv6.
  </pre>
</blockquote>
<meta charset="utf-8">
<span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="font-family: 'Courier New'; font-size: 13px;">You are correct.
I did some reading up on this and it looks like you can use the
dnsResolve function to find the IP address for a host and then do regex
matching to determine if it an IPv4 or IPv6 address.<br>
<br>
hostip = dnsResolve(host);<br>
</span></span>
<meta charset="utf-8">
<span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="font-family: 'Courier New'; font-size: 13px;">if
(shExpMatch(hostip, "/^\d+\.\d+\.\d+\.\d+$/g")) {<br>
&nbsp;&nbsp;&nbsp; return "PROXY proxyserver:8080;<br>
}<br>
else {<br>
</span></span><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="font-family: 'Courier New'; font-size: 13px;">&nbsp;&nbsp;&nbsp; return
"DIRECT";<br>
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
</span></span><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="font-family: 'Courier New'; font-size: 13px;"></span></span>
</body>
</html>