forked from v2ray/v2ray-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a4d9fb
commit af84121
Showing
24 changed files
with
112 additions
and
107 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package vmess | ||
|
||
import ( | ||
"crypto/md5" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package vmess | ||
|
||
import ( | ||
"testing" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package inbound | ||
|
||
import ( | ||
"github.com/v2ray/v2ray-core/proxy/vmess" | ||
) | ||
|
||
type Config interface { | ||
AllowedUsers() []vmess.User | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package outbound | ||
|
||
type Config interface { | ||
Receivers() []*Receiver | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
package mocks | ||
|
||
import ( | ||
"github.com/v2ray/v2ray-core/proxy/vmess/config" | ||
"github.com/v2ray/v2ray-core/proxy/vmess" | ||
) | ||
|
||
type StaticUser struct { | ||
id *config.ID | ||
id *vmess.ID | ||
} | ||
|
||
func (this *StaticUser) ID() *config.ID { | ||
func (this *StaticUser) ID() *vmess.ID { | ||
return this.id | ||
} | ||
|
||
func (this *StaticUser) Level() config.UserLevel { | ||
return config.UserLevelUntrusted | ||
func (this *StaticUser) Level() vmess.UserLevel { | ||
return vmess.UserLevelUntrusted | ||
} | ||
|
||
type StaticUserSet struct { | ||
} | ||
|
||
func (us *StaticUserSet) AddUser(user config.User) error { | ||
func (us *StaticUserSet) AddUser(user vmess.User) error { | ||
return nil | ||
} | ||
|
||
func (us *StaticUserSet) GetUser(userhash []byte) (config.User, int64, bool) { | ||
id, _ := config.NewID("703e9102-eb57-499c-8b59-faf4f371bb21") | ||
func (us *StaticUserSet) GetUser(userhash []byte) (vmess.User, int64, bool) { | ||
id, _ := vmess.NewID("703e9102-eb57-499c-8b59-faf4f371bb21") | ||
return &StaticUser{id: id}, 0, true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.