I want to make a virtual network interface to TCP-proxy a website and have my browser see it through a slow network connection, in order to debug performance issues in the website itself.
So far I managed to set it up in the following way:
ip link add dummy-SLOW type dummy
ifconfig dummy-SLOW 10.54.0.10 up
tc qdisc add dev dummy-SLOW root tbf rate 120kbit latency 200ms burst 1540
and then
socat tcp-listen:443,bind=10.54.0.10,reuseaddr,fork tcp:XXX.XXX.XXX.XXX:443
I also added an alias in /etc/hosts
so that I can see the website under the IP address 10.54.0.10
.
Well, I can see the site through this setup, no problem, the address 10.54.0.10
even shows in Chrome devtools. But traffic shaping is not working... I still see too many bytes downloading too fast. How can I get traffic shaping to work?
NOTE: IF there is a way for having the proxy do the throttling, well that also works for me.