1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-29 23:36:25 -04:00

support noop connection auth

This commit is contained in:
Darien Raymond 2016-11-05 01:15:32 +01:00
parent 13dde1799d
commit dfc03ff939
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,12 @@ func (NoOpAuthenticator) Build() (*loader.TypedSettings, error) {
return loader.NewTypedSettings(new(noop.Config)), nil
}
type NoOpConnectionAuthenticator struct{}
func (NoOpConnectionAuthenticator) Build() (*loader.TypedSettings, error) {
return loader.NewTypedSettings(new(noop.Config)), nil
}
type SRTPAuthenticator struct{}
func (SRTPAuthenticator) Build() (*loader.TypedSettings, error) {

View File

@ -24,6 +24,7 @@ var (
}, "type", "")
tcpHeaderLoader = NewJSONConfigLoader(ConfigCreatorCache{
"none": func() interface{} { return new(NoOpConnectionAuthenticator) },
"http": func() interface{} { return new(HTTPAuthenticator) },
}, "type", "")
)