config

package
v0.0.0-...-152e7f0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultServerLogLevel                      = zerolog.InfoLevel
	DefaultClientLogLevel                      = zerolog.InfoLevel
	DefaultTunRingSize                         = 7
	DefaultClientTunDeviceMTU                  = 1300
	DefaultBufferSize                          = 1300
	DefaultClientSocketRecvBuffer              = 4 * units.MiB
	DefaultClientSocketSendBuffer              = 4 * units.MiB
	DefaultServerMaxClients             uint16 = 9
	DefaultServerNumEventLoops                 = 0
	DefaultServerCleanupTickIntervalSec        = 5 * minute
	DefaultKeepAliveSec                        = 13 * second
	DefaultInactivityKeepAliveLimit            = 5
	DefaultServerSocketRecvBufferSize          = 4 * units.MiB
	DefaultServerSocketSendBufferSize          = 4 * units.MiB
	ClientBasePort                      uint16 = 15629
)

Variables

View Source
var (
	//go:embed client.ini
	ClientConfigTemplate []byte
	//go:embed server.ini
	ServerConfigTemplate []byte
)
View Source
var DefaultHostPorts = []uint16{59989, 4937, 20573, 24525, 22163, 18151, 14526, 55599, 46539}

Functions

This section is empty.

Types

type Server

type Server struct {
	BindHost         string
	BindDev          string
	IPNet            string
	HostIP           string
	NumEventLoops    int
	SocketRecvBuffer int
	SocketSendBuffer int
	BufferSize       int
	LogLevel         zerolog.Level
}

func LoadServer

func LoadServer(filename string) (*Server, error)

func (*Server) LogDict

func (s *Server) LogDict() *zerolog.Event

Jump to

Keyboard shortcuts

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