-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPv6 Support #10
Comments
For some reason I closed this when #105 was merged, which was a mistake. That PR was about listening on a local IPv6 port, whereas this issue is about supporting IPv6-aware functions for PAC scripts to call. As of #123, it is now possible for myIpAddress() to return an IPv6 address. If Alpaca isn't consistent about this, it might break PAC scripts that expect an IPv4 address (e.g. myIpAddress() returns an IPv6 address but the script passes the result to isInNet() rather than isInNetEx()). This should be considered before the next release. Some references:
|
As I mentioned in my previous comment, I'm inclined to keep all the functions IPv4-only, and build support for IPv6 only in the *Ex() functions, which would be IPv4/IPv6. I've reproduced the table from the Chromium source code below, and added a row for isInNet() and a column for what I think Alpaca should do:
|
The PAC "standard" as defined by Netscape includes a few functions that assume IPv4, so Alpaca currently only supports IPv4.
Microsoft has a few extensions which work better for IPv6 and Google has implemented some of these functions into Chrome (although they make these functions available in the regular
FindProxyForURL
function, rather than just scoping it toFindProxyForURLEx
). These includednsResolveEx()
andmyIpAddressEx()
, and they both replace functions that return IPv4 addresses only with functions that could return either (or both).There are also other functions that accept IPv4 addresses, and should be extended to accept IPv6 addresses as well. These include
isResolvable()
andisInNet()
.The only remaining function is
convert_addr()
. There doesn't appear to be an IPv6 version in Mozilla, Microsoft or Google's implementations, and it doesn't make sense for Alpaca to implement its own extension to the standard, so I'll leave this as it is.The text was updated successfully, but these errors were encountered: