-
Notifications
You must be signed in to change notification settings - Fork 295
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
Feat/rest/client: auto-handling of libp2p endpoints #498
Conversation
2aef08a
to
36b8990
Compare
This removes PeerAddr and uses APIAddr directly, figuring out if it is a Peer multiaddress or not. PeerAddr is actually kept for compatiblity. It also fixes a bad panic when resolving returned 0 results License: MIT Signed-off-by: Hector Sanjuan <code@hector.link>
36b8990
to
522791d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just after some clarification for the one godoc comment.
api/rest/client/client.go
Outdated
// (takes precedence over host:port). It this address contains | ||
// an /ipfs/, /p2p/ or /dnsaddr, the API will be contacted | ||
// through a libp2p tunnel, thus getting encryption for | ||
// free. The latter overrides any SSL configurations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter overrides any SSL configurations.
I am not sure what is going to override any SSL configurations? On first read, I thought latter
was referring to /dnsaddr
but that doesn't make much sense.
License: MIT Signed-off-by: Hector Sanjuan <code@hector.link>
@lanzafame should be good now |
This removes PeerAddr and uses APIAddr directly, figuring out if it is
a Peer multiaddress or not.
PeerAddr is actually kept for compatiblity.
It also fixes a bad panic when resolving returned 0 results
License: MIT
Signed-off-by: Hector Sanjuan code@hector.link