server

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Bismuth Server

This is the Bismuth server, which lets you speak the Bismuth protocol.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BismuthServer

type BismuthServer struct {
	// Public key to use for transmission
	PublicKey *crypto.Key
	// Private key to use for transmission
	PrivateKey *crypto.Key

	// Algorithm to use for encryption (currently XChaCha20Poly1305 is the only option)
	SymmetricEncryptionAlgorithm int
	// Servers that are signing this server. If none, this server becomes self-signed
	// in the clients eyes
	SigningServers []string

	// Called after a successful handshake & connection.
	HandleConnection func(conn net.Conn) error
	// contains filtered or unexported fields
}

Bismuth Server

func NewBismuthServer

func NewBismuthServer(pubKey string, privKey string, signServers []string, encryptionAlgo int, connHandler func(conn net.Conn) error) (*BismuthServer, error)

Initializes a Bismuth server.

Both `pubKey` and `privKey` are armored PGP public and private keys respectively.

func (BismuthServer) HandleProxy

func (bismuth BismuthServer) HandleProxy(conn net.Conn) error

Called to handle a connnection for Bismuth. The conn argument is the client you'd like to handle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳