找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: butt***

实现aria2定时限速

[复制链接]
感谢楼主分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

mark备用。谢谢。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 bqtanterry 于 2019-8-2 22:54 编辑

设置了rpc-secret的话,需要在shell脚本的params里加入token,否则会提示 {"id":1,"jsonrpc":"2.0","error":{"code":1,"message":"Unauthorized"}}。
例:
白天限速为下载:640K,上传为:30K 的shell脚本aria2_speed_restict.sh内容:
curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc":"2.0","id":1,"method":"aria2.changeGlobalOption","params":["token:your_token", {"max-overall-download-limit":"640K","max-overall-upload-limit":"30K"}]}'

注:640K为最高下载速度,30K为最高上传速度,下同

晚上恢复全速下载:1M,上传为:40K 的shell脚本aria2_speed_full.sh内容
curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc":"2.0","id":1,"method":"aria2.changeGlobalOption","params":["token:your_token", {"max-overall-download-limit":"1M","max-overall-upload-limit":"40K"}]}'

注:your_token为自行设定的rpc-secret
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

收藏一下留着用,感谢!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

找这个脚本找了好久,给楼主点个赞
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 12:38

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表