# libp2p/go-libp2p

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/libp2p-go-libp2p).**

6,830 stars · 1,270 forks · Go · MIT

## Links

- GitHub: https://github.com/libp2p/go-libp2p
- awesome-repositories: https://awesome-repositories.com/repository/libp2p-go-libp2p.md

## Topics

`libp2p` `networking-stack` `p2p`

## Description

go-libp2p is a Go implementation of the libp2p modular networking stack, providing a library for building peer-to-peer applications. It functions as a decentralized application framework that separates transport, security, and discovery layers into pluggable modules for cross-platform interoperability.

The library establishes peer-to-peer connections through a modular transport abstraction that supports multiple protocols, while using public key cryptography for peer identity and protocol-agnostic security transports for encrypting and authenticating all traffic. It enables distributed peer discovery via a distributed hash table, handles NAT traversal through AutoNAT and relay mechanisms, and supports multi-multiplexed stream muxers for sharing connections. A connection gater provides programmatic access control for accepting or rejecting incoming connections and streams.

For observability, go-libp2p includes an event bus that publishes structured events about connection lifecycle and protocol activity, and supports monitoring network performance with prebuilt dashboards for tracking real-time peer-to-peer traffic and system health.

## Tags

### Networking & Communication

- [Peer-to-Peer Application Frameworks](https://awesome-repositories.com/f/networking-communication/peer-to-peer-application-frameworks.md) — Provides a framework for building peer-to-peer systems with NAT traversal, encrypted streams, and multi-transport support.
- [Multi-Transport Connectivity](https://awesome-repositories.com/f/networking-communication/multi-network-connectivity-tools/multi-transport-connectivity.md) — Establishes connections between peers across different network transports like TCP, QUIC, WebSockets, and WebRTC in a unified way.
- [NAT Traversal Mechanisms](https://awesome-repositories.com/f/networking-communication/nat-traversal-mechanisms.md) — Automatically detects NAT status and uses relay nodes to establish connections when direct dialing fails.
- [Modular](https://awesome-repositories.com/f/networking-communication/network-stacks/modular.md) — Provides an extensible networking framework that separates transport, security, and discovery layers for interoperability.
- [Multi-Protocol Transport Abstraction](https://awesome-repositories.com/f/networking-communication/network-transport-protocols/multi-protocol-transport-abstraction.md) — Separates transport protocols into pluggable modules that can be swapped without changing application code.
- [Connectivity Establishment](https://awesome-repositories.com/f/networking-communication/peer-to-peer-clients/connectivity-establishment.md) — Connects nodes over a modular network stack that separates transport, security, and discovery for interoperability. ([source](https://cdn.jsdelivr.net/gh/libp2p/go-libp2p@master/README.md))
- [Peer-to-Peer Networking Extensions](https://awesome-repositories.com/f/networking-communication/peer-to-peer-networking-extensions.md) — Builds modular peer-to-peer applications with pluggable transport, security, and discovery layers for cross-platform interoperability.
- [Peer-to-Peer Networking Libraries](https://awesome-repositories.com/f/networking-communication/peer-to-peer-networking-extensions/peer-to-peer-networking-libraries.md) — Provides transport, security, peer discovery, and protocol multiplexing for decentralized applications.
- [Peer Discovery](https://awesome-repositories.com/f/networking-communication/peer-to-peer-networking/peer-discovery.md) — Uses a distributed hash table to find peers without centralised registries or hardcoded addresses.
- [Stream Multiplexing](https://awesome-repositories.com/f/networking-communication/peer-to-peer-streaming/stream-multiplexing.md) — Allows multiple logical streams to share a single network connection using pluggable stream multiplexers.
- [Peer Connection Gaters](https://awesome-repositories.com/f/networking-communication/tcp-connection-lifecycles/tcp-connection-acceptance/application-level-connection-acceptance/peer-connection-gaters.md) — Provides a callback-based interface to programmatically accept or reject incoming connections and streams.
- [Peer-to-Peer Traffic Dashboards](https://awesome-repositories.com/f/networking-communication/peer-connection-monitoring/peer-to-peer-traffic-dashboards.md) — Observing real-time network performance and health metrics in a peer-to-peer system using prebuilt monitoring dashboards. ([source](https://cdn.jsdelivr.net/gh/libp2p/go-libp2p@master/README.md))

### DevOps & Infrastructure

- [libp2p Implementations](https://awesome-repositories.com/f/devops-infrastructure/release-automation/plugin-extensibility/plugin-extensible-runtimes/go-implementations/libp2p-implementations.md) — Implements the libp2p modular networking stack for building peer-to-peer applications in Go.

### Security & Cryptography

- [Peer Communication Security](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/peer-communication-security.md) — Encrypts and authenticates messages between peers in a distributed network to ensure privacy and integrity.
- [Public Key Authentication](https://awesome-repositories.com/f/security-cryptography/public-key-authentication.md) — Each peer is identified by its public key, enabling secure handshakes and authenticated communication.
- [Negotiable Security Transports](https://awesome-repositories.com/f/security-cryptography/transport-security/negotiable-security-transports.md) — Encrypts and authenticates all traffic through negotiable security transports like TLS or Noise.

### Software Engineering & Architecture

- [Internal Observability Event Buses](https://awesome-repositories.com/f/software-engineering-architecture/event-bus-architectures/internal-observability-event-buses.md) — Publishes structured events about connection lifecycle and protocol activity for monitoring and debugging.
