api

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceNotModified = "services not modified"
	NodeNotModified    = "node not modified"
	RuleNotModified    = "rules not modified"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetNodeInfo() (nodeInfo *NodeInfo, err error)
	GetServiceList() (serviceList *[]ServiceInfo, err error)
	ReportNodeOnlineIPs(onlineIP *[]OnlineIP) (err error)
	ReportServiceTraffic(serviceTraffic *[]ServiceTraffic) (err error)
	Describe() ClientInfo
	GetNodeRule() (ruleList *[]DetectRule, err error)
	Debug()
}

type ClientInfo

type ClientInfo struct {
	APIHost string
	NodeID  int
	Key     string
}

type Config

type Config struct {
	APIHost      string `mapstructure:"ApiHost"`
	NodeID       int    `mapstructure:"NodeID"`
	Key          string `mapstructure:"ApiKey"`
	Timeout      int    `mapstructure:"Timeout"`
	RuleListPath string `mapstructure:"RuleListPath"`
}

Config API config

type DetectResult

type DetectResult struct {
	UID    int
	RuleID int
}

type DetectRule

type DetectRule struct {
	ID      int
	Pattern *regexp.Regexp
}

type NodeInfo

type NodeInfo struct {
	NodeType             string
	NodeID               int
	Port                 uint32
	SpeedLimit           uint64
	AlterID              uint16
	Transport            string
	Host                 string
	Path                 string
	EnableTLS            bool
	TLSType              string
	CypherMethod         string
	Sniffing             bool
	RejectUnknownSNI     bool
	Fingerprint          string
	Quic_security        string
	Quic_key             string
	Address              string
	ListenIP             string
	ProxyProtocol        bool
	CertMode             string
	CertDomain           string
	ServerKey            string
	ServiceName          string
	Authority            string
	Header               json.RawMessage
	SendIP               string
	Flow                 string
	Seed                 string
	Congestion           bool
	Dest                 string
	Show                 bool
	ServerNames          []string
	PrivateKey           string
	ShortIds             []string
	MinClientVer         string
	MaxClientVer         string
	MaxTimeDiff          uint64
	Xver                 uint64
	ScMaxEachPostBytes   int32
	ScMaxConcurrentPosts int32
	ScMinPostsIntervalMs int32
	NoSSEHeader          bool
}

type OnlineIP

type OnlineIP struct {
	UID int
	IP  string
}

type ServiceInfo

type ServiceInfo struct {
	UID         int
	Email       string
	Passwd      string
	SpeedLimit  uint64
	DeviceLimit int
	UUID        string
}

type ServiceTraffic

type ServiceTraffic struct {
	UID      int
	Email    string
	Upload   int64
	Download int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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