v2ray-core/vconfig.go

29 lines
712 B
Go
Raw Normal View History

2015-09-05 15:48:38 +00:00
package core
// VUser is the user account that is used for connection to a VPoint
2015-09-05 15:48:38 +00:00
type VUser struct {
Id VID // The ID of this VUser.
2015-09-05 15:48:38 +00:00
}
// VNext is the next VPoint server in the connection chain.
2015-09-07 10:00:46 +00:00
type VNext struct {
2015-09-07 23:35:19 +00:00
ServerAddress string // Address of VNext server, in the form of "IP:Port"
User []VUser // User accounts for accessing VNext.
2015-09-07 10:00:46 +00:00
}
// VConfig is the config for VPoint server.
2015-09-05 15:48:38 +00:00
type VConfig struct {
2015-09-07 23:35:19 +00:00
Port uint16 // Port of this VPoint server.
2015-09-07 10:00:46 +00:00
AllowedClients []VUser
ClientProtocol string
VNextList []VNext
2015-09-05 15:48:38 +00:00
}
type VConfigMarshaller interface {
2015-09-06 20:10:42 +00:00
Marshal(config VConfig) ([]byte, error)
2015-09-05 15:48:38 +00:00
}
type VConfigUnmarshaller interface {
2015-09-06 20:10:42 +00:00
Unmarshal(data []byte) (VConfig, error)
2015-09-05 15:48:38 +00:00
}