2016-08-06 18:38:23 -04:00
|
|
|
package noop
|
|
|
|
|
|
|
|
import (
|
2016-08-20 14:55:45 -04:00
|
|
|
"v2ray.com/core/common/alloc"
|
|
|
|
"v2ray.com/core/transport/internet"
|
2016-08-06 18:38:23 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
type NoOpAuthenticator struct{}
|
|
|
|
|
|
|
|
func (this NoOpAuthenticator) Overhead() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
func (this NoOpAuthenticator) Open(payload *alloc.Buffer) bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
func (this NoOpAuthenticator) Seal(payload *alloc.Buffer) {}
|
|
|
|
|
|
|
|
type NoOpAuthenticatorFactory struct{}
|
|
|
|
|
|
|
|
func (this NoOpAuthenticatorFactory) Create(config internet.AuthenticatorConfig) internet.Authenticator {
|
|
|
|
return NoOpAuthenticator{}
|
|
|
|
}
|
|
|
|
|
|
|
|
type NoOpAuthenticatorConfig struct{}
|
|
|
|
|
|
|
|
func init() {
|
2016-08-25 07:25:59 -04:00
|
|
|
internet.RegisterAuthenticator("none", NoOpAuthenticatorFactory{})
|
2016-08-06 18:38:23 -04:00
|
|
|
}
|