/
v2ray.go
31 lines (27 loc) · 992 Bytes
/
v2ray.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package v2ray
import (
"github.com/jinzhu/gorm"
"v2ray.com/core"
"v2ray.com/core/app/proxyman/command"
)
// V2ray remote handler wrapper must sync at first time
type V2ray struct {
RemoteTag string // remote v2ray tag
RemoteGrpc string // grpc addr
grpcClient command.HandlerServiceClient //
APIPort uint32 // remote v2ray api port
WsPort uint32 // ws port
WsPath string // ws path
config *core.Config //
DB *gorm.DB // db for storage user uuid
VNEXT string // 如果有 VNEXT 将会替换默认 outbound
SocksPort uint32 // 如果有值则暴露一个无需认证的 socks 端口
}
// User v2ray
type User struct {
gorm.Model
Email string `gorm:"unique_index;not null;column:email"`
UUID string `gorm:"unique;not null;column:uuid"`
}
func init() {
}