Created
August 27, 2019 00:57
-
-
Save powersee/4a6c1b9bb7298eecca2a7b09cd09050b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#more trackers list, see https://github.com/ngosang/trackerslist | |
tracker_url='https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt' | |
path='http://192.168.123.1:6800/jsonrpc' | |
#此处更改为 Aria2 的管理地址 | |
passwd='xxxx' | |
#此处为密码 | |
tracker=$(echo -n $(curl -s -L $tracker_url | sed 'N;s/\n//g') | tr ' ' ',') | |
[ -n "$tracker" ] && curl $path -d '{"jsonrpc":"2.0","method":"aria2.changeGlobalOption","id":"cron","params":["token:'$passwd'",{"bt-tracker":"'$tracker'"}]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment