Imagine

Phil Pennock ipv6-ops+phil at spodhuis.org
Thu May 6 01:40:35 CEST 2010


On 2010-05-05 at 23:09 +0200, Thomas Schäfer wrote:
> there is an ipv6-only net. All base services like smtp(s), imap(s), ntp, 
> printing, ssh,  dns-resolver... and so on are ipv6 capable.
> What is to do with the "old" world - specifically http(s)/ftp-services?
> Ok - a proxy is good answer. But now my actual question:
> 
> Is there a possibillity to make simple proxysettings in Firefox in this way:
> site has only A-Record-- > use proxy
> site has AAAA-Record--> connect directly
> 
> Is this possible with a Proxy Auto-Config (pac) -file?

Yes.

What I wrote a couple of weeks ago was "if there's only an IPv6 record,
go direct, else use proxy", because of some proxies that aren't IPv6
capable.  This should give you the general idea of what to do, though.

function FindProxyForURL(url, host)
{
  // ... other stuff ...

  // IPv6-only
  if (isResolvableEx(host) && !isResolveable(host))
    return "DIRECT";

  // ...  more stuff ...

  return "PROXY my.proxy.host.example.net:3128";
}

You probably want this:
  http://blogs.msdn.com/wndp/archive/2006/07/18/IPV6-WPAD-for-WinHttp-and-WinInet.aspx
which I believe the other browsers are supporting now; I didn't try
Firefox, only Chrome/Linux, which I can confirm does support the IPv6
extensions.

You'd probably want to use dnsResolve() and dnsResolveEx(), sort the
results and compare those lists; if they're equal, there were no AAAA
records.

-Phil


More information about the ipv6-ops mailing list