config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PATH string `json:"-"`

	NodeLabel   string `json:"node_label,omitempty"`
	WebHost     string `json:"web_host,omitempty"`
	WebPort     int    `json:"web_port,omitempty"`
	WebToken    string `json:"web_token,omitempty"`
	WebAuthUser string `json:"web_auth_user,omitempty"`
	WebAuthPass string `json:"web_auth_pass,omitempty"`

	LogLeveL       string `json:"log_level,omitempty"`
	EnablePing     bool   `json:"enable_ping,omitempty"`
	ReloadInterval int    `json:"reload_interval,omitempty"`

	RelayConfigs      []*conf.Config `json:"relay_configs"`
	RelaySyncURL      string         `json:"relay_sync_url,omitempty"`
	RelaySyncInterval int            `json:"relay_sync_interval,omitempty"`

	XRayConfig          *xConf.Config `json:"xray_config,omitempty"`
	SyncTrafficEndPoint string        `json:"sync_traffic_endpoint,omitempty"`
	// contains filtered or unexported fields
}

func NewConfig added in v1.1.3

func NewConfig(path string) *Config

func (*Config) Adjust added in v1.1.4

func (c *Config) Adjust() error

func (*Config) GetMetricURL added in v1.1.3

func (c *Config) GetMetricURL() string

func (*Config) LoadConfig

func (c *Config) LoadConfig(force bool) error

func (*Config) NeedStartRelayServer added in v1.1.4

func (c *Config) NeedStartRelayServer() bool

func (*Config) NeedStartWebServer added in v1.1.3

func (c *Config) NeedStartWebServer() bool

func (*Config) NeedStartXrayServer added in v1.1.4

func (c *Config) NeedStartXrayServer() bool

func (*Config) NeedSyncFromServer added in v1.1.4

func (c *Config) NeedSyncFromServer() bool

Jump to

Keyboard shortcuts

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