Page MenuHomePhabricator

IPv6 Support
Open, LowPublic

Description

There are three general parts to IPv6 support:

  • Inbound Requests: Accepting requests from clients using IPv6. For example, a user visits https://phabricator.mycompany.com/ over IPv6.
  • Outbound Requests: Sending requests from Phabricator to external IPv6 hosts. For example, a user tries to import a calendar event or an image macro from https://ipv6-image-macros.com/cat.jpg, where that host is IPv6-only.
  • Intracluster Requests: Running Phabricator in a cluster on hosts in IPv6-only mode.

State of the world:

Request TypeStatusNotes
Inbound SupportedPhabricator should be able to receive requests from IPv6 clients.
Outbound Mostly Not SupportedPhabricator can not make outbound HTTP requests to IPv6 hosts yet (SSH probably works).
Intracluster UnknownNo one expressed interest in running an IPv6-only cluster yet.

At the time of writing (Dec 2016) we haven't seen requests for outbound or intracluster support, so we don't have active plans to pursue them in the near term. I expect to pursue them as IPv6 is more widely adopted.


For inbound support:

  • PhutilIPAddress only supports IPv4.
  • PhutilCIDRBlock only supports IPv4.
  • Double-check for remaining callers to ip2long() + integer IP address storage, and/or short address fields in the database. I believe we removed all of these already in anticipation of IPv6 support.
  • We store or write remote addresses in some cases: push log, user activity log, access log, SSH log. These should be updated to use the preferred display form for addresses, so 1::1 and 1:0::1 are not different addresses.

For outbound support:

  • Broadly, IPv6 URIs may appear in this general form: http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/
  • We use PHP's parse_url() in PhutilURI, which can not parse IPv6 addresses as raw hostnames in URIs. The failure mode is that these requests are rejected, so this is safe, but you can't, e.g., import a Macro from a host with a raw IPv6 address.
  • We use gethostnamebyl() to resolve hostnames, but this can only resolve IPv4 addresses. The failure mode is that these requests are rejected, so this is safe, but you can't import a Macro from an IPv6 host with no IPv4 address.

For cluster support:

  • Not yet clear what issues may exist.

Related Objects

Event Timeline

epriestley lowered the priority of this task from Normal to Low.Dec 5 2016, 7:26 PM
epriestley updated the task description. (Show Details)

I believe HEAD of master can now accept IPv6 requests, with the caveat that most of my testing has been at least somewhat synthetic and I haven't set up a legitimate, dedicated, IPv6-only host anywhere to be certain it works. That said, I'm reasonably confident that my synthetic testing was fairly thorough, since not very much code really cares about the remote address and I was able to make legitimate requests to ::1 over HTTP and SSH, and from synthetic IPv6 remote addresses. If you run into issues with sending IPv6 requests to Phabricator, let us know.

Some other less important support (downloading macros from IPv6-only servers, for example) is not yet available, but I suspect it will be years before anyone seriously runs into this, since funny-cat-pictures.com is probably going to have an IPv4 address for a while even as it adds IPv6 support.

I've updated the task description to discuss the state of the world more broadly.