Documentation ¶
Index ¶
- func PanelBuilder(conf map[string]string) pb.XNodeGrpcServer
- func StartXPanel(conf map[string]string)
- type DownUpStat
- type HiddifyPanel
- func (panel *HiddifyPanel) AddUser(ctx context.Context, cmd *pb.AddUserCmd) (*pb.Response, error)
- func (panel *HiddifyPanel) GetSub(ctx context.Context, uInfo *pb.UserInfoReq) (*pb.SubContent, error)
- func (panel *HiddifyPanel) GetUserInfo(ctx context.Context, uInfo *pb.UserInfoReq) (*pb.UserInfo, error)
- func (panel *HiddifyPanel) Ping(_ context.Context, _ *pb.Empty) (*pb.Empty, error)
- func (panel *HiddifyPanel) UpgradeUserPackage(ctx context.Context, cmd *pb.AddPackageCmd) (*pb.Response, error)
- type HiddifyPanelRepo
- func (r *HiddifyPanelRepo) GetDomains() ([]string, error)
- func (r *HiddifyPanelRepo) GetGroupedRules() (map[string][]RenovateRule, error)
- func (r *HiddifyPanelRepo) GetStrConfig() (map[string]string, error)
- func (r *HiddifyPanelRepo) GetUser(uid string) (User, error)
- func (r *HiddifyPanelRepo) InsertRenovateRule(rule RenovateRule) error
- func (r *HiddifyPanelRepo) InsertUser(uid, username, expireTime, startDate, mode string, lastOnline time.Time, ...) error
- func (r *HiddifyPanelRepo) ListRenovateRules() ([]RenovateRule, error)
- func (r *HiddifyPanelRepo) UpdateUserPackage(uuid, expireTime, startDate, mode string, trafficAllowed float32, ...) error
- type IHiddifyPanelRepo
- type IPanel
- type KeyVal
- type RenovateFromFile
- type RenovateRule
- type RuleRenovator
- type SubRenovator
- type User
- type XClient
- type XrayService
- type XuiPanel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanelBuilder ¶
func PanelBuilder(conf map[string]string) pb.XNodeGrpcServer
PanelBuilder builds a panel (hiddify, xui, etc.) based on the arguments
func StartXPanel ¶
Types ¶
type DownUpStat ¶
type HiddifyPanel ¶
type HiddifyPanel struct { pb.UnimplementedXNodeGrpcServer // contains filtered or unexported fields }
HiddifyPanel implements pb.XNodeGrpcServer and SubRenovator
func NewHiddifyPanel ¶
func NewHiddifyPanel(xs *XrayService, conf map[string]string) *HiddifyPanel
func (*HiddifyPanel) AddUser ¶
func (panel *HiddifyPanel) AddUser(ctx context.Context, cmd *pb.AddUserCmd) (*pb.Response, error)
func (*HiddifyPanel) GetSub ¶ added in v0.2.1
func (panel *HiddifyPanel) GetSub(ctx context.Context, uInfo *pb.UserInfoReq) (*pb.SubContent, error)
func (*HiddifyPanel) GetUserInfo ¶ added in v0.2.1
func (panel *HiddifyPanel) GetUserInfo(ctx context.Context, uInfo *pb.UserInfoReq) (*pb.UserInfo, error)
func (*HiddifyPanel) UpgradeUserPackage ¶ added in v0.3.1
func (panel *HiddifyPanel) UpgradeUserPackage(ctx context.Context, cmd *pb.AddPackageCmd) (*pb.Response, error)
type HiddifyPanelRepo ¶ added in v0.2.1
type HiddifyPanelRepo struct {
// contains filtered or unexported fields
}
func SetupHiddifyRepo ¶ added in v0.2.1
func SetupHiddifyRepo(dbPath string) *HiddifyPanelRepo
func (*HiddifyPanelRepo) GetDomains ¶ added in v0.2.1
func (r *HiddifyPanelRepo) GetDomains() ([]string, error)
func (*HiddifyPanelRepo) GetGroupedRules ¶ added in v0.2.1
func (r *HiddifyPanelRepo) GetGroupedRules() (map[string][]RenovateRule, error)
GetGroupedRules returns a rules grouped by their remark name.
func (*HiddifyPanelRepo) GetStrConfig ¶ added in v0.2.1
func (r *HiddifyPanelRepo) GetStrConfig() (map[string]string, error)
func (*HiddifyPanelRepo) GetUser ¶ added in v0.2.1
func (r *HiddifyPanelRepo) GetUser(uid string) (User, error)
func (*HiddifyPanelRepo) InsertRenovateRule ¶ added in v0.2.1
func (r *HiddifyPanelRepo) InsertRenovateRule(rule RenovateRule) error
func (*HiddifyPanelRepo) InsertUser ¶ added in v0.2.1
func (*HiddifyPanelRepo) ListRenovateRules ¶ added in v0.2.1
func (r *HiddifyPanelRepo) ListRenovateRules() ([]RenovateRule, error)
func (*HiddifyPanelRepo) UpdateUserPackage ¶ added in v0.3.1
func (r *HiddifyPanelRepo) UpdateUserPackage(uuid, expireTime, startDate, mode string, trafficAllowed float32, packageDays int64) error
type IHiddifyPanelRepo ¶ added in v0.2.1
type IHiddifyPanelRepo interface { ListRenovateRules() ([]RenovateRule, error) GetGroupedRules() (map[string][]RenovateRule, error) GetUser(uuid string) (User, error) UpdateUserPackage(uuid, expireTime, startDate, mode string, trafficAllowed float32, packageDays int64) error InsertUser(uid, username, expireTime, startDate, mode string, lastOnline time.Time, trafficAllowed float32, packageDays int64) error InsertRenovateRule(rule RenovateRule) error GetDomains() ([]string, error) GetStrConfig() (map[string]string, error) }
type IPanel ¶
type IPanel interface { pb.XNodeGrpcServer }
type RenovateFromFile ¶ added in v0.4.2
type RenovateFromFile struct {
// contains filtered or unexported fields
}
func NewRenovatorFromFile ¶ added in v0.4.2
func NewRenovatorFromFile(content string) RenovateFromFile
type RenovateRule ¶ added in v0.2.1
type RuleRenovator ¶ added in v0.4.2
type RuleRenovator struct {
// contains filtered or unexported fields
}
type SubRenovator ¶ added in v0.2.1
SubRenovator receive an original sub-content (io.Reader) and returns a modified version of it
type XrayService ¶
type XrayService struct { Addr string // contains filtered or unexported fields }
func NewXrayService ¶
func NewXrayService(addr string) *XrayService
func (*XrayService) GetInboundStats ¶
func (x *XrayService) GetInboundStats() (map[string]DownUpStat, error)
func (*XrayService) Restart ¶
func (x *XrayService) Restart() error
type XuiPanel ¶
type XuiPanel struct {
pb.UnimplementedXNodeGrpcServer
}
func NewXuiPanel ¶
func NewXuiPanel(xs *XrayService, conf map[string]string) *XuiPanel
Click to show internal directories.
Click to hide internal directories.