Files
Go_I2p/lib/config
2025-03-09 13:52:15 -04:00
..
2016-08-17 09:19:56 -04:00
2025-03-05 20:03:31 +00:00
2025-02-26 21:03:51 -05:00
2025-02-26 21:03:51 -05:00

config

-- import "github.com/go-i2p/go-i2p/lib/config"

config.svg

Usage

const GOI2P_BASE_DIR = ".go-i2p"
var (
	CfgFile string
)
var DefaultBootstrapConfig = BootstrapConfig{
	LowPeerThreshold: 10,

	ReseedServers: []*ReseedConfig{},
}

default configuration for network bootstrap

var DefaultNetDbConfig = NetDbConfig{
	Path: filepath.Join(defaultConfig(), "netDb"),
}

default settings for netdb

var RouterConfigProperties = DefaultRouterConfig()

func InitConfig

func InitConfig()

func UpdateRouterConfig

func UpdateRouterConfig()

type BootstrapConfig

type BootstrapConfig struct {
	// if we have less than this many peers we should reseed
	LowPeerThreshold int
	// reseed servers
	ReseedServers []*ReseedConfig
}

type NetDbConfig

type NetDbConfig struct {
	// path to network database directory
	Path string
}

local network database configuration

type ReseedConfig

type ReseedConfig struct {
	// url of reseed server
	Url string
	// fingerprint of reseed su3 signing key
	SU3Fingerprint string
}

configuration for 1 reseed server

type RouterConfig

type RouterConfig struct {
	// the path to the base config directory where per-system defaults are stored
	BaseDir string
	// the path to the working config directory where files are changed
	WorkingDir string
	// netdb configuration
	NetDb *NetDbConfig
	// configuration for bootstrapping into the network
	Bootstrap *BootstrapConfig
}

router.config options

func DefaultRouterConfig

func DefaultRouterConfig() *RouterConfig

config

github.com/go-i2p/go-i2p/lib/config