api

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubscriptionNotModified = "subscriptions 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)
	GetRelayNodeInfo() (nodeInfo *RelayNodeInfo, err error)
	GetSubscriptionList() (subscriptionList *[]SubscriptionInfo, err error)
	ReportNodeOnlineIPs(onlineIP *[]OnlineIP) (err error)
	ReportSubscriptionTraffic(subscriptionTraffic *[]SubscriptionTraffic) (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                 string
	SpeedLimit           uint64
	Transport            string
	Host                 string
	Path                 string
	TLSType              string
	CypherMethod         string
	Sniffing             bool
	RejectUnknownSNI     bool
	Fingerprint          string
	CurvePreferences     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
	Relay                bool
	RelayNodeID          int
	NoSSEHeader          bool
	Mode                 string
	NoGRPCHeader         bool
	HeartbeatPeriod      uint32
	DialerProxy          string
	TCPKeepAliveInterval int32
	TCPKeepAliveIdle     int32
	TCPUserTimeout       int32
	TCPMaxSeg            int32
	TcpMptcp             bool
	TCPWindowClamp       int32
	DomainStrategy       string
	SocketStatus         bool
}

type OnlineIP

type OnlineIP struct {
	UID int
	IP  string
}

type RelayNodeInfo

type RelayNodeInfo struct {
	NodeType        string
	NodeID          int
	Port            uint32
	Transport       string
	Host            string
	Path            string
	TLSType         string
	CypherMethod    string
	Address         string
	ListenIP        string
	ProxyProtocol   bool
	SendIP          string
	ServerKey       string
	ServiceName     string
	Authority       string
	Header          json.RawMessage
	Flow            string
	Seed            string
	Alpn            string
	Congestion      bool
	Fingerprint     string
	PublicKey       string
	ShortId         string
	SpiderX         string
	Show            bool
	ServerName      string
	NoSSEHeader     bool
	Mode            string
	NoGRPCHeader    bool
	HeartbeatPeriod uint32
}

type SubscriptionInfo

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

type SubscriptionTraffic

type SubscriptionTraffic 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