panel

package
v0.2.2-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig added in v0.2.2

type ApiConfig struct {
	ApiHost      string `mapstructure:"ApiHost"`
	Apikey       string `mapstructure:"Apikey"`
	NodeType     string `mapstructure:"NodeType"`
	Timeout      int    `mapstructure:"Timeout"`
	EnableVless  bool   `mapstructure:"EnableVless"`
	EnableXTLS   bool   `mapstructure:"EnableXTLS"`
	SpeedLimit   int    `mapstructure:"SpeedLimit"`
	DeviceLimit  int    `mapstructure:"DeviceLimit"`
	RuleListPath string `mapstructure:"RuleListPath"`
}

type Config

type Config struct {
	LogConfig          *LogConfig       `mapstructure:"Log"`
	DnsConfigPath      string           `mapstructure:"DnsConfigPath"`
	InboundConfigPath  string           `mapstructure:"InboundConfigPath"`
	OutboundConfigPath string           `mapstructure:"OutboundConfigPath"`
	RouteConfigPath    string           `mapstructure:"RouteConfigPath"`
	ConnetionConfig    *ConnetionConfig `mapstructure:"ConnetionConfig"`
	NodesConfig        []*NodesConfig   `mapstructure:"Nodes"`
}

type ConnetionConfig

type ConnetionConfig struct {
	Handshake    uint32 `mapstructure:"handshake"`
	ConnIdle     uint32 `mapstructure:"connIdle"`
	UplinkOnly   uint32 `mapstructure:"uplinkOnly"`
	DownlinkOnly uint32 `mapstructure:"downlinkOnly"`
	BufferSize   int32  `mapstructure:"bufferSize"`
}

type LogConfig

type LogConfig struct {
	Level      string `mapstructure:"Level"`
	AccessPath string `mapstructure:"AccessPath"`
	ErrorPath  string `mapstructure:"ErrorPath"`
}

type NodesConfig

type NodesConfig struct {
	PanelType        string             `mapstructure:"PanelType"`
	ApiConfig        *api.Config        `mapstructure:"ApiConfig"`
	ControllerConfig *controller.Config `mapstructure:"ControllerConfig"`
}

type Panel

type Panel struct {
	Server  *core.Instance
	Service []service.Service
	Running bool
	// contains filtered or unexported fields
}

Panel Structure

func New

func New(panelConfig *Config) *Panel

func (*Panel) Close

func (p *Panel) Close()

Close Close the panel

func (*Panel) Start

func (p *Panel) Start()

Start Start the panel

Jump to

Keyboard shortcuts

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