Documentation
¶
Index ¶
- Constants
- func New(c *conf.CoreConfig) (vCore.Core, error)
- type GeoLoader
- type HookServer
- type Hysteria2
- func (h *Hysteria2) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error
- func (h *Hysteria2) AddUsers(p *vCore.AddUsersParams) (added int, err error)
- func (h *Hysteria2) Close() error
- func (h *Hysteria2) DelNode(tag string) error
- func (h *Hysteria2) DelUsers(users []panel.UserInfo, tag string, _ *panel.NodeInfo) error
- func (h *Hysteria2) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error)
- func (h *Hysteria2) Protocols() []string
- func (h *Hysteria2) Start() error
- func (h *Hysteria2) Type() string
- type Hysteria2node
- type V2bX
Constants ¶
View Source
const ( Byte = 1 Kilobyte = Byte * 1000 Megabyte = Kilobyte * 1000 Gigabyte = Megabyte * 1000 Terabyte = Gigabyte * 1000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GeoLoader ¶
type GeoLoader struct {
GeoIPFilename string
GeoSiteFilename string
UpdateInterval time.Duration
Logger *zap.Logger
// contains filtered or unexported fields
}
GeoLoader provides the on-demand GeoIP/GeoSite database loading functionality required by the ACL engine. Empty filenames = automatic download from built-in URLs.
type HookServer ¶
type HookServer struct {
Tag string
Counter sync.Map
ReportMinTrafficBytes int64
// contains filtered or unexported fields
}
func (*HookServer) LogOnlineState ¶
func (s *HookServer) LogOnlineState(id string, online bool)
func (*HookServer) LogTraffic ¶
func (h *HookServer) LogTraffic(id string, tx, rx uint64) (ok bool)
func (*HookServer) TraceStream ¶
func (h *HookServer) TraceStream(stream server.HyStream, stats *server.StreamStats)
func (*HookServer) UntraceStream ¶
func (h *HookServer) UntraceStream(stream server.HyStream)
type Hysteria2 ¶
type Hysteria2 struct {
Hy2nodes map[string]Hysteria2node
Auth *V2bX
Logger *zap.Logger
}
func (*Hysteria2) AddUsers ¶
func (h *Hysteria2) AddUsers(p *vCore.AddUsersParams) (added int, err error)
func (*Hysteria2) GetUserTrafficSlice ¶
type Hysteria2node ¶
type Hysteria2node struct {
Hy2server server.Server
Tag string
Logger *zap.Logger
EventLogger server.EventLogger
TrafficLogger server.TrafficLogger
}
Click to show internal directories.
Click to hide internal directories.