Cameron-IPFSPodcasting/podcastnode-Python

New Task - Connect to Peer

Opened this issue · 0 comments

Add a task to instruct the node to connect to another IPFS peer.

Since the website knows which peers contain hashes, a connect command could be issued before a pinning attempt.

Node #2 wants to pin a file directly from Node #1
Send task to Node #2 to attempt an "ipfs swarm connect" to Node #1 before executing the "ipfs pin add" command.

This will fail if the other peer has port 4001 closed, or can't be discovered based on their current peers.

This feature could also be used to have all nodes connect to known podcasting gateways.

Cons: This would expose the IP and IPFS ID of the peer since it must be sent to the node making the connection. While IP's & IPFS ID's aren't technically private, they are used to validate requests from IPFS nodes. Exposing both the IP & IPFS ID could allow someone to spoof requests for other nodes.