Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultP2PListenAddr = "/ip4/0.0.0.0/udp/10042" DefaultP2PAnnounceInterval = time.Minute )
View Source
const ( // Default values for the Wireguard settings DefaultWgInterface = "wesh0" DefaultWgNetworkRange = "fd6d:142e:65e7:4cc1::/64" DefaultWgListenPort = 10043 DefaultWgPersistentKeepalive = time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P2P ¶
type P2P struct { // Network PSK // If not present, will be generated. // TODO: find a nice way of configuring PSK? PSK string `validate:"base64"` // PrivateKey encoded in base64 // If not present, will be generated. PrivateKey string `validate:"base64"` // List of Bootstrap nodes // Each node is a multiaddr, containing // * the last known peer addr // * the last known peer ID // Might be empty on start. // Will be periodically updated in runtime. Bootstrap []string // ListenAddr is a libp2p multiaddr ListenAddr string AnnounceInterval time.Duration }
func (*P2P) GeneratePrivateKey ¶
func (*P2P) GeneratePsk ¶
type Wireguard ¶
type Wireguard struct { // Wireguard interface name. Interface string // PrivateKey encoded in base64. // If not present, will be generated. PrivateKey string `validate:"base64"` // Wireguard listen port. ListenPort int // NetworkRange to use. NetworkRange string `validate:"cidr"` // NodeName is a network hostname will be used for generating the addr. // If not present, will be replaced with a hostname on the first time. NodeName string `validate:"hostname"` // Wireguard PersistentKeepalive setting. // Set to -1 to disable. PersistentKeepalive time.Duration }
func (*Wireguard) GeneratePrivateKey ¶
Click to show internal directories.
Click to hide internal directories.