Versions in this module Expand all Collapse all v0 v0.0.1 Aug 27, 2022 Changes in this version + var File_app_mydispatcher_config_proto protoreflect.FileDescriptor + type Config struct + Settings *SessionConfig + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (x *Config) GetSettings() *SessionConfig + func (x *Config) ProtoReflect() protoreflect.Message + func (x *Config) Reset() + func (x *Config) String() string + type DNSThenOthersSniffResult struct + func (DNSThenOthersSniffResult) Protocol() string + func (f DNSThenOthersSniffResult) Domain() string + func (f DNSThenOthersSniffResult) IsProtoSubsetOf(protocolName string) bool + type DefaultDispatcher struct + Limiter *Limiter + RuleManager *Rule + func (*DefaultDispatcher) Close() error + func (*DefaultDispatcher) Start() error + func (*DefaultDispatcher) Type() interface{} + func (d *DefaultDispatcher) Dispatch(ctx context.Context, destination net.Destination) (*transport.Link, error) + func (d *DefaultDispatcher) DispatchLink(ctx context.Context, destination net.Destination, outbound *transport.Link) error + func (d *DefaultDispatcher) Init(config *Config, om outbound.Manager, router routing.Router, pm policy.Manager, ...) error + type InboundInfo struct + BucketHub *sync.Map + NodeSpeedLimit uint64 + Tag string + UserInfo *sync.Map + UserOnlineIP *sync.Map + type Limiter struct + InboundInfo *sync.Map + func NewLimiter() *Limiter + func (l *Limiter) AddInboundLimiter(tag string, nodeInfo *panel.NodeInfo, userList []panel.UserInfo) error + func (l *Limiter) ClearOnlineUserIP(tag string) + func (l *Limiter) DeleteInboundLimiter(tag string) error + func (l *Limiter) GetOnlineUserIp(tag string) ([]UserIp, error) + func (l *Limiter) GetUserBucket(tag string, email string, ip string) (limiter *ratelimit.Bucket, SpeedLimit bool, Reject bool) + func (l *Limiter) RateWriter(writer buf.Writer, limiter *ratelimit.Bucket) buf.Writer + func (l *Limiter) UpdateInboundLimiter(tag string, nodeInfo *panel.NodeInfo, updatedUserList []panel.UserInfo) error + func (l *Limiter) UpdateOnlineUserIP(tag string, userIpList []UserIp) + type Rule struct + InboundDetectResult *sync.Map + InboundProtocolRule *sync.Map + InboundRule *sync.Map + func NewRule() *Rule + func (r *Rule) Detect(tag string, destination string, email string) (reject bool) + func (r *Rule) GetDetectResult(tag string) ([]panel.DetectResult, error) + func (r *Rule) ProtocolDetect(tag string, protocol string) bool + func (r *Rule) UpdateProtocolRule(tag string, ruleList []string) error + func (r *Rule) UpdateRule(tag string, newRuleList []panel.DetectRule) error + type SessionConfig struct + func (*SessionConfig) Descriptor() ([]byte, []int) + func (*SessionConfig) ProtoMessage() + func (x *SessionConfig) ProtoReflect() protoreflect.Message + func (x *SessionConfig) Reset() + func (x *SessionConfig) String() string + type SizeStatWriter struct + Counter stats.Counter + Writer buf.Writer + func (w *SizeStatWriter) Close() error + func (w *SizeStatWriter) Interrupt() + func (w *SizeStatWriter) WriteMultiBuffer(mb buf.MultiBuffer) error + type SniffResult interface + Domain func() string + Protocol func() string + func CompositeResult(domainResult SniffResult, protocolResult SniffResult) SniffResult + type Sniffer struct + func NewSniffer(ctx context.Context) *Sniffer + func (s *Sniffer) Sniff(c context.Context, payload []byte) (SniffResult, error) + func (s *Sniffer) SniffMetadata(c context.Context) (SniffResult, error) + type SnifferIsProtoSubsetOf interface + IsProtoSubsetOf func(protocolName string) bool + type SnifferResultComposite interface + ProtocolForDomainResult func() string + type UserInfo struct + DeviceLimit int + SpeedLimit uint64 + UID int + type UserIp struct + IPs []string + Uid int + type Writer struct + func (w *Writer) Close() error + func (w *Writer) WriteMultiBuffer(mb buf.MultiBuffer) error