Skip to content

little-bear-labs/libp2p-day-2022-demo-webrtc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Overview

This repo contains demo code for LibP2P Day 2022. The goal is to demonstrate interopability between the Go and Javascript implementations of Libp2p using the WebRTC transport.

Contents

  • ./go-libp2p-host/

Example of a Go p2p listener using the WebRTC transport.

  • ./p2p-react/

Example of a React web app with a p2p dialer using the WebRTC transport.

Instructions

Running Go listener service:

  1. Build and run the service
    $ cd go-libp2p-host
    $ go build
    $ ./go-libp2p-host
  1. Collect the service's multiaddr The output of go-libp2p-host should be something like:

    p2p addr: /ip4/172.29.128.142/udp/62499/webrtc/certhash/uEiBec5Z32kurAEP29bQ-B20RdhokNzjujfwBh79xh0b6mw/p2p/12D3KooWH3sWbHfTsqHMpV1zWAB2me2H4yXABwxRCupLNwkSfsgD press Ctrl+C to quit

Copy the multiaddr following p2p addr:

Running the react dialier app:

  1. Build and run the app
    $ cd p2p-react
    $ npm run build
    $ npm start
  1. Open a web browser and navigate to http://localhost:3000
  2. Paste the multiaddr from the Go listener into the Peer MultiAddress form and click the Dial button.

About

A demo of webrtc+libp2p for libp2p day 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published