ipfs/ipfs-companion

Check API on both ipv4 and ipfv6

Open

#908 ouverte le 8 juil. 2020

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)JavaScript (364 forks)batch import
P3effort/daysexp/experthelp wantedneed/analysisneed/maintainers-input

Métriques du dépôt

Stars
 (1 992 stars)
Métriques de merge PR
 (Merge moyen 53j 3h) (1 PR mergée en 30 j)

Description

Fun edge case that is super painful to debug:

i had a lingering service bound to: [::1]:8080 (ipv6), so the browser was trying that first. go-ipfs does not bind to that for the gateway so i wasn't getting any feedback ipfs companion could also check for both -- as localhost in the browser will try ipv6 first

Needs more analysis, but initial thoughts:

  • enforce use of raw IP for API port (if it does not yet), convert localhost if needed (removes ambiguity which v is used)
  • support entering API URL as ip4 and ip6 (needs fix for #904)
  • when one fails, try another one, and fixup URL if second one is successful (test with /api/v0/id)

Guide contributeur