From 8ca03fa94ed5136355fcb7d89b67f3ddda22fb5f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 11 Jan 2026 10:36:28 +0000 Subject: [PATCH] Clarify comment about switchToDirectCopy flag remaining true Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> --- go.mod | 2 +- proxy/proxy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f0797bc0..a39162cc 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( golang.org/x/net v0.48.0 golang.org/x/sync v0.19.0 golang.org/x/sys v0.39.0 + golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 google.golang.org/grpc v1.78.0 google.golang.org/protobuf v1.36.11 @@ -50,7 +51,6 @@ require ( golang.org/x/text v0.32.0 // indirect golang.org/x/time v0.12.0 // indirect golang.org/x/tools v0.39.0 // indirect - golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/proxy/proxy.go b/proxy/proxy.go index 5bfc026e..aea5c1da 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -267,7 +267,7 @@ func (w *VisionReader) ReadMultiBuffer() (buf.MultiBuffer, error) { // because those bytes need to be processed by the TLS layer first if w.rawInput != nil && w.rawInput.Len() > 0 { // rawInput has pending data - defer direct copy to next read - // Keep *switchToDirectCopy as true so we retry on next read + // *switchToDirectCopy remains true (unchanged), so we will retry on the next ReadMultiBuffer call // This ensures we don't mix encrypted bytes with application data return buffer, err }