mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-13 14:44:15 +00:00
Refactor vmess internal struct for better readability
This commit is contained in:
1 parent
8a6b07ba61
commit
791ac780f0
7 files changed
+147
-229
No files matched your search
@@ -9,7 +9,6 @@ import (
|
||||
// VPoint is an single server in V2Ray system.
|
||||
type VPoint struct {
|
||||
Config VConfig
|
||||
UserSet *VUserSet
|
||||
ichFactory InboundConnectionHandlerFactory
|
||||
ochFactory OutboundConnectionHandlerFactory
|
||||
}
|
||||
@@ -19,12 +18,6 @@ type VPoint struct {
|
||||
func NewVPoint(config *VConfig, ichFactory InboundConnectionHandlerFactory, ochFactory OutboundConnectionHandlerFactory) (*VPoint, error) {
|
||||
var vpoint = new(VPoint)
|
||||
vpoint.Config = *config
|
||||
vpoint.UserSet = NewVUserSet()
|
||||
|
||||
for _, user := range vpoint.Config.AllowedClients {
|
||||
vpoint.UserSet.AddUser(user)
|
||||
}
|
||||
|
||||
vpoint.ichFactory = ichFactory
|
||||
vpoint.ochFactory = ochFactory
|
||||
|
||||
|
||||
Reference in new issue
Block a user