Using "speedtestcpp" package with specific interface

Hey everyone. I use OpenWRT on several different boxes, each box has a number of VPNs running at any one time. I sometimes need to check the average bandwidth available on a specific interface/vpn, for example I have a tun0 interface running a OpenVPN VPN connection, a wg0 running a wireguard VPN and finally another wg1 running a different VPN. I separate the VPNs using multiple routing tables. On my x86 OpenWRT boxes its easy to test the speed per interface by using the cli app provided by the speedtest.net company (https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz) this binary supports a "--interface" flag.

The problem I am facing is that many of the OpenWRT boxes I am running don't have this luxury, the best I can fit in there is the speedtestcpp package available on the openwrt repository. This speedtest client works well except it lacks the "--interface" flag which is where I am stuck. I was looking into using netns to be able to run speedtestcpp behind a veth that points it to the correct VPN I wish to test, but this methods seems fairly sophisticated and I thought I should check with the OpenWRT community first incase someone has a better/easier method to achieve the same result.

There is the 'speedtest-go' package. You could check whether it supports specifying interface.

I believe this is the upstream github repo:

https://github.com/showwin/speedtest-go

1 Like

Thank you for your reply. I did test and still sometimes use the speedtest-go project on some of my x86 boxes, but unfortunetly it wont solve this problem because it has an even larger file size than the official client

If size is the issue then perhaps look into attaching USB storage and installing the app there.

1 Like

I did consider that, and infact have used that solution for a couple of the boxes, but some of them don't have usb ports. Thanks your reply.

1 Like