Simple (interop) testing programs for go-libp2p-circuit:
- relay, a Hop relay.
- relay-echod: an echoing daemon reachable through relay.
- relay-echoc: a client for an echo daemin reachable through relay.
go get github.com/libp2p/go-libp2p-circuit-progs/...
Start a relay:
$ relay
Relay addresses:
/ip4/127.0.0.1/tcp/9001/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe
/ip4/10.0.1.30/tcp/9001/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe
/ip6/::1/tcp/9001/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe
/ip4/127.0.0.1/tcp/9002/ws/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe
/ip4/10.0.1.30/tcp/9002/ws/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe
Start an echo server reachable through relay:
$ relay-echod /ip4/127.0.0.1/tcp/9001/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe
Listening at /p2p-circuit/ipfs/QmUB1XXEDrXZqXGTDBNtcniUNv9ZAE8bEZnqCoYVXyV6Bc
Use the echo client to talk to an echo server:
$ relay-echoc /ip4/127.0.0.1/tcp/9001/ipfs/QmRhDVAfdaBw7zpk5jn4L4BcBJDH1DZrKBHENqUwAvjkRe/p2p-circuit/ipfs/QmUB1XXEDrXZqXGTDBNtcniUNv9ZAE8bEZnqCoYVXyV6Bc "hello world"
Peer says: hello world
OK
PRs are welcome!
MIT (c) vyzo