-
Notifications
You must be signed in to change notification settings - Fork 39
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
Parsing IPFS daemon multiaddress is falsely presumptuous #719
Labels
Comments
This relates to #718 in that while reviewing the PR with @ibnesayeed, noticed the rudimentary, potentially unreliable parsing procedure. The code would be better informed with some test cases, as enumerated in the multiaddr URI above. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In util.py, the IPFS daemon API endpoint is read form ~/.ipfs/config and parsed through
Per https://multiformats.io/multiaddr/, other addresses might be used beyond the default
/ip4/127.0.0.1/tcp/5001
that might have more or less than four parts split by/
, e.g.,/ip4/127.0.0.1/tcp/80/http
.Additionally, the named values do not seem to match that which is parsed, e.g.,
ip4
is not the "scheme".This code should be remedied to be more adaptive to the extent of the variants of mutliaddresses. Does the base library provide any semantic getters of these values rather than trying to parse them?
The text was updated successfully, but these errors were encountered: