config

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MinConnectInterval    = 5 * time.Second
	MaxConnectInterval    = 300 * time.Second
	SmuxKeepAliveInterval = 10 * time.Second
	SmuxKeepAliveTimeout  = 30 * time.Second
	SmuxMaxFrameSize      = 32768   // 32KB
	SmuxMaxReceiveBuffer  = 4194304 // 4MB
	SmuxMaxStreamBuffer   = 65536   // 64KB per stream
)

Variables

This section is empty.

Functions

func Files

func Files(name string) []string

func GetSmuxConfig added in v1.3.1

func GetSmuxConfig() *smux.Config

GetSmuxConfig returns optimized smux configuration for tunnel connections.

func InitSettings

func InitSettings(settings Settings)

Types

type Config

type Config struct {
	Server struct {
		URL string `ini:"url"`
		ID  string `ini:"id"`
		Key string `ini:"key"`
	} `ini:"server"`
	SSL struct {
		Verify bool   `ini:"verify"`
		CaCert string `ini:"ca_cert"`
	} `ini:"ssl"`
	Logging struct {
		Debug bool `ini:"debug"`
	} `ini:"logging"`
}

type Settings

type Settings struct {
	ServerURL     string
	WSPath        string
	ControlWSPath string
	UseSSL        bool
	CaCert        string // CA certificate file path
	SSLVerify     bool
	SSLOpt        map[string]interface{}
	HTTPThreads   int
	ID            string
	Key           string
}
var (
	GlobalSettings Settings
)

func LoadConfig

func LoadConfig(configFiles []string, wsPath string, controlWsPath string) Settings

Jump to

Keyboard shortcuts

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