Added support for loading keypair as file used in authentication in direct mode
There is a need to have ability to load existing keypair file used for authentication with P2P nodes which only allow known PeerIds to connect (https://docs.rs/libp2p/latest/libp2p/allow_block_list/index.html#structs).
Proposed change adds additional parameter in "direct" mode to load keypair from given file path. This only applies to direct mode connecting to a given node which requires authentication with "whitelisted" PeerId. Currently it only supports base58 encoded files.
Example:
libp2p-lookup direct --address /dns/node-1/tcp/55123 --keypair-path ~/path/to/key.base58
There is a need to have ability to load existing keypair file used for authentication with P2P nodes which only allow known PeerIds to connect (https://docs.rs/libp2p/latest/libp2p/allow_block_list/index.html#structs).
//CC @thomaseizinger since you might be excited to see your work being used.
Great to see
libp2p-lookupused more widely and contributions flowing back. Thank you!Overall I am in favor of this patch. I just have a couple of suggestions.
Thanks @mxinden your suggestions make sense, will get them ready.