config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapConfig

type BootstrapConfig struct {
	Peers     []string `toml:"peers"`
	DNSDomain string   `toml:"dns_domain"` // e.g. "yourdomain.com" → queries _pulse.yourdomain.com TXT
}

type CAConfig

type CAConfig struct {
	Enabled   bool   `toml:"enabled"`
	DataDir   string `toml:"data_dir"`
	JoinToken string `toml:"join_token"`
}

type Config

type Config struct {
	Node      NodeConfig      `toml:"node"`
	Bootstrap BootstrapConfig `toml:"bootstrap"`
	CA        CAConfig        `toml:"ca"`
	Join      JoinConfig      `toml:"join"`
	SOCKS     SOCKSConfig     `toml:"socks"`
	DNS       DNSConfig       `toml:"dns"`
	Exit      ExitConfig      `toml:"exit"`
	Scribe    ScribeConfig    `toml:"scribe"`
	Tun       TunConfig       `toml:"tun"`
	Persist   PersistConfig   `toml:"persist"`
	Control   ControlConfig   `toml:"control"`
}

func Load

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

type ControlConfig

type ControlConfig struct {
	Socket string `toml:"socket"` // Unix socket path, default ~/.pulse/pulse.sock
}

type DNSConfig

type DNSConfig struct {
	Enabled  bool   `toml:"enabled"`
	Listen   string `toml:"listen"` // default "127.0.0.1:5353"
	Services []struct {
		Name     string `toml:"name"`
		Port     uint16 `toml:"port"`
		Priority uint16 `toml:"priority"`
	} `toml:"service"`
}

type ExitConfig

type ExitConfig struct {
	Enabled    bool     `toml:"enabled"`
	CIDRs      []string `toml:"cidrs"`       // CIDRs this node will exit (advertised in gossip)
	RoutesFile string   `toml:"routes_file"` // client-side CIDR route table (JSON)
}

type JoinConfig

type JoinConfig struct {
	RelayAddr string `toml:"relay_addr"`
	Token     string `toml:"token"`
}

type NodeConfig

type NodeConfig struct {
	Addr      string `toml:"addr"`   // advertised address (gossipped to peers)
	Listen    string `toml:"listen"` // actual bind address (defaults to addr if empty)
	TCPListen string `toml:"tcp_listen"`
	DataDir   string `toml:"data_dir"`
	NetworkID string `toml:"network_id"` // network isolation ID (peers with different IDs are rejected)
	LogLevel  string `toml:"log_level"`  // debug, info, warn, error (default: info)
}

type PersistConfig

type PersistConfig struct {
	Enabled  bool `toml:"enabled"`  // persist peer table to disk (default true)
	Interval int  `toml:"interval"` // save interval in seconds (default 60)
}

type SOCKSConfig

type SOCKSConfig struct {
	Enabled bool   `toml:"enabled"`
	Listen  string `toml:"listen"` // default ":1080"
}

type ScribeConfig

type ScribeConfig struct {
	Enabled bool   `toml:"enabled"`
	Listen  string `toml:"listen"` // HTTP API listen address, default "127.0.0.1:8080"
}

type TunConfig

type TunConfig struct {
	Enabled bool   `toml:"enabled"`
	Name    string `toml:"name"` // interface name, default "pulse0"
	CIDR    string `toml:"cidr"` // mesh IP range, default "10.100.0.0/16"
	FEC     bool   `toml:"fec"`  // forward error correction on TUN pipes (lossy links)
}

Jump to

Keyboard shortcuts

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