Documentation
¶
Index ¶
- func RegisterCore(t string, f func(c *conf.CoreConfig) (Core, error))
- func RegisteredCore() []string
- type AddUsersParams
- type Core
- type OnlineDeviceProvider
- type RateLimitUpdater
- type RuntimeHealthProvider
- type Selector
- func (s *Selector) AddNode(tag string, info *panel.NodeInfo, option *conf.Options) error
- func (s *Selector) AddUsers(p *AddUsersParams) (added int, err error)
- func (s *Selector) Close() error
- func (s *Selector) DelNode(tag string) error
- func (s *Selector) DelUsers(users []panel.UserInfo, tag string, info *panel.NodeInfo) error
- func (s *Selector) GetOnlineDevice(tag string) ([]panel.OnlineUser, error)
- func (s *Selector) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error)
- func (s *Selector) Protocols() []string
- func (s *Selector) RollbackUserTrafficSlice(tag string, traffic []panel.UserTraffic) error
- func (s *Selector) Start() error
- func (s *Selector) Type() string
- func (s *Selector) UpdateUserRateLimit(tag, uuid string, speedLimit int) error
- type TrafficRollbacker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCore ¶
func RegisterCore(t string, f func(c *conf.CoreConfig) (Core, error))
func RegisteredCore ¶
func RegisteredCore() []string
Types ¶
type AddUsersParams ¶
type Core ¶
type Core interface {
Start() error
Close() error
AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error
DelNode(tag string) error
AddUsers(p *AddUsersParams) (added int, err error)
GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error)
DelUsers(users []panel.UserInfo, tag string, info *panel.NodeInfo) error
Protocols() []string
Type() string
}
func NewSelector ¶
func NewSelector(c []conf.CoreConfig) (Core, error)
type OnlineDeviceProvider ¶
type OnlineDeviceProvider interface {
GetOnlineDevice(tag string) ([]panel.OnlineUser, error)
}
type RateLimitUpdater ¶
RateLimitUpdater is implemented by cores whose runtime can enforce a per-user rate outside the protocol parser. WireGuard uses Linux tc rules keyed by each peer address; the existing proxy cores keep their own limiter hooks and do not need to implement this optional interface.
type RuntimeHealthProvider ¶
RuntimeHealthProvider exposes process-level health for cores that supervise external runtime components. WireGuard uses it for the GOST relay process.
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
func (*Selector) GetOnlineDevice ¶
func (s *Selector) GetOnlineDevice(tag string) ([]panel.OnlineUser, error)
func (*Selector) GetUserTrafficSlice ¶
func (*Selector) RollbackUserTrafficSlice ¶
func (s *Selector) RollbackUserTrafficSlice(tag string, traffic []panel.UserTraffic) error
type TrafficRollbacker ¶
type TrafficRollbacker interface {
RollbackUserTrafficSlice(tag string, traffic []panel.UserTraffic) error
}
TrafficRollbacker lets a core restore a traffic cursor when the panel rejected an otherwise successfully sampled report. It is optional because existing proxy cores do not expose reversible counters.
Click to show internal directories.
Click to hide internal directories.