1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00
v2fly/vconfig.go

33 lines
741 B
Go
Raw Normal View History

2015-09-05 11:48:38 -04:00
package core
2015-09-10 18:24:18 -04:00
import (
v2net "github.com/v2ray/v2ray-core/net"
)
// 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-10 18:24:18 -04:00
Address v2net.VAddress // Address of VNext server
Users []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
}