mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
33 lines
741 B
Go
33 lines
741 B
Go
package core
|
|
|
|
import (
|
|
v2net "github.com/v2ray/v2ray-core/net"
|
|
)
|
|
|
|
// VUser is the user account that is used for connection to a VPoint
|
|
type VUser struct {
|
|
Id VID // The ID of this VUser.
|
|
}
|
|
|
|
// VNext is the next VPoint server in the connection chain.
|
|
type VNext struct {
|
|
Address v2net.VAddress // Address of VNext server
|
|
Users []VUser // User accounts for accessing VNext.
|
|
}
|
|
|
|
// VConfig is the config for VPoint server.
|
|
type VConfig struct {
|
|
Port uint16 // Port of this VPoint server.
|
|
AllowedClients []VUser
|
|
ClientProtocol string
|
|
VNextList []VNext
|
|
}
|
|
|
|
type VConfigMarshaller interface {
|
|
Marshal(config VConfig) ([]byte, error)
|
|
}
|
|
|
|
type VConfigUnmarshaller interface {
|
|
Unmarshal(data []byte) (VConfig, error)
|
|
}
|