mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-17 18:06:15 -05:00
support noop connection auth
This commit is contained in:
parent
13dde1799d
commit
dfc03ff939
@ -18,6 +18,12 @@ func (NoOpAuthenticator) Build() (*loader.TypedSettings, error) {
|
|||||||
return loader.NewTypedSettings(new(noop.Config)), nil
|
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{}
|
type SRTPAuthenticator struct{}
|
||||||
|
|
||||||
func (SRTPAuthenticator) Build() (*loader.TypedSettings, error) {
|
func (SRTPAuthenticator) Build() (*loader.TypedSettings, error) {
|
||||||
|
@ -24,6 +24,7 @@ var (
|
|||||||
}, "type", "")
|
}, "type", "")
|
||||||
|
|
||||||
tcpHeaderLoader = NewJSONConfigLoader(ConfigCreatorCache{
|
tcpHeaderLoader = NewJSONConfigLoader(ConfigCreatorCache{
|
||||||
|
"none": func() interface{} { return new(NoOpConnectionAuthenticator) },
|
||||||
"http": func() interface{} { return new(HTTPAuthenticator) },
|
"http": func() interface{} { return new(HTTPAuthenticator) },
|
||||||
}, "type", "")
|
}, "type", "")
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user