Documentation
¶
Index ¶
- Constants
- Variables
- func RemoveEmptyString(arr []string) []string
- func SortGroups(groups []proxy.Group, nodes []string, tags map[string][]string, ...) []proxy.Group
- type Adapter
- func (m *Adapter) BuildClash(uuid string) ([]byte, error)
- func (m *Adapter) BuildGeneral(uuid string) []byte
- func (m *Adapter) BuildLoon(uuid string) []byte
- func (m *Adapter) BuildQuantumultX(uuid string) string
- func (m *Adapter) BuildShadowrocket(uuid string, userInfo shadowrocket.UserInfo) []byte
- func (m *Adapter) BuildSingbox(uuid string) ([]byte, error)
- func (m *Adapter) BuildSurfboard(siteName string, user surfboard.UserInfo) []byte
- func (m *Adapter) BuildSurge(siteName string, user surge.UserInfo) []byte
- func (m *Adapter) BuildV2rayN(uuid string) []byte
- type Config
- type NodeRelay
- type RuleGroup
- type Server
Constants ¶
View Source
const ( RuleGroupTypeReject = "reject" RuleGroupTypeDirect = "direct" )
规则组类型常量
View Source
const ( RelayModeAll = "all" RelayModeRandom = "random" )
中继模式常量
Variables ¶
View Source
var (
AutoSelect = "Auto - UrlTest"
)
View Source
var TemplateFS embed.FS
Functions ¶
Types ¶
type Adapter ¶
func NewAdapter ¶
func (*Adapter) BuildClash ¶
BuildClash generates a Clash configuration for the given UUID
func (*Adapter) BuildGeneral ¶
BuildGeneral generates a general configuration for the given UUID
func (*Adapter) BuildQuantumultX ¶
BuildQuantumultX generates a Quantumult X configuration for the given UUID
func (*Adapter) BuildShadowrocket ¶
func (m *Adapter) BuildShadowrocket(uuid string, userInfo shadowrocket.UserInfo) []byte
func (*Adapter) BuildSingbox ¶
BuildSingbox generates a Singbox configuration for the given UUID
func (*Adapter) BuildSurfboard ¶
BuildSurfboard generates a Surfboard configuration for the given site name and user info
func (*Adapter) BuildSurge ¶
BuildSurge generates a Surge configuration for the given UUID and site name
func (*Adapter) BuildV2rayN ¶
BuildV2rayN generates a V2rayN configuration for the given UUID
type NodeRelay ¶
type NodeRelay struct {
Host string `json:"host"`
Port int `json:"port"`
Prefix string `json:"prefix"`
}
NodeRelay 节点中继
type RuleGroup ¶
type RuleGroup struct {
ID int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Content string `json:"content"`
Behavior string `json:"behavior"`
Rules string `json:"rules"`
Tags string `json:"tags"`
Default bool `json:"default"`
}
RuleGroup 规则组
type Server ¶
type Server struct {
ID int64 `json:"id"`
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port"`
Protocol string `json:"protocol"`
Config string `json:"config"`
Status bool `json:"status"`
Tags string `json:"tags"`
Country string `json:"country"`
RelayMode string `json:"relay_mode"`
RelayNode string `json:"relay_node"`
ServerAddr string `json:"server_addr"`
}
Server 服务器信息
Click to show internal directories.
Click to hide internal directories.