config

package
v0.0.0-20240423 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindConfigPath

func FindConfigPath(x string) string

Types

type API

type API struct {
	Name string `yaml:"name"`

	// http
	Host string `yaml:"host"`
}

type Config

type Config struct {
	Meepo Meepo `yaml:"meepo"`
}

func Default

func Default() *Config

func Get

func Get() *Config

func (*Config) Init

func (c *Config) Init()

type DomainNameService

type DomainNameService struct {
	Name  string `yaml:"name"`
	Local struct {
		Hosts []struct {
			File   string `yaml:"file"`
			Static string `yaml:"static"`
		} `yaml:"hosts"`
	} `yaml:"local"`
	ConnectionString string `yaml:"connectString"`
}

type Identity

type Identity struct {
	NoFile bool   `yaml:"no_file" mapstructure:"no_file"`
	File   string `yaml:"file"`
}

type Kcp

type Kcp struct {
	Disable     bool   `yaml:"disable,omitempty"`
	Preset      string `yaml:"preset,omitempty"`
	Crypt       string `yaml:"crypt,omitempty"`
	Key         string `yaml:"key,omitempty"`
	Mtu         int    `yaml:"mtu,omitempty"`
	Sndwnd      int    `yaml:"sndwnd,omitempty"`
	Rcvwnd      int    `yaml:"rcvwnd,omitempty"`
	DataShard   int    `yaml:"dataShard,omitempty"`
	ParityShard int    `yaml:"parityShard,omitempty"`
}

type Log

type Log struct {
	Level string `yaml:"level"`
	File  string `yaml:"file"`
}

type Meepo

type Meepo struct {
	Daemon            bool              `yaml:"daemon"`
	Profile           string            `yaml:"profile"`
	Pprof             string            `yaml:"pprof"`
	Poof              Poof              `yaml:"poof"`
	Identity          Identity          `yaml:"identity,omitempty"`
	API               API               `yaml:"api,omitempty"`
	Socks5            Socks5            `yaml:"socks5,omitempty"`
	Acl               string            `yaml:"acl,omitempty"`
	Log               Log               `yaml:"log,omitempty"`
	Trackerd          *Trackerd         `yaml:"trackerd,omitempty"`
	Trackerds         []*Trackerd       `yaml:"trackerds,omitempty"`
	Tracker           *Tracker          `yaml:"tracker,omitempty"`
	Trackers          []*Tracker        `yaml:"trackers,omitempty"`
	Webrtc            Webrtc            `yaml:"webrtc,omitempty"`
	Smux              Smux              `yaml:"smux,omitempty"`
	Kcp               Kcp               `yaml:"kcp,omitempty"`
	DomainNameService DomainNameService `yaml:"domainNameService,omitempty"`
}

type Poof

type Poof struct {
	Disable           bool          `yaml:"disable"`
	Interval          time.Duration `yaml:"interval"`
	RequestCandidates int           `yaml:"request_candidates"`
}

type Smux

type Smux struct {
	Disable          bool `yaml:"disable,omitempty"`
	Version          int  `yaml:"version,omitempty"`
	BufferSize       int  `yaml:"bufferSize,omitempty"`
	StreamBufferSize int  `yaml:"streamBufferSize,omitempty"`
	Nocomp           bool `yaml:"nocomp,omitempty"`
}

type Socks5

type Socks5 struct {
	Host string `yaml:"host"`
}

type Tracker

type Tracker struct {
	Name string `yaml:"name"`

	// rpc
	CallerName string `yaml:"callerName"`
	Addr       string `yaml:"addr"`
	Host       string `yaml:"host,omitempty"`
}

type Trackerd

type Trackerd struct {
	Name string `yaml:"name"`

	// rpc
	ServerName string `yaml:"serverName,omitempty"`
	Host       string `yaml:"host,omitempty"`
}

type Webrtc

type Webrtc struct {
	DisableDefaults bool     `yaml:"disableDefaults"`
	IceServers      []string `yaml:"iceServers,omitempty"`
	RecvBufferSize  uint32   `yaml:"recvBufferSize,omitempty"`
}

Jump to

Keyboard shortcuts

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