mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-10-31 16:15:28 +00:00
Revert "修复一个导致 TPROXY 下 v2ray 断流的问题"
This commit is contained in:
@@ -8,11 +8,6 @@ import (
|
||||
"v2ray.com/core/common/signal"
|
||||
)
|
||||
|
||||
// ActivityNotifiable is a object that accepts activity notification outside the object
|
||||
type ActivityNotifiable interface {
|
||||
NotifyActivity() error
|
||||
}
|
||||
|
||||
type dataHandler func(MultiBuffer)
|
||||
|
||||
type copyHandler struct {
|
||||
@@ -36,15 +31,6 @@ func UpdateActivity(timer signal.ActivityUpdater) CopyOption {
|
||||
}
|
||||
}
|
||||
|
||||
// NotifyActivity is a CopyOption to notify activity on each data copy operation.
|
||||
func NotifyActivity(notifier ActivityNotifiable) CopyOption {
|
||||
return func(handler *copyHandler) {
|
||||
handler.onData = append(handler.onData, func(MultiBuffer) {
|
||||
notifier.NotifyActivity()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// CountSize is a CopyOption that sums the total size of data copied into the given SizeCounter.
|
||||
func CountSize(sc *SizeCounter) CopyOption {
|
||||
return func(handler *copyHandler) {
|
||||
|
||||
Reference in New Issue
Block a user