yggdrasil-go/src/defaults/defaults_linux.go
TomZ 0c7abaaffb Match sock file default to systemd setup.
The `AdminListen` option and `yggdrasilctl` now default to
`unix:///var/run/yggdrasil/yggdrasil.sock` on Linux

This allows yggdrasil to be run as its own user.

Closes #802
2022-01-09 14:52:19 +01:00

26 lines
646 B
Go

//go:build linux
// +build linux
package defaults
// Sane defaults for the Linux platform. The "default" options may be
// may be replaced by the running configuration.
func GetDefaults() platformDefaultParameters {
return platformDefaultParameters{
// Admin
DefaultAdminListen: "unix:///var/run/yggdrasil/yggdrasil.sock",
// Configuration (used for yggdrasilctl)
DefaultConfigFile: "/etc/yggdrasil.conf",
// Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
{Regex: ".*", Beacon: true, Listen: true},
},
// TUN/TAP
MaximumIfMTU: 65535,
DefaultIfMTU: 65535,
DefaultIfName: "auto",
}
}