mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
@ -9,7 +9,7 @@ import (
|
||||
|
||||
const replayFilterCapacity = 100000
|
||||
|
||||
// ReplayFilter check for replay attacks.
|
||||
// ReplayFilter checks for replay attacks.
|
||||
type ReplayFilter struct {
|
||||
lock sync.Mutex
|
||||
poolA *cuckoo.Filter
|
||||
@ -31,7 +31,7 @@ func (filter *ReplayFilter) Interval() int64 {
|
||||
return filter.interval
|
||||
}
|
||||
|
||||
// Check determine if there are duplicate records.
|
||||
// Check determines if there are duplicate records.
|
||||
func (filter *ReplayFilter) Check(sum []byte) bool {
|
||||
filter.lock.Lock()
|
||||
defer filter.lock.Unlock()
|
||||
|
Reference in New Issue
Block a user