Skip to content

Instantly share code, notes, and snippets.

@powersee
Created August 27, 2019 00:57
Show Gist options
  • Save powersee/4a6c1b9bb7298eecca2a7b09cd09050b to your computer and use it in GitHub Desktop.
Save powersee/4a6c1b9bb7298eecca2a7b09cd09050b to your computer and use it in GitHub Desktop.
#!/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