Skip to content

Commit

Permalink
wiresocks: ignore client-side conn resets
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Pashmfouroush <[email protected]>
  • Loading branch information
markpash committed Aug 3, 2024
1 parent 05a019f commit c02b99a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wiresocks/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log/slog"
"net"
"net/netip"
"syscall"
"time"

"github.com/bepass-org/warp-plus/proxy/pkg/mixed"
Expand Down Expand Up @@ -82,6 +83,10 @@ func (vt *VirtualTun) generalHandler(req *statute.ProxyRequest) error {
buf1 := vt.pool.Get()
defer vt.pool.Put(buf1)
_, err := copyConnTimeout(conn, req.Conn, buf1[:cap(buf1)], timeout)
if errors.Is(err, syscall.ECONNRESET) {
done <- nil
return
}
done <- err
}()
// Copy data from conn to req.Conn
Expand Down

0 comments on commit c02b99a

Please sign in to comment.