1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-10 14:26:26 -05:00
v2fly/transport/internet/authenticators/noop/noop.go
2016-08-25 13:25:59 +02:00

29 lines
628 B
Go

package noop
import (
"v2ray.com/core/common/alloc"
"v2ray.com/core/transport/internet"
)
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() {
internet.RegisterAuthenticator("none", NoOpAuthenticatorFactory{})
}