mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
32 lines
489 B
Go
32 lines
489 B
Go
package stat
|
|
|
|
type EmptyTrafficMeter struct {
|
|
TrafficMeter
|
|
}
|
|
|
|
func (t *EmptyTrafficMeter) Count(string, uint64, uint64) {
|
|
//do nothing
|
|
}
|
|
|
|
func (t *EmptyTrafficMeter) Query(string) (uint64, uint64) {
|
|
//do nothing
|
|
return 0, 0
|
|
}
|
|
|
|
func (t *EmptyTrafficMeter) Close() error {
|
|
//do nothing
|
|
return nil
|
|
}
|
|
|
|
type EmptyAuthenticator struct {
|
|
Authenticator
|
|
}
|
|
|
|
func (a *EmptyAuthenticator) CheckHash(hash string) bool {
|
|
return true
|
|
}
|
|
|
|
func (a *EmptyAuthenticator) Close() error {
|
|
return nil
|
|
}
|