• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mosquito / mitmania / 31840974010
86%
master: 86%

Build:
Build:
LAST BUILD BRANCH: v0.6.1
DEFAULT BRANCH: master
Ran 14 Aug 2026 09:08PM UTC
Jobs 1
Files 72
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Aug 2026 09:06PM UTC coverage: 86.249%. First build
31840974010

Pull #12

github

mosquito
proxy: fix relay buffer pooling to actually engage instead of wasting

The prior commit unconditionally checked out a pooled buffer before
calling io.CopyBuffer, but io.CopyBuffer silently ignores a supplied
buffer whenever either side offers ReadFrom/WriterTo — and Go 1.26's
*net.TCPConn now implements both. That made every tunnel worse, not
better: a clean, splice-eligible TCPConn pair (an ordinary mitm:false
CONNECT tunnel with nothing buffered ahead of it) held a pooled buffer
checked out, unused, for the connection's whole lifetime; a wrapped
pair (prependConn/replayConn on one side, the overwhelmingly common
case here) had its buffer ignored too, while Go's own genericReadFrom/
genericWriteTo fallback allocated a second, separate, unpooled buffer
underneath — up to double the footprint of the pre-pooling baseline.

pooledCopy now decides the strategy before touching the pool: a pair
that's genuinely splice-capable on both sides runs through plain
io.Copy untouched, preserving whatever kernel fast path Go's stdlib
would already reach; anything else acquires a pooled buffer and hides
the raw side's fast-path methods via hideFastPath first, so
io.CopyBuffer can no longer route around the buffer it was just handed.

Also fixes copybuf_test.go: its original identity assertion ("Get
after Put returns the same object") isn't something sync.Pool ever
promises, even single-goroutine and fully isolated — Put can land in
the calling P's private slot, and async preemption can move the
goroutine to a different P before the next Get, which then misses
that slot outright. Replaced with the allocation-count based test,
the correct way to verify amortized pool reuse.
Pull Request #12: proxy: pool io.Copy scratch buffers for tunnel relay and h2 response bodies

5645 of 6545 relevant lines covered (86.25%)

4716.06 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31840974010.1 14 Aug 2026 09:08PM UTC 72
86.25
GitHub Action Run
Source Files on build 31840974010
  • Tree
  • List 72
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31840974010
  • Pull Request #12
  • Next Build on observability-verdict-bandwidth (#31841896252)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc