connsec

package module
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: MIT Imports: 4 Imported by: 0

README

go-conn-security

standard-readme compliant GoDoc Coverage Status Build Status

Stream security transport interfaces

This package defines the interfaces that must be fulfilled by libp2p network security transports. Security transports take go net.Conn connections and upgrade them to encrypted and authenticated connections.

Known libp2p security transports include:

Install

go-conn-security is a standard Go module which can be installed with:

go get github.com/libp2p/go-conn-security

Note that go-conn-security is packaged with Gx, so it is recommended to use Gx to install and use it (see the Usage section).

Usage

This module is packaged with Gx. In order to use it in your own project it is recommended that you:

go get -u github.com/whyrusleeping/gx
go get -u github.com/whyrusleeping/gx-go
cd <your-project-repository>
gx init
gx import github.com/libp2p/go-conn-security
gx install --global
gx-go --rewrite

Please check Gx and Gx-go documentation for more information.

For more information about how go-conn-security is used in the libp2p context, you can see the go-libp2p-conn module.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

Want to hack on IPFS?

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	net.Conn
	inet.ConnSecurity
}

Conn is an authenticated, encrypted connection.

type Transport

type Transport interface {
	// SecureInbound secures an inbound connection.
	SecureInbound(ctx context.Context, insecure net.Conn) (Conn, error)

	// SecureOutbound secures an outbound connection.
	SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (Conn, error)
}

A Transport turns inbound and outbound unauthenticated, plain-text connections into authenticated, encrypted connections.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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