• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

Simple Torrent:一个支持边下边播、无版权限制和自动上传的BT离线下载程序

主机教程 Liam 9个月前 (01-13) 1661次浏览 25个评论 扫描二维码
文章目录[隐藏]

说明:博主很久以前水过一个BT下载工具Cloud Torrent,不过好像2年没维护了,这里就介绍个基于Cloud Torrent开发的项目Simple Torrent,同样的使用Golang编写,功能在原有的基础上加了些适用的功能,下载/上传速度限制、无版权限制,RSS订阅和自定义添加BT-Trackers等,而且还有api接口,同时还支持下载后自动调用外部命令,可玩性还是很高的,比如我们可以和aria2一样,将下载完成的资源自动上传到OneDriveGoogle Drive等网盘,博主大概用了下,感觉还可以,这里就分享下。

截图

Simple Torrent:一个支持边下边播、无版权限制和自动上传的BT离线下载程序
Simple Torrent:一个支持边下边播、无版权限制和自动上传的BT离线下载程序

安装

Github地址:https://github.com/boypt/simple-torrent

使用SSH客户端登录服务器,运行命令:

bash <(wget -qO- https://raw.githubusercontent.com/boypt/simple-torrent/master/scripts/quickinstall.sh) 

然后使用ip:3000访问即可。

顺便提供个博主经常用的BT-Trackers服务器地址,效果不错,如下:

https://trackerslist.com/all.txt

直接在Web界面修改即可。

相关命令:

启动:systemctl start cloud-torrent 重启:systemctl restart cloud-torrent 停止:systemctl stop cloud-torrent 查看状态:systemctl status cloud-torrent 

Docker安装

1、安装Docker

#CentOS 6系统 rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum update -y yum -y install docker-io service docker start chkconfig docker on  #CentOS 7、Debian、Ubuntu系统 curl -sSL https://get.docker.com/ | sh systemctl start docker systemctl enable docker 

2、安装Simple Torrent

docker run --restart=always --name simple-torrent -d  -p 3000:3000  -v ~/downloads:/downloads  -v ~/torrents:/torrents  boypt/cloud-torrent

然后使用ip:3000访问即可。

最后如果你访问不了Web端,可能要检查下防火墙端口,有安全组的也要放行下相关端口。

这里提供个CentOS系统防火墙开启命令,大致如下:

#CentOS 6 iptables -I INPUT -p tcp --dport 3000 -j ACCEPT service iptables save service iptables restart  #CentOS 7 firewall-cmd --zone=public --add-port=3000/tcp --permanent firewall-cmd --reload 

API使用

关于API的用法,官方文档说的很详细了,这里就大概列举几个,如下:

#通过远程地址添加种子 curl --data "http://domain.com/file.torrent" "http://localhost:3000/api/url" #通过本地文件添加种子 curl --data-binary "my.torrent" "http://localhost:3000/api/url" #通过磁力链接添加种子 curl --data "magnet:?xt=urn:btih:..." "http://localhost:3000/api/url"  #开始种子任务 curl --data "start:${HASH}" "http://localhost:3000/api/torrent" #停止种子任务 curl --data "stop:${HASH}" "http://localhost:3000/api/torrent" #删除种子任务 curl --data "delete:${HASH}" "http://localhost:3000/api/torrent"  #查看文件和种子信息 /api/files和/api/torrents 

外部程序调用

先修改配置文件,通过上面脚本安装的配置文件在你的主目录,比如/root目录,配置文件cloud-torrent.json

修改以下参数:

#外部程序调用参数 "donecmd": "",  #比如我要下载完成后,直接运行/home目录下的rats.sh脚本 "donecmd": "/home/rats.sh",

那么下载完成后就会运行该脚本。

一般种子下载完成后,会返回以下参数变量,这里列举下主要的:

CLD_DIR为下载路径,且为绝对路径 CLD_PATH为下载文件名称 CLD_SIZE为文件大小 CLD_TYPE为调用事件类型,分为files和torrent,分别为种子里单个文件和整体文件 CLD_HASH为文件HASH值 

这里随便放一个下载后自动移动的脚本,针对rclone挂载的文件夹。

#!/bin/bash  #下载后移动的文件夹路径 RemoteDIR="/down/moerats";    if [[ ${CLD_TYPE} == "torrent" ]]; then eval mv '"${CLD_DIR}/${CLD_PATH}"' "${RemoteDIR}"; #移动后停止该任务 curl --data "stop:${CLD_HASH}" "http://127.0.0.1:3000/api/torrent"; #停止后清除该任务,也就是不会出现在Web界面了 curl --data "delete:${CLD_HASH}" "http://127.0.0.1:3000/api/torrent"; fi 

这里还可以结合TG机器人啥的一起使用,玩法很多,可以自行结合API一起使用。

要注意的是,配置调用脚本的时候,需要给予脚本可执行权,并重启程序生效,比如:

#给予可执行权,脚本路径/root/rats.sh chmod +x /root/rats.sh #重启程序 systemctl restart cloud-torrent 

相关教程

最后对于下载的话,有些资源速度还是不错的,具体效果就自行体验了。


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Simple Torrent:一个支持边下边播、无版权限制和自动上传的BT离线下载程序
喜欢 (0)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(25)个小伙伴在吐槽
  1. Spot on with this write-up, I absolutely feel this website needs a lot more attention. I'll probably be returning to read through more, thanks for the info!
    web hosting services2020-08-31 18:18 回复 Mac OS X | Safari浏览器 601.1.27
  2. It's remarkable to pay a visit this site and reading the views of all friends regarding this paragraph, while I am also zealous of getting familiarity.
    cheap flights2020-08-27 16:09 回复 Linux | Firefox浏览器 52.9
  3. Wow! Finally I got a blog from where I know how to actually take valuable information regarding my study and knowledge.
    best web hosting 20202020-08-26 00:23 回复 Windows 7 | Internet Explorer 9.0
  4. Hey there just wanted to give you a brief heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different browsers and both show the same results. 34pIoq5 cheap flights
    cheap flights2020-08-25 23:38 回复 Mac OS X | Chrome 65.0.3325.181
  5. It's very effortless to find out any matter on web as compared to books, as I found this piece of writing at this website. cheap flights y2yxvvfw
    cheap flights2020-08-25 14:04 回复 Mac OS X | Safari浏览器 605.1.15
  6. Good answers in return of this query with solid arguments and explaining everything regarding that.
    hosting services2020-08-07 13:48 回复 Linux | Chrome 66.0.3359.170
  7. Wow that was odd. I just wrote an incredibly long comment but after I clicked submit my comment didn't appear. Grrrr... well I'm not writing all that over again. Regardless, just wanted to say fantastic blog!
    best web hosting company2020-08-07 01:27 回复 Linux | Firefox浏览器 56.0.4
  8. Genuinely no matter if someone doesn't know afterward its up to other users that they will help, so here it occurs.
    best web hosting company2020-08-06 00:57 回复 Windows 7 | Internet Explorer 9.0
  9. Incredible! This blog looks exactly like my old one! It's on a entirely different subject but it has pretty much the same layout and design. Superb choice of colors!
    best web hosting 20202020-08-05 23:11 回复 Linux | Firefox浏览器 52.9
  10. Hello there, I found your web site by means of Google while looking for a comparable topic, your website came up, it looks good. I've bookmarked it in my google bookmarks. Hello there, just turned into alert to your blog thru Google, and located that it's really informative. I'm gonna be careful for brussels. I will be grateful if you proceed this in future. A lot of other people will probably be benefited out of your writing. Cheers!
    cheap flights with jet2 flight checker2020-07-31 12:40 回复 Linux | Chrome 64.0.3282.167
  11. certainly like your web site however you have to check the spelling on several of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell the reality then again I will surely come back again. adreamoftrains best hosting
    adreamoftrains best hosting2020-07-30 18:00 回复 Linux | 未知浏览器
  12. I visited various web pages however the audio feature for audio songs present at this website is actually fabulous.
    cheap flights 20212020-07-28 10:57 回复 Linux | Chrome 67.0.3396.87
  13. Why viewers still make use of to read news papers when in this technological globe everything is available on web?
    airline tickets best price2020-07-27 22:08 回复 Linux | Chrome 66.0.3349.0
  14. Great items from you, man. I have bear in mind your stuff previous to and you are just too wonderful. I actually like what you've obtained right here, really like what you are saying and the way by which you assert it. You're making it entertaining and you continue to take care of to keep it wise. I cant wait to learn much more from you. That is really a terrific site.
    webhosting2020-07-27 08:29 回复 Linux | Chrome 65.0.3400.0
  15. I'm extremely inspired with your writing talents as neatly as with the structure for your weblog. Is that this a paid topic or did you customize it yourself? Anyway keep up the nice quality writing, it is rare to see a nice blog like this one nowadays..
    best web hosting company2020-07-26 06:36 回复 Linux | Firefox浏览器 2.0.0.2
  16. I all the time used to read piece of writing in news papers but now as I am a user of net so from now I am using net for articles, thanks to web.
    best web hosting company2020-07-22 09:34 回复 Linux | Firefox浏览器 56.0.4
  17. I do consider all the concepts you've introduced in your post. They're really convincing and will definitely work. Still, the posts are too quick for novices. May you please extend them a little from next time? Thanks for the post.
    web hosting2020-07-18 10:58 回复 Linux | Chrome 66.0.3359.181
  18. google buy hacklink and watch porn.
    child porn2020-07-14 03:53 回复 Windows 10 | Chrome 62.0.3202.94
  19. For newest news you have to pay a visit world wide web and on internet I found this site as a most excellent web site for most up-to-date updates.
    cbd oil that works 20202020-06-29 11:19 回复 Linux | Chrome 61.0.3163.128
  20. I every time spent my half an hour to read this webpage's articles or reviews all the time along with a cup of coffee.
    cbd oil that works 20202020-06-28 08:36 回复 Windows Vista | Chrome 4.0.202.2
  21. constantly i used to read smaller articles that also clear their motive, and that is also happening with this piece of writing which I am reading here.
    kea.obr14.ru2020-06-26 21:36 回复 Linux | Chrome 65.0.3400.0
  22. I know this if off topic but I'm looking into starting my own blog and was curious what all is required to get set up? I'm assuming having a blog like yours would cost a pretty penny? I'm not very internet smart so I'm not 100% certain. Any tips or advice would be greatly appreciated. Appreciate it
    ginwednesday.com2020-06-26 14:25 回复 Linux | Chrome 65.0.3325.183
  23. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?
    rsacwgxy g2020-06-23 03:01 回复 Windows 8.1 | Chrome 65.0.3325.146
  24. be in indian is tablet 3d96 is efficace
    LingelbachRylinitado2020-06-07 03:24 回复 Windows 7 | Chrome 67.0.3396.87
  25. Thank you ever so for you post.Much thanks again.
    Boomer2020-05-31 22:19 回复 Windows XP | Internet Explorer 6.0