1.安装pip

    1. apt install python-pip -y

    2.安装speedtest-cli

    pip install speedtest-cli
    

    3.使用

    speedtest-cli --no-upload --no-pre-allocate --single --source [整体替换为出口IP]
    

    获取出口IP

    ip addr | grep ppp1 | grep inet -n | sort -k6
    

    安装方法2

    cd /root && curl -Lo speedtest-cli http://nas.wyk.hk:88/speedtest.py && chmod +x speedtest-cli
    

    使用

    cd /root
    
    ./speedtest-cli --no-upload --no-pre-allocate  --source [整体替换为出口IP]