nebula

package
v0.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddedConfig

type AddedConfig struct {
	PKI           PKI                             `yaml:"pki"`
	StaticHostMap map[netip.Addr][]netip.AddrPort `yaml:"static_host_map"`
	Lighthouse    Lighthouse                      `yaml:"lighthouse"`
	Tun           Tun                             `yaml:"tun"`
}

type Control

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

func Main

func Main(client NexusServerClient, configDir string, network string, lighthouseAddrPort netip.AddrPort, pullRoutes, pushRoutes []netip.Prefix, l *logrus.Logger) (*Control, error)

func (*Control) ShutdownBlock

func (c *Control) ShutdownBlock()

func (*Control) Start

func (c *Control) Start()

func (*Control) Stop

func (c *Control) Stop()

type Lighthouse

type Lighthouse struct {
	Hosts []netip.Addr `yaml:"hosts"`
}

type NexusServerClient

type NexusServerClient interface {
	GetClientNetwork(network string) (server.ClientNetworkResponse, error)
	GetClientNetworkCA(network string) (server.GetCAResponse, error)
	GetClientNetworkCertificate(network, certHash string) (server.GetCertificateResponse, error)
	CreateClientNetworkCertificate(network string, request server.CreateCertificateRequest) (server.CreateCertificateResponse, error)
	ListClientNetworkRevocations(network string) (server.ListRevocationsResponse, error)
	ListClientNetworkLighthouses(network string) (server.ListLighthousesResponse, error)
	ListClientNetworkRouters(network string) (server.ListRoutersResponse, error)
	CreateClientNetworkLighthouse(network string, request server.CreateLighthouseRequest) (server.CreateLighthouseResponse, error)
	CreateClientNetworkRouter(network string, request server.CreateRouterRequest) (server.CreateRouterResponse, error)
}

type PKI

type PKI struct {
	CA                string   `yaml:"ca"`
	Cert              string   `yaml:"cert"`
	Blocklist         []string `yaml:"blocklist"`
	DisconnectInvalid bool     `yaml:"disconnect_invalid"`
}

type Tun

type Tun struct {
	Dev          string        `yaml:"dev"`
	UnsafeRoutes []UnsafeRoute `yaml:"unsafe_routes"`
}

type UnsafeRoute

type UnsafeRoute struct {
	Route   string `json:"route"`
	Via     string `json:"via"`
	Metric  int    `json:"metric"`
	MTU     int    `json:"mtu"`
	Install bool   `json:"install"`
}

Jump to

Keyboard shortcuts

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