README.md 2.78 KB
Newer Older
Steven Allen's avatar
Steven Allen committed
1
# go-conn-security-multistream
Steven Allen's avatar
Steven Allen committed
2 3 4 5 6

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
Steven Allen's avatar
Steven Allen committed
7 8 9
[![GoDoc](https://godoc.org/github.com/libp2p/go-conn-security-multistream?status.svg)](https://godoc.org/github.com/libp2p/go-conn-security-multistream)
[![Coverage Status](https://coveralls.io/repos/github/libp2p/go-conn-security-multistream/badge.svg?branch=master)](https://coveralls.io/github/libp2p/go-conn-security-multistream?branch=master)
[![Build Status](https://travis-ci.org/libp2p/go-conn-security-multistream.svg?branch=master)](https://travis-ci.org/libp2p/go-conn-security-multistream)
Steven Allen's avatar
Steven Allen committed
10

Steven Allen's avatar
Steven Allen committed
11
> Connection security multistream multiplexer
Steven Allen's avatar
Steven Allen committed
12

Steven Allen's avatar
Steven Allen committed
13
This package provides a multistream multiplexed [security transport](https://github.com/libp2p/go-conn-security). It:
Steven Allen's avatar
Steven Allen committed
14 15 16 17 18 19 20 21 22 23

1. Selects a security security transport using multistream-select.
2. Secures the stream using the selected transport.

Known libp2p security transports include:

* [go-libp2p-secio](https://github.com/libp2p/go-libp2p-secio)

## Install

Steven Allen's avatar
Steven Allen committed
24
`go-conn-security-multistream` is a standard Go module which can be installed with:
Steven Allen's avatar
Steven Allen committed
25 26

```sh
Steven Allen's avatar
Steven Allen committed
27
go get github.com/libp2p/go-conn-security-multistream
Steven Allen's avatar
Steven Allen committed
28 29
```

Steven Allen's avatar
Steven Allen committed
30
Note that `go-conn-security-multistream` is packaged with Gx, so it is recommended to use Gx to install and use it (see the Usage section).
Steven Allen's avatar
Steven Allen committed
31 32 33 34 35 36 37 38 39 40

## Usage

This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project it is recommended that you:

```sh
go get -u github.com/whyrusleeping/gx
go get -u github.com/whyrusleeping/gx-go
cd <your-project-repository>
gx init
Steven Allen's avatar
Steven Allen committed
41
gx import github.com/libp2p/go-conn-security-multistream
Steven Allen's avatar
Steven Allen committed
42 43 44 45 46 47
gx install --global
gx-go --rewrite
```

Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information.

Steven Allen's avatar
Steven Allen committed
48
For more information about how `go-conn-security-multistream` is used in the libp2p context, you can see the [go-libp2p-conn](https://github.com/libp2p/go-libp2p-conn) module.
Steven Allen's avatar
Steven Allen committed
49 50 51

## Contribute

Steven Allen's avatar
Steven Allen committed
52
Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-conn-security-multistream/issues)!
Steven Allen's avatar
Steven Allen committed
53 54 55 56 57 58 59 60 61 62

This repository falls under the IPFS [Code of Conduct](https://github.com/libp2p/community/blob/master/code-of-conduct.md).

### Want to hack on IPFS?

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)

## License

MIT