1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-02 15:25:28 -05:00

re-enable vmess test

This commit is contained in:
V2Ray
2015-09-16 21:13:13 +02:00
parent 8f93612dec
commit 228e1eeabe
11 changed files with 137 additions and 68 deletions

View File

@@ -7,6 +7,7 @@ import (
type MockUserSet struct {
UserIds []core.ID
UserHashes map[string]int
Timestamps map[string]int64
}
func (us *MockUserSet) AddUser(user core.User) error {
@@ -17,7 +18,7 @@ func (us *MockUserSet) AddUser(user core.User) error {
func (us *MockUserSet) GetUser(userhash []byte) (*core.ID, int64, bool) {
idx, found := us.UserHashes[string(userhash)]
if found {
return &us.UserIds[idx], 1234, true
return &us.UserIds[idx], us.Timestamps[string(userhash)], true
}
return nil, 0, false
}