Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

How to get peer info to make a peer connection? #2

Open
dylanPowers opened this issue Apr 4, 2015 · 2 comments
Open

How to get peer info to make a peer connection? #2

dylanPowers opened this issue Apr 4, 2015 · 2 comments

Comments

@dylanPowers
Copy link

In https://github.com/ipfs/examples/tree/master/examples/network, I'm looking at

ipfs swarm connect /ip4/104.236.176.52/tcp/4001/ipfs/qmsolnsgccfuzqjzradhn95w2crsfmzutddwp8hxahca9z

and I'm curious if there is a simple way to get /ip4/104.236.176.52/tcp/4001/ipfs/qmsolnsgccfuzqjzradhn95w2crsfmzutddwp8hxahca9z from the peer.
You should probably add that to the example :)

@dylanPowers dylanPowers changed the title How to get peer info to make a connection? How to get peer info to make a peer connection? Apr 4, 2015
@spikebike
Copy link

Seems like there's a couple ways. You could use the web UI or the command line. At the command line ipfs id will list the possible addresses under "Addresses":. Just pick the one you want to use. Any are likely to work except for the localhost if listed.

@jbenet
Copy link
Contributor

jbenet commented Jun 18, 2015

ipfs id is the best way. ipfs id needs some improvement:

  • nice text format
  • <addrs> formay key.

we could also add a command to ipfs swarm like

> ipfs swarm addrs local
/ip4/127.0.0.1/tcp/4001/ipfs/QmbBHw1Xx9pUpAbrVZUKTPL5Rsph5Q9GQhRvcWVBPFgGtC
/ip4/127.94.0.1/tcp/4001/ipfs/QmbBHw1Xx9pUpAbrVZUKTPL5Rsph5Q9GQhRvcWVBPFgGtC
/ip4/192.168.1.103/tcp/4001/ipfs/QmbBHw1Xx9pUpAbrVZUKTPL5Rsph5Q9GQhRvcWVBPFgGtC
/ip4/76.176.168.65/tcp/4001/ipfs/QmbBHw1Xx9pUpAbrVZUKTPL5Rsph5Q9GQhRvcWVBPFgGtC
/ip4/192.168.0.2/tcp/56406/ipfs/QmbBHw1Xx9pUpAbrVZUKTPL5Rsph5Q9GQhRvcWVBPFgGtC

or something.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants