Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commongroup ¶
type Inboud ¶
type Inboud struct {
Id int64 //ID from json file
Name string
Tag string
Type string
Option *option.Inbound
Support []string
ListenAddres string
Listenport int
Tlsenabled bool
Transporttype string
Transportoption option.V2RayTransportOptions
Custom_info string
Domain string
PublicIp string
}
Standar Inbound For Whole Aplication
func (*Inboud) TlsIsEnabled ¶
func (*Inboud) TransortType ¶
func (*Inboud) TransportPath ¶
type Sboxcontroller ¶
type Sboxcontroller interface {
Start() error
Close() error
//Check If already user is in if not add the user
//Should Calculate How much quota should added to underlaying sbox
// Always update Usage to 0 when this called
AddUser(*Userconfig) (Sboxstatus, error)
AddUserReset(*Userconfig) (Sboxstatus, error)
RemoveUser(*Userconfig) (Sboxstatus, error)
RemoveAllRuleForuser(user string)
//Do not going to update database using this func usage it will automaticaly doing by watchman
//Userstatus
GetstatusUser(*Userconfig) (Sboxstatus, error)
GetAllInbound() ([]Inboud, error)
AddInbound() error
RemoveInboud() error
InboundStatus(string) error
GetAllOutbound() ([]Outbound, error)
AddOutbound() error
RemoveOutboud() error
OutboundStatus(string) error
SetLogChan(chan any)
GetLogChan() chan any
UrlTest(outtag string) (int16, error)
RefreshUrlTest()
CloseConns(suser *Userconfig) error
}
Xray Sing-box both should implement this
type Sboxstatus ¶
type Sboxstatus struct {
Download C.Bwidth
Upload C.Bwidth
Online_ip map[netip.Addr]int64
Disabled bool
}
func (Sboxstatus) FullUsage ¶
func (s Sboxstatus) FullUsage() C.Bwidth
type Trojangroup ¶
type Trojangroup struct {
Password string
}
type Userconfig ¶
type Userconfig struct {
*Vlessgroup
*Trojangroup
*Commongroup
DbID int64
UsercheckId int
Name string
Usage C.Bwidth
Quota C.Bwidth
Inboundtag string
Outboundtag string
LoginLimit int32
InboundId int16
OutboundID int16
TgId int64 //user telegram id
Type string
Password string //optional other protocole like trojan
}
Standar config For Whole Aplication
func (*Userconfig) GetuniqName ¶
func (u *Userconfig) GetuniqName() string
type Vlessgroup ¶
Click to show internal directories.
Click to hide internal directories.