rosenpass

package
v0.27.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(preSharedKey *wgtypes.Key, wgIfaceName string) (*Manager, error)

NewManager creates a new Rosenpass manager

func (*Manager) Close

func (m *Manager) Close() error

Close closes the Rosenpass server

func (*Manager) GetAddress

func (m *Manager) GetAddress() *net.UDPAddr

GetAddress returns the address of the Rosenpass server

func (*Manager) GetPubKey

func (m *Manager) GetPubKey() []byte

func (*Manager) OnConnected

func (m *Manager) OnConnected(remoteWireGuardKey string, remoteRosenpassPubKey []byte, wireGuardIP string, remoteRosenpassAddr string)

OnConnected is a handler function that is triggered when a connection to a remote peer establishes

func (*Manager) OnDisconnected

func (m *Manager) OnDisconnected(peerKey string, wgIP string)

func (*Manager) Run

func (m *Manager) Run() error

Run starts the Rosenpass server

type NetbirdHandler

type NetbirdHandler struct {
	// contains filtered or unexported fields
}

func NewNetbirdHandler

func NewNetbirdHandler(preSharedKey *[32]byte, wgIfaceName string) (hdlr *NetbirdHandler, err error)

func (*NetbirdHandler) AddPeer

func (h *NetbirdHandler) AddPeer(pid rp.PeerID, intf string, pk rp.Key)

func (*NetbirdHandler) HandshakeCompleted

func (h *NetbirdHandler) HandshakeCompleted(pid rp.PeerID, key rp.Key)

func (*NetbirdHandler) HandshakeExpired

func (h *NetbirdHandler) HandshakeExpired(pid rp.PeerID)

func (*NetbirdHandler) RemovePeer

func (h *NetbirdHandler) RemovePeer(pid rp.PeerID)

Jump to

Keyboard shortcuts

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