实现 gost 网关
This commit is contained in:
@@ -8,16 +8,17 @@ import (
|
||||
// Edge 节点表
|
||||
type Edge struct {
|
||||
core.Model
|
||||
Type EdgeType `json:"type" gorm:"column:type"` // 节点类型:1-自建
|
||||
Version int32 `json:"version" gorm:"column:version"` // 节点版本
|
||||
Mac string `json:"mac" gorm:"column:mac"` // 节点 mac 地址
|
||||
IP orm.Inet `json:"ip" gorm:"column:ip;not null"` // 节点地址
|
||||
ISP EdgeISP `json:"isp" gorm:"column:isp"` // 运营商:0-未知,1-电信,2-联通,3-移动
|
||||
Prov string `json:"prov" gorm:"column:prov"` // 省份
|
||||
City string `json:"city" gorm:"column:city"` // 城市
|
||||
Status EdgeStatus `json:"status" gorm:"column:status"` // 节点状态:0-离线,1-正常
|
||||
RTT int32 `json:"rtt" gorm:"column:rtt"` // 最近平均延迟
|
||||
Loss int32 `json:"loss" gorm:"column:loss"` // 最近丢包率
|
||||
Type EdgeType `json:"type" gorm:"column:type"` // 节点类型:1-自建,2-GOST chain
|
||||
Version int32 `json:"version" gorm:"column:version"` // 节点版本
|
||||
Mac string `json:"mac" gorm:"column:mac"` // 节点 mac 地址或 GOST chain 名称
|
||||
IP orm.Inet `json:"ip" gorm:"column:ip;not null"` // 节点地址或 GOST chain addr 的 IP
|
||||
Port *uint16 `json:"port,omitempty" gorm:"column:port"` // GOST chain addr 的端口
|
||||
ISP EdgeISP `json:"isp" gorm:"column:isp"` // 运营商:0-未知,1-电信,2-联通,3-移动
|
||||
Prov string `json:"prov" gorm:"column:prov"` // 省份
|
||||
City string `json:"city" gorm:"column:city"` // 城市
|
||||
Status EdgeStatus `json:"status" gorm:"column:status"` // 节点状态:0-离线,1-正常
|
||||
RTT int32 `json:"rtt" gorm:"column:rtt"` // 最近平均延迟
|
||||
Loss int32 `json:"loss" gorm:"column:loss"` // 最近丢包率
|
||||
}
|
||||
|
||||
// EdgeType 节点类型枚举
|
||||
@@ -25,6 +26,7 @@ type EdgeType int
|
||||
|
||||
const (
|
||||
EdgeTypeSelfBuilt EdgeType = 1 // 自建
|
||||
EdgeTypeGostChain EdgeType = 2 // GOST chain
|
||||
)
|
||||
|
||||
// EdgeStatus 节点状态枚举
|
||||
|
||||
Reference in New Issue
Block a user