minows

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: BSD-3-Clause Imports: 28 Imported by: 0

README

minows

This package implements Mino interface using go-libp2p. More info is to be added as development progresses.

Connection Types

minows supports 2 types of connections between nodes:

  • WebSocket (WS): plaintext exchange without encryption, primarily used for local testing and development
  • WebSocket Secure (WSS): encrypted WebSocket connections, used in production environments

Architecture

minows provides a minimalistic network overlay using WebSocket (Secure) connections. It assumes the following network environment, as illustrated by the diagram:

  • nodes are running in local networks with private addresses (e.g. 172.24.0.6)
  • nodes listen on port 8080 for HTTP connections (:8080)
  • Traefik is configured on each node to listen on port 443 for connections to the public hostname (e.g. p2p-1.dela-1.c4dt.org:443)
  • Traefik accepts incoming HTTP connections from client nodes and establishes corresponding HTTP connections to server nodes
  • the same connections then upgrade to WebSocket Secure (WSS) or WebSocket (WS) between the client node and Traefik, and WebSocket (WS) between Traefik and the server node

Documentation

Index

Constants

View Source
const MaxUnreadAllowed = 1e3

MaxUnreadAllowed Maximum number of unread messages allowed in orchestrator's incoming message buffer before pausing relaying

Variables

View Source
var ErrNotPlayer = xerrors.New("not player")
View Source
var ErrWrongAddressType = xerrors.New("wrong address type")

Functions

func NewController

func NewController() node.Initializer

NewController creates a CLI app to start a Minows instance.

func NewMinows

func NewMinows(listen, public ma.Multiaddr, key crypto.PrivKey) (mino.Mino,
	error)

NewMinows creates a new Minows instance that starts listening. listen: listening address in multiaddress format, e.g. /ip4/127.0.0.1/tcp/80/ws public: public dial-able address in multiaddress format, e.g. /dns4/p2p-1.c4dt.dela.org/tcp/443/wss `public` can be nil and will be determined by the listening address and the port the host has bound to. key: private key representing this mino instance's identity

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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