panel

package
v0.9.6-beta.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MPL-2.0 Imports: 23 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"`
	NodeID              int     `mapstructure:"NodeID"`
	Key                 string  `mapstructure:"ApiKey"`
	NodeType            string  `mapstructure:"NodeType"`
	EnableVless         bool    `mapstructure:"EnableVless"`
	EnableXTLS          bool    `mapstructure:"EnableXTLS"`
	Timeout             int     `mapstructure:"Timeout"`
	SpeedLimit          float64 `mapstructure:"SpeedLimit"`
	DeviceLimit         int     `mapstructure:"DeviceLimit"`
	RuleListPath        string  `mapstructure:"RuleListPath"`
	DisableCustomConfig bool    `mapstructure:"DisableCustomConfig"`
}

type CertConfig added in v0.4.0

type CertConfig struct {
	CertMode         string            `mapstructure:"CertMode"` // none, file, http, dns
	RejectUnknownSni bool              `mapstructure:"RejectUnknownSni"`
	CertDomain       string            `mapstructure:"CertDomain"`
	CertFile         string            `mapstructure:"CertFile"`
	KeyFile          string            `mapstructure:"KeyFile"`
	Provider         string            `mapstructure:"Provider"` // alidns, cloudflare, gandi, godaddy....
	Email            string            `mapstructure:"Email"`
	DNSEnv           map[string]string `mapstructure:"DNSEnv"`
}

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 ControllerConfig added in v0.4.0

type ControllerConfig struct {
	ListenIP             string            `mapstructure:"ListenIP"`
	SendIP               string            `mapstructure:"SendIP"`
	UpdatePeriodic       int               `mapstructure:"UpdatePeriodic"`
	EnableDNS            bool              `mapstructure:"EnableDNS"`
	DNSType              string            `mapstructure:"DNSType"`
	DisableUploadTraffic bool              `mapstructure:"DisableUploadTraffic"`
	DisableGetRule       bool              `mapstructure:"DisableGetRule"`
	EnableProxyProtocol  bool              `mapstructure:"EnableProxyProtocol"`
	EnableFallback       bool              `mapstructure:"EnableFallback"`
	DisableIVCheck       bool              `mapstructure:"DisableIVCheck"`
	DisableSniffing      bool              `mapstructure:"DisableSniffing"`
	FallBackConfigs      []*FallBackConfig `mapstructure:"FallBackConfigs"`
	CertConfig           *CertConfig       `mapstructure:"CertConfig"`
}

type DNSEnv added in v0.4.2

type DNSEnv struct {
	CLOUDFLARE_EMAIL    string `mapstructure:"CLOUDFLARE_EMAIL"`
	CLOUDFLARE_API_KEY  string `mapstructure:"CLOUDFLARE_API_KEY"`
	ALICLOUD_ACCESS_KEY string `mapstructure:"ALICLOUD_ACCESS_KEY"`
	ALICLOUD_SECRET_KEY string `mapstructure:"ALICLOUD_SECRET_KEY"`
}

type FallBackConfig added in v0.4.0

type FallBackConfig struct {
	SNI              string `mapstructure:"SNI"`
	Alpn             string `mapstructure:"Alpn"`
	Path             string `mapstructure:"Path"`
	Dest             string `mapstructure:"Dest"`
	ProxyProtocolVer uint64 `mapstructure:"ProxyProtocolVer"`
}

type LogConfig

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

type NodeConfig added in v0.4.0

type NodeConfig struct {
	ApiConfig        *ApiConfig        `mapstructure:"ApiConfig"`
	ControllerConfig *ControllerConfig `mapstructure:"ControllerConfig"`
}

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