config

package
v0.0.0-...-7897c6d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// tun
	TUNName         string
	MTU             int
	LocalAddr       netip.Prefix
	EnableBroadcast bool

	// libp2p
	PrivateKey      *PrivateKey
	PeerID          string
	Bootstraps      []string
	PeersRouteTable map[string]netip.Prefix
	Relays          []string
	EnableAutoRelay bool
	EnableMDNS      bool

	// log
	LogConfigs []mlog.CoreConfig
	// contains filtered or unexported fields
}

func Load

func Load(path string) (*Config, error)

func (*Config) Save

func (c *Config) Save() error

type PrivateKey

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

func NewPrivateKey

func NewPrivateKey() (*PrivateKey, error)

func (*PrivateKey) MarshalText

func (p *PrivateKey) MarshalText() ([]byte, error)

func (*PrivateKey) PrivKey

func (p *PrivateKey) PrivKey() (crypto.PrivKey, error)

func (*PrivateKey) UnmarshalText

func (p *PrivateKey) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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