Js-ipfs: Support exposing API/Gateway on multiple multiaddrs

Created on 30 Jan 2019  路  4Comments  路  Source: ipfs/js-ipfs

go-ipfs supports listening on multiple multiaddrs if an array is provided instead of a single multiaddr.

Both snippets are valid in go-ipfs:

ipv4+ipv6

    "Addresses": {
        "API": [
            "/ip4/127.0.0.1/tcp/5002",
            "/ip6/::1/tcp/5002"
        ],
        "Gateway": [
            "/ip4/127.0.0.1/tcp/9090",
            "/ip6/::1/tcp/9090"
        ],

ipv4 only

    "Addresses": {
        "API": "/ip4/127.0.0.1/tcp/5002",
        "Gateway": "/ip4/127.0.0.1/tcp/9090",

Unfortunately js-ipfs does not support arrays, only a single address can be defined ATM.

cc https://github.com/ipfs/js-ipfs/issues/1563, https://github.com/ipfs/go-ipfs/issues/5905

P3 dieasy help wanted

All 4 comments

Hello @lidel @alanshaw is it still possible for me to take a look at this? Not sure if this was already handled.

@grantlouisherman YES 鉂わ笍 it would be awesome if you'd like to take this on. Please ping me if you need any pointers.

hey @alanshaw could you assign someone to that PR whenever it is prudent. I just need some help with the test cases.

Was this page helpful?
0 / 5 - 0 ratings