Using Rclone with 21vianet mod and Aria2, even UNRAR easily on Heroku.
在 Heroku 上轻松运行 Rclone、Aria2,甚至是 UNRAR。
- Create new app
heroku create zt-rc -b https://github.com/lcylty/heroku-rclone-21vianet.git
heroku git:clone -a zt-rc
# or useing existed app
heroku buildpacks:set https://github.com/lcylty/heroku-rclone-21vianet.git -a zt-rc
- Setup Rclone by following Rclone Docs.
Chinese users setup with 21vianet patch to connect OneDrive by 21vianet.
You can find your config from there:
Windows: %userprofile%\.config\rclone\rclone.conf
Linux: $HOME/.config/rclone/rclone.conf
Rclone with 21vianet patch and Gclone mod provided by xhuang.
- Go to
myapp
directory, copyrclone.conf
and winrar registraton key.rarreg.key
(optional) then commit the change.
cd zt-rc
git add .
git commit -am "add config"
git push heroku master
cd zt-rc
heroku run bash
# or
heroku run bash --a zt-rc
Learn more from Rclone Docs
Upload file to Google Drive
rclone -v copy local_dir gdrive_config:remote_drive_dir
View file on Google drive
rclone lsd gdrive_config:remote_drive_dir
Learn more from Aria2 Docs
Download a file
aria2c -x4 http://host/file.rar
-x4
mean download using 4 connection
Learn more from UNRAR Docs
Extract .rar
or .zip
Compressed file
# to current directory
unrar e file.rar/zip
# with full path
unrar x file.rar/zip
Speed up upload
If you want to upload many files smaller than 8mb increase only --transfers
option
rclone -v --transfers=16 --drive-chunk-size=16384k --drive-upload-cutoff=16384k copy local_dir gdrive_config:remote_drive_dir
--transfers=N
number parallel of connection. default: 4
--drive-chunk-size=N
if file bigger than this size it will splits into multiple upload, increase if you want better speed. default: 8192k or 8mb
--drive-upload-cutoff=N
should be same with chunk size
-v
option to view upload progress stats