Revert "修复一个导致 TPROXY 下 v2ray 断流的问题"

This commit is contained in:
Kslr authored and GitHub committed 2020-05-31 11:58:24 +08:00
1 parent b355c7089b
commit db29bea2ed
3 files changed
+1 -28

No files matched your search

+1 -5
View File
@@ -164,10 +164,6 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in
writer = &buf.SequentialWriter{Writer: tConn}
tReader := buf.NewPacketReader(tConn)
notify, ok := conn.(buf.ActivityNotifiable)
if !ok {
panic("conn should implement ActivityNotifiable")
}
requestCount++
tproxyRequest = func() error {
defer func() {
@@ -175,7 +171,7 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in
timer.SetTimeout(plcy.Timeouts.DownlinkOnly)
}
}()
if err := buf.Copy(tReader, link.Writer, buf.UpdateActivity(timer), buf.NotifyActivity(notify)); err != nil {
if err := buf.Copy(tReader, link.Writer, buf.UpdateActivity(timer)); err != nil {
return newError("failed to transport request (TPROXY conn)").Base(err)
}
return nil