Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复一个导致 TPROXY 下 v2ray 断流的问题 #2348

Merged
merged 3 commits into from
Apr 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix udp broken
  • Loading branch information
FH0 committed Mar 18, 2020
commit 7651fb5586fd4028d4a90a747af896f00795ffdd
9 changes: 9 additions & 0 deletions app/proxyman/inbound/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ func (c *udpConn) Write(buf []byte) (int, error) {
return n, err
}

// Implements buf.ActivityNotifiable
func (c *udpConn) NotifyActivity() error {
if c.done.Done() {
return newError("connection is already closed")
}
c.updateActivity()
return nil
}

func (c *udpConn) Close() error {
common.Must(c.done.Close())
common.Must(common.Close(c.writer))
Expand Down