go-libp2p-circuit-progs

module
v0.0.0-...-a4a8229 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2017 License: MIT

README

go-libp2p-circuit-progs

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.

Install

go get github.com/libp2p/go-libp2p-circuit-progs/...

Usage

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

Contribute

PRs are welcome!

License

MIT (c) vyzo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL