Do you have a very specific network issue, specifically downstream packet loss as I encountered recently. Well then, here’s your guide to making browsing speedy again by setting up a Tinyproxy server that uses BBR to handle TCP congestion control.
1. Get a Server
You need a server, somewhere not on your network. It should run Linux (this guide assumes Ubuntu 24.04 but any distro should work. A small cloud VPS is perfect. You could probably do something like this on Windows or BSD but this guide is for Linux.
2. Set The Server To Use BBR
Easy, just load the kernel module and enable it.
modprobe tcp_bbr
sysctl -w net.ipv4.tcp_congestion_control=bbr
Note that this setting will reset if you reboot. Consider running this automatically with a SystemD service or something.
3. Install Tinyproxy
There’s a lot of HTTP proxy software, but this one is the easiest to setup.
apt install tinyproxy
Make sure it’s port (8888 be default) is open on whatever firewall you have.
4. Configure Tinyproxy
The config file is in /etc/tinyproxy/tinyproxy.conf. There’s a bunch of options, but you mainly need a single line:
Allow [Put your IP here, CIRD ranges are supported]
This allows incoming connections to your proxy. You can setup password authentication, but this breaks a lot of clients. Make sure to only use this proxy on networks you trust as anyone sniffing packets can easily find and use it.
5. Restart The Proxy
Load that beautiful new configuration
systemctl restart tinyproxy
(you could probably just reload it but I like to restart unless its actively being used)
6. Use It
Set whatever stuff you have to use the proxy. It should be on port 8888 at whatever IP your server uses. You can do fancy stuff with PAC files if you want to automate this.
7. Stop Using It
Proxies are kind of basic and can slow down browsing slightly, as they don’t support some of the nicer HTTP protocol stuff (like HTTP3). You’ll also get loads of CAPTCHAs from sites that detect proxies. Once your (hopefully transient) network issues are resolved go back to using the web normally.
Leave a Reply