Documentation
¶
Index ¶
Constants ¶
View Source
const ( RelayModeNone = "none" RelayModeAll = "all" RelayModeRandom = "random" RuleGroupTypeReject = "reject" RuleGroupTypeDefault = "default" RuleGroupTypeDirect = "direct" )
Variables ¶
View Source
var (
CacheServerDetailPrefix = "cache:server:detail:"
)
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
Id int64 `gorm:"primary_key"`
Name string `gorm:"type:varchar(100);not null;default:'';comment:Group Name"`
Description string `gorm:"type:varchar(255);default:'';comment:Group Description"`
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
UpdatedAt time.Time `gorm:"comment:Update Time"`
}
type Hysteria2 ¶
type Hysteria2 struct {
Port int `json:"port"`
HopPorts string `json:"hop_ports"`
HopInterval int `json:"hop_interval"`
ObfsPassword string `json:"obfs_password"`
SecurityConfig SecurityConfig `json:"security_config"`
}
type RuleGroup ¶
type RuleGroup struct {
Id int64 `gorm:"primary_key"`
Icon string `gorm:"type:MEDIUMTEXT;comment:Rule Group Icon"`
Name string `gorm:"type:varchar(100);not null;default:'';comment:Rule Group Name"`
Type string `gorm:"type:varchar(100);not null;default:'';comment:Rule Group Type"`
Tags string `gorm:"type:text;comment:Selected Node Tags"`
Rules string `gorm:"type:MEDIUMTEXT;comment:Rules"`
Enable bool `gorm:"type:tinyint(1);not null;default:1;comment:Rule Group Enable"`
Default bool `gorm:"type:tinyint(1);not null;default:0;comment:Rule Group is Default"`
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
UpdatedAt time.Time `gorm:"comment:Update Time"`
}
type SecurityConfig ¶
type SecurityConfig struct {
SNI string `json:"sni"`
AllowInsecure bool `json:"allow_insecure"`
Fingerprint string `json:"fingerprint"`
RealityServerAddr string `json:"reality_server_addr"`
RealityServerPort int `json:"reality_server_port"`
RealityPrivateKey string `json:"reality_private_key"`
RealityPublicKey string `json:"reality_public_key"`
RealityShortId string `json:"reality_short_id"`
}
type Server ¶
type Server struct {
Id int64 `gorm:"primary_key"`
Name string `gorm:"type:varchar(100);not null;default:'';comment:Node Name"`
Tags string `gorm:"type:varchar(128);not null;default:'';comment:Tags"`
Country string `gorm:"type:varchar(128);not null;default:'';comment:Country"`
City string `gorm:"type:varchar(128);not null;default:'';comment:City"`
Latitude string `gorm:"type:varchar(128);not null;default:'';comment:Latitude"`
Longitude string `gorm:"type:varchar(128);not null;default:'';comment:Longitude"`
ServerAddr string `gorm:"type:varchar(100);not null;default:'';comment:Server Address"`
RelayMode string `gorm:"type:varchar(20);not null;default:'none';comment:Relay Mode"`
RelayNode string `gorm:"type:text;comment:Relay Node"`
SpeedLimit int `gorm:"type:int;not null;default:0;comment:Speed Limit"`
TrafficRatio float32 `gorm:"type:DECIMAL(4,2);not null;default:0;comment:Traffic Ratio"`
GroupId int64 `gorm:"index:idx_group_id;type:int;default:null;comment:Group ID"`
Protocol string `gorm:"type:varchar(20);not null;default:'';comment:Protocol"`
Config string `gorm:"type:text;comment:Config"`
Enable *bool `gorm:"type:tinyint(1);not null;default:1;comment:Enabled"`
Sort int64 `gorm:"type:int;not null;default:0;comment:Sort"`
LastReportedAt time.Time `gorm:"comment:Last Reported Time"`
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
UpdatedAt time.Time `gorm:"comment:Update Time"`
}
type ServerFilter ¶
type Shadowsocks ¶
type TransportConfig ¶
type Trojan ¶
type Trojan struct {
Port int `json:"port"`
Flow string `json:"flow"`
Transport string `json:"transport"`
TransportConfig TransportConfig `json:"transport_config"`
Security string `json:"security"`
SecurityConfig SecurityConfig `json:"security_config"`
}
type Tuic ¶
type Tuic struct {
Port int `json:"port"`
SecurityConfig SecurityConfig `json:"security_config"`
}
type Vless ¶
type Vless struct {
Port int `json:"port"`
Flow string `json:"flow"`
Transport string `json:"transport"`
TransportConfig TransportConfig `json:"transport_config"`
Security string `json:"security"`
SecurityConfig SecurityConfig `json:"security_config"`
}
type Vmess ¶
type Vmess struct {
Port int `json:"port"`
Flow string `json:"flow"`
Transport string `json:"transport"`
TransportConfig TransportConfig `json:"transport_config"`
Security string `json:"security"`
SecurityConfig SecurityConfig `json:"security_config"`
}
Click to show internal directories.
Click to hide internal directories.