V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
mangojiji
V2EX  ›  宽带症候群

有没有可以对 HTTP(S)进行全国测速的 Linux 命令行工具?

  •  
  •   mangojiji · 45 天前 · 1248 次点击
    这是一个创建于 45 天前的主题,其中的信息可能已经有所发展或是发生改变。

    不是测 Tcping 也不是测 ICMP-ping ,

    需要 https://www.itdog.cn/http/ 这样的,可以 http(s)进行全国测速的命令行工具。

    12 条回复    2024-07-25 01:22:41 +08:00
    ztelliot
        1
    ztelliot  
       45 天前
    mangojiji
        2
    mangojiji  
    OP
       45 天前
    @ztelliot 想要个支持命令行的…
    goodryb
        3
    goodryb  
       45 天前
    官方要是没有提供 CLI ,有没有可能自己调用网站的接口,封装个命令行工具
    mangojiji
        4
    mangojiji  
    OP
       45 天前
    mangojiji
        5
    mangojiji  
    OP
       45 天前
    mangojiji
        7
    mangojiji  
    OP
       45 天前
    @otakustay 谢大佬。
    tool2dx
        8
    tool2dx  
       45 天前
    我看了一下 websocket ,仅仅是下载结果,并不负责提交网站 url 。

    如果实在想弄 linux ,感觉可以弄一个无头浏览器来自动化调用 itdog 。
    azarasi
        9
    azarasi  
       45 天前
    httping
    goodryb
        10
    goodryb  
       45 天前
    @tool2dx 提交网站是在前面一个请求,似乎返回有个 taskid 和 token ,ws 通过这两个去下载测试结果
    mangojiji
        11
    mangojiji  
    OP
       45 天前
    @goodryb taskid 可以拿到,token 是算出来的。麻烦,..
    mangojiji
        12
    mangojiji  
    OP
       45 天前
    @goodryb emmm....试了一下,还是给撸了出来。。。把里边儿的 www.baidu.com 换别的网址就行了。
    用到 npm i -g wscat 和 jq

    ```shell
    unset key; export key='token_20230313000136kwyktxb0tgspm00yo5';D=`curl -X POST https://www.itdog.cn/http/ \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d 'line=&host=www.baidu.com&host_s=www.baidu.com&check_mode=fast&ipv4=&method=get&referer=&ua=&cookies=&redirect_num=5&dns_server_type=isp&dns_server=' 2>/dev/null | grep -o -P "task_id='\K[^']+" | head -n 1| xargs -I {} bash -c 'token=$(echo -n {}$key | md5sum | cut -c 9-24); echo "{\"task_id\": \"{}\", \"task_token\": \"$token\"}"'`; wscat -x "$D" -c "wss://www.itdog.cn/websockets" | jq '"[code: \(.http_code)] [time: \(.all_time)] [ISP: \(.name)] [addr: \(.address)]"';
    ```

    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1187 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:56 · PVG 07:56 · LAX 16:56 · JFK 19:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.