re-org vmess content

This commit is contained in:
Darien Raymond committed 2015-12-07 19:32:38 +00:00
1 parent 0a4d9fb037
commit af8412175e
24 files changed
+113 -108

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
package json
import (
"github.com/v2ray/v2ray-core/proxy/common/config/json"
"github.com/v2ray/v2ray-core/proxy/vmess"
vmessjson "github.com/v2ray/v2ray-core/proxy/vmess/json"
)
type Inbound struct {
AllowedClients []*vmessjson.ConfigUser `json:"clients"`
}
func (c *Inbound) AllowedUsers() []vmess.User {
users := make([]vmess.User, 0, len(c.AllowedClients))
for _, rawUser := range c.AllowedClients {
users = append(users, rawUser)
}
return users
}
func init() {
json.RegisterInboundConnectionConfig("vmess", func() interface{} {
return new(Inbound)
})
}