1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 14:26:11 -04:00
v2fly/vconfig.go

29 lines
712 B
Go
Raw Normal View History

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