Documentation
¶
Index ¶
Constants ¶
View Source
const ProxyGroups = `` /* 162-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func NewSubHandler ¶
func NewSubHandler(g *gin.RouterGroup) error
Types ¶
type ClashService ¶
type ClashService struct {
service.SettingService
JsonService
LinkService
}
func (*ClashService) ConvertToClashMeta ¶
func (s *ClashService) ConvertToClashMeta(outbounds *[]map[string]interface{}, basicConfig string) (string, error)
type ClientInfo ¶ added in v1.7.2
type ClientInfo struct {
Name string `json:"name"`
Remark string `json:"remark,omitempty"`
Title string `json:"title"`
Enable bool `json:"enable"`
Expiry int64 `json:"expiry"`
RemainingDays int64 `json:"remainingDays"`
Volume int64 `json:"volume"`
Up int64 `json:"up"`
Down int64 `json:"down"`
Used int64 `json:"used"`
RemainingTraffic int64 `json:"remainingTraffic"`
Unlimited bool `json:"unlimited"`
// Expired is decided here rather than from Expiry in the browser, so the
// page cannot disagree with the panel over a skewed client clock.
Expired bool `json:"expired"`
Links []string `json:"links"`
}
ClientInfo is the payload served by the subscriber dashboard's JSON info endpoint. It carries everything the Vue page needs to render live status: expiry/remaining days, used vs total traffic, and the config links.
type JsonService ¶
type JsonService struct {
service.SettingService
LinkService
}
type LinkService ¶
type LinkService struct {
}
func (*LinkService) GetExternalOutbounds ¶ added in v1.5.4
func (s *LinkService) GetExternalOutbounds(linkJson *json.RawMessage) ([]map[string]interface{}, []string)
func (*LinkService) GetLinks ¶
func (s *LinkService) GetLinks(linkJson *json.RawMessage, types string, clientInfo string) []string
type Server ¶
type Server struct {
service.SettingService
// contains filtered or unexported fields
}
type SubHandler ¶
type SubHandler struct {
service.SettingService
SubService
JsonService
ClashService
}
type SubService ¶
type SubService struct {
service.SettingService
LinkService
}
Click to show internal directories.
Click to hide internal directories.