From a54b70df3307ab258ab368211c9587dc77a97d85 Mon Sep 17 00:00:00 2001 From: xtr3mz <3025696+xtr3mz@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:10:57 +0800 Subject: [PATCH 1/6] Create addtkr.sh --- addtkr.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 addtkr.sh diff --git a/addtkr.sh b/addtkr.sh new file mode 100644 index 0000000..42ba0c8 --- /dev/null +++ b/addtkr.sh @@ -0,0 +1,45 @@ +#auth=账号:密码 +auth=transmission:transmission +#host=路由ip地址:端口 +host=192.168.1.1:9091 +tips="No active torrent" +app=/usr/sbin/transmission-remote +#本文件,tracker.txt和transmission-remote存放位置 +basefdr=/mnt/hdd/transplus +apx=$basefdr/transmission-remote +trackerslist=$basefdr/trackers.txt + +add_trackers() { + torrent_hash=$1 + id=$2 + if [ -f $trackerslist ]; then + for tracker in $(cat $trackerslist) ; do + if $app "$host" --auth="$auth" --torrent "${torrent_hash}" -td "${tracker}" | grep -q 'success'; then + echo ' skiped.' + else + echo ' added .' + fi + done + else + echo "trackers.txt lost" $trackerslist + fi +} + +if [ ! -f "$app" ]; then + cp $apx $app + chmod 777 $app +fi + +ids="$($app "$host" --auth="$auth" --list | grep -vE 'Seeding|Stopped|Finished|[[:space:]]100%[[:space:]]' | grep '^ ' | awk '{ print $1 }')" +for id in $ids ; do + hash="$($app "$host" --auth="$auth" --torrent "$id" --info | grep '^ Hash: ' | awk '{ print $2 }')" + torrent_name="$($app "$host" --auth="$auth" --torrent "$id" --info | grep '^ Name: ' |cut -c 9-)" + echo $(date "+%Y-%m-%d %H:%M:%S")" - Adding trackers for $torrent_name..." + add_trackers "$hash" "$id" + tips="done" +done + +echo $tipsdone +done + +echo $tipss From b012b5d4190b4dd379fbabc0fdd3bec20044dcc9 Mon Sep 17 00:00:00 2001 From: xtr3mz <3025696+xtr3mz@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:19:34 +0800 Subject: [PATCH 2/6] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 中文说明 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 31969dd..65ad596 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,25 @@ +需要有cpu对应版本的 **transmission-remote + +0,将脚本另存为 addtkr.sh + +1,挂载 硬盘到 /mnt/hdd + +2,硬盘新建transplus文件夹,把 transmission-remote和addtkr.sh放进去,网上搜tracker,以文本存成trackers.txt(每行一个地址,不要有空白行) + +3,计划任务/cron,添加 * */1 * * * /mnt/hdd/transplus/addtkr.sh>/mnt/mydisk/tracker.log + +注:* */1 * * * 代表每分钟执行一次 + +默认设置在addtkr.sh前几行,把里面 + +ip改成你路由ip + +账号密码改成你的transmission账号密码 + +只需要addtkr.sh,其他文件不用下 + +修改自:(原文) + # Get more trackers, get more seeders, get more peers transmission [![Docker Image CI](https://github.com/AndrewMarchukov/tracker-add/actions/workflows/docker-image.yml/badge.svg?branch=docker)](https://github.com/AndrewMarchukov/tracker-add/actions/workflows/docker-image.yml) [![](https://images.microbadger.com/badges/version/andrewmhub/transmission-tracker-add.svg)](https://microbadger.com/images/andrewmhub/transmission-tracker-add) ![Docker Pulls](https://img.shields.io/docker/pulls/andrewmhub/transmission-tracker-add.svg) ![GitHub top language](https://img.shields.io/github/languages/top/AndrewMarchukov/tracker-add.svg) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/andrewmhub/transmission-tracker-add/latest) From c4a6a2c3d54dcddac2ea453457d9a7284592bbbf Mon Sep 17 00:00:00 2001 From: xtr3mz <3025696+xtr3mz@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:20:26 +0800 Subject: [PATCH 3/6] Update README.md fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65ad596..7027cb0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 2,硬盘新建transplus文件夹,把 transmission-remote和addtkr.sh放进去,网上搜tracker,以文本存成trackers.txt(每行一个地址,不要有空白行) -3,计划任务/cron,添加 * */1 * * * /mnt/hdd/transplus/addtkr.sh>/mnt/mydisk/tracker.log +3,计划任务/cron,添加 * */1 * * * /mnt/hdd/transplus/addtkr.sh>/mnt/hdd/tracker.log 注:* */1 * * * 代表每分钟执行一次 From 6ca157a05d719c6033e3cf437bf746f89f188871 Mon Sep 17 00:00:00 2001 From: xtr3mz <3025696+xtr3mz@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:26:05 +0800 Subject: [PATCH 4/6] Create tracker.txt --- transplus/tracker.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 transplus/tracker.txt diff --git a/transplus/tracker.txt b/transplus/tracker.txt new file mode 100644 index 0000000..453e50e --- /dev/null +++ b/transplus/tracker.txt @@ -0,0 +1,27 @@ +http://openbittorrent.com:80/announce +udp://opentrackr.org:1337/announce +http://tracker.opentrackr.org:1337/announce +udp://tracker.openbittorrent.com:6969/announce +http://bt.ali213.net:8000/announce +http://bt.3dmgame.com:2710/announce +http://tracker.ali213.net:8080/announce +http://secure.pow7.com:80/announce +http://pow7.com:80/announce +http://t1.pow7.com:80/announce +http://t2.pow7.com:80/announce +http://atrack.pow7.com:80/announce +http://tracker.pow7.com:80/announce +http://open.acgtracker.com:1096/announce +http://95.107.48.115:80/announce +http://vps02.net.orel.ru:80/announce +http://tracker1.bt.moack.co.kr:80/announce +http://156.234.201.18:80/announce +https://tr.fuckbitcoin.xyz:443/announce +https://tr.doogh.club:443/announce +https://tr.burnabyhighstar.com:443/announce +http://tracker.mywaifu.best:6969/announce +http://95.217.167.10:6969/announce +https://tr.highstar.shop:443/announce +http://tracker.lelux.fi:80/announce +http://tracker.vraphim.com:6969/announce +udp://tracker.tallpenguin.org From ab57c99dc72f5308fb23e826a8854c9505517943 Mon Sep 17 00:00:00 2001 From: xtr3mz <3025696+xtr3mz@users.noreply.github.com> Date: Wed, 16 Nov 2022 11:26:56 +0800 Subject: [PATCH 5/6] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7027cb0..748d815 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ ip改成你路由ip 只需要addtkr.sh,其他文件不用下 +目录:(硬盘上/mnt/hdd) +/transplus +/transplus/addtkr.sh +/transplus/trackers.txt +/transplus/transmission-remote + 修改自:(原文) # Get more trackers, get more seeders, get more peers transmission From 75492cfa900f42bf95b891a788397118dab4f57b Mon Sep 17 00:00:00 2001 From: xtr3mz <3025696+xtr3mz@users.noreply.github.com> Date: Mon, 27 Feb 2023 21:01:43 +0800 Subject: [PATCH 6/6] Update addtkr.sh fix --- addtkr.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addtkr.sh b/addtkr.sh index 42ba0c8..0cc5f60 100644 --- a/addtkr.sh +++ b/addtkr.sh @@ -38,8 +38,4 @@ for id in $ids ; do add_trackers "$hash" "$id" tips="done" done - -echo $tipsdone -done - -echo $tipss +echo $tips