40 Mbps in the Config, 5 Mbps on the Screen
A half-remembered Mbps-to-bytes formula left the 3proxy bandlim cap at 5 Mbps instead of 40. The manual said bits all along.
TL;DR
A 3proxy bandwidth cap configured at 40 Mbps actually limited traffic to 5 Mbps because bandlim expects bits per second, not bytes, so the fix was changing 5000000 to 40000000. The same commit trimmed a GoAccess dashboard to three panels, surfacing the URL table immediately. Lesson: verify unit conversions against the manpage.
# 40 Mbps in the Config, 5 Mbps on the Screen
A speed test through the proxy, and the number sat stubbornly around 5 Mbps. The config claimed a 40 Mbps cap, bandwidth limiting in both directions. Five, not close to forty. My first suspect was the network layer: maybe the ISP was throttling, maybe the router. A path without the proxy, straight to the internet, ran at normal speed. So the problem lived in 3proxy.
Then I looked at the actual values. bandlimin and bandlimout were both set to 5000000, and there was an old comment right above them explaining the math: "40 Mbps = 5.000.000 B/s (rumus: Mbps x 125.000)". That formula converts megabits to bytes per second, and it is correct arithmetic. Except 3proxy's bandlim does not want bytes per second.
The 3proxy manpage says: "bandlim sets bandwith limitation filter to bps (bits per second)". Then, almost helpfully: "If you want to specife bytes per second - multiply your value to 8" [5]. The config was passing 5000000 as the rate, and bandlim read that as bits, not bytes. Effective cap: 5 Mbps. Not 40. An 8x error, printed next to a confident comment that made it look intentional.
The fix was one digit: 5000000 became 40000000. Speed test again, 39-40 Mbps. Thirty seconds to verify what a half-remembered formula had been hiding.
I trust a speed test over any unit conversion I do in my head. A formula you remember wrong is the most dangerous kind of mistake: it looks precise, it feels right, and the number you write down is off by exactly a factor of 8. A comment in the config quoting that formula makes it worse, because you read it, it sounds plausible, and nobody re-checks the manual after that. One sentence in the manpage, ten seconds to find, and it settled the whole thing.
The Dashboard Trimmed to Tables
The same commit also cleaned up the GoAccess dashboard that reads the proxy logs. Out of the box, GoAccess shows a lot of panels: general stats, referrers, browsers, operating systems, and so on. Most of them say nothing useful about a small LAN proxy, and the one thing I actually open the dashboard for, the URL table, was drowning in the middle of the pile.
Two flags from the GoAccess manpage fixed it [2]. --ignore-panel drops a panel from parsing and display entirely, and I removed 16 of them: referrers, browsers, OS, hosts, and the rest. What stays is General Statistics, Requested Files, and the status codes. --html-prefs sets the HTML report's default preferences as a one-line JSON string, so I set autoHideTables to false and perPage to 10. The URL table is now visible the moment the dashboard loads, no expanding, no scrolling.
Why care so much about that table? Because it goes back to the old question: the 3proxy counters answer "how much", but "which URLs are eating the bandwidth" is a GoAccess question. If the table hides behind a click, you built a realtime dashboard and still can't see the answer you came for. The Accepting_connections startup lines from 3proxy also get filtered out in the awk feeder now. Less noise, more signal.
Why care so much about that table? Because it goes back to the old question: the 3proxy counters answer "how much", but "which URLs are eating the bandwidth" is a GoAccess question. If the table hides behind a click, you built a realtime dashboard and still can't see the answer you came for. The Accepting_connections startup lines from 3proxy also get filtered out in the awk feeder now. Less noise, more signal.
Two small changes in one commit. But the cap in the config now means the same thing as the number in the speed test, and for a unit of measurement, that agreement is the whole point.
---