tele-aria2
v0.2.2
Published
Control your Aria2 server through Telegram
Downloads
16
Readme
tele-aria2
The newly rewritten project has a few advantages over the old one:
- Fully touch based, more easy to use, no command required to use this bot.
- Real time notification, it's now using Aria2's Websocket protocol to communicate.
- Better cli interface and config file support.
Setup
- Create your own bot and get its access token by using @BotFather.
- Get your unique user ID - https://stackoverflow.com/a/32777943/4480674.
- (Optional) Telegram blocked in your region/country? be sure to have a HTTP proxy up and running.
$ npm install tele-aria2 -g
.$ tele-aria2 --help
to see how to get started.
3 ways to pass parameters
You can pass parameters to tele-aria2 in 3 ways:
- cli
- environment variable
- configuration file
Option priorities also follow this order, so cli has the highest priority.
| | Aria2 server | Aria2 key | Telegram bot key | Telegram user id | Proxy | Max items in range(default 20) | |----------------------------- |----------------- |-------------- |------------------ |------------------ |------------- |-------------------------------- | | cli option | --aria2-server | --aria2-key | --bot-key | --user-id | --proxy | --max-index | | environment variable option | ta.aria2-server | ta.aria2-key | ta.bot-key | ta.user-id | https_proxy | ta.max-index | | configuration file option | aria2-server | aria2-key | bot-key | user-id | proxy | max-index |
configuration file example
{
"aria2-server": "ws://192.168.1.154:6800/jsonrpc",
"aria2-key": "xxx",
"proxy": "http://127.0.0.1:7890",
"bot-key": "123456789:xxx",
"user-id": "123456",
"max-index": 10
}
Need to add more users? no problem, just add user-id
like this: "user-id": "123,456,789"
.
Usage
Once your bot is up and running, go back to Telegram and click Start:
As you can see, all the action menus are instantly available to use, no command required!
How can I add a new task?
It's really simple, you just send any HTTP/FTP/SFTP/Magnet url to chat, it will recognize and add it to Aria2 server!
But I want to download from a torrent file
No worries, just send your torrent file to chat!
Docker
Run this bot as a Docker container, multi-architecture supported:
$ docker run -it \
-v ~/.tele-aria2.json:/tele-aria2/config.json \
--net=host \
houcoder/tele-aria2
Keep in mind, the --net=host
option is required if you have proxy
set in your config file.