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: 0

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