Go-ipfs: Enable Gateway on localhost IPv6 (ip4+ip6 by default)

Created on 8 Jan 2019  ·  5Comments  ·  Source: ipfs/go-ipfs

Version information:

0.4.18

Type:


enhancement

Description:

What? How do we feel about migrating default Gateway config to listen on ipv6 as well?
For now, this can be enabled manually via:

$ ipfs config --json Addresses.Gateway '["/ip4/127.0.0.1/tcp/8080","/ip6/::1/tcp/8080"]'

Why? It is a cosmetic change that enables much shorter URLs for local gateway and shift focus towards IPFS paths:

2019-01-08-125329_758x575_scrot

How?

Current default:

$ ipfs config --json Addresses.Gateway
/ip4/127.0.0.1/tcp/8080

Proposed change (arrays are supported since https://github.com/ipfs/go-ipfs-config/pull/11):

$ ipfs config --json Addresses.Gateway
[
  "/ip4/127.0.0.1/tcp/8080",
  "/ip6/::1/tcp/8080"
]

Additional notes:

AFAIK only 127.0.0.1 and ::1 are whitelisted by browser vendors (eg. firefox #903966) while localhost is not (that is why Companion uses raw IP)

kinenhancement topigateway

Most helpful comment

For what it’s worth, I’ve been running my local gateway on [::1] for almost a year with no issues.

All 5 comments

We should definitely listen on both. Mind making a PR?

...also to JS IPFS 🙏

For what it’s worth, I’ve been running my local gateway on [::1] for almost a year with no issues.

@Stebalien We can include it in upcoming migration, what do you think?

SGTM (iff the user is already listening on 127.0.0.1).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kallisti5 picture kallisti5  ·  3Comments

emelleme picture emelleme  ·  3Comments

ArcticLampyrid picture ArcticLampyrid  ·  3Comments

whyrusleeping picture whyrusleeping  ·  4Comments

JesseWeinstein picture JesseWeinstein  ·  4Comments