2024. február 21., szerda

Gyorskeresés

Transmission on AsusWRT routers through Entware-NG

Írta: |

[ ÚJ BEJEGYZÉS ]

Transmission is a file sharing program.

When you run a torrent, its data will be made available to others by means of upload.

Any content you share is your sole responsibility.

Optware-NG version here

This version works on all supported routers: RT-N16, RT-N66U, RT-AC66U, RT-AC56U, RT-AC68U, RT-AC87U, RT-AC88U, RT-AC3200, RT-AC5300...

1 - Install Entware-NG from here

2 - Install transmission

opkg install transmission-web transmission-daemon-openssl transmission-remote-openssl
3 - Stop transmission

/opt/etc/init.d/S88transmission stop
4 - Backup standard file settings and create a new optimized one:

mv /opt/etc/transmission/settings.json /opt/etc/transmission/settings.json.backup
cat >> /opt/etc/transmission/settings.json << 'EOF'
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-url": "https://list.iblocklist.com/?list=bt_level1",
"cache-size-mb": 2,
"dht-enabled": true,
"download-dir": "/tmp/mnt/sda1/Transmission",
"download-queue-enabled": true,
"download-queue-size": 3,
"encryption": 0,
"idle-seeding-limit": 180,
"idle-seeding-limit-enabled": true,
"incomplete-dir": "/tmp/mnt/sda1/Transmission/Incomplete",
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"message-level": 2,
"open-file-limit": 5,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 80,
"peer-limit-per-torrent": 30,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"pidfile": "/var/run/transmission-daemon.pid",
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 300,
"ratio-limit": 7,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "admin",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "admin",
"rpc-whitelist": "*.*.*.*",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 0,
"upload-slots-per-torrent": 10,
"utp-enabled": false,
"watch-dir": "/opt/etc/transmission/watchdir",
"watch-dir-enabled": true
}
EOF
Press ENTER
5 - Start transmission daemon

/opt/etc/init.d/S88transmission start
6 - Open transmission webpage by going to default router ip address and port 9091, ex. 192.168.1.1:9091 (username: admin and password: admin)
The default download folder is on /mnt/sda1/Transmission (will be created automatically with the first downloaded torrent and can be changed editing settings.json file) if your usb disk has a label, change sda1 with the disk label. Be sure transmission-daemon is not running or changes will be overwritten!!!

/opt/etc/init.d/S88transmission stop
7 - With nano you can edit any settings like enable / change username, password:

nano /opt/etc/transmission/settings.json
8 - Save settings with CTRL-O, press ENTER and exit nano with CTRL-X, now start transmission again

/opt/etc/init.d/S88transmission start
9 - Create init-start script for some memory tweaks as suggested by ryzhov_al

nano /jffs/scripts/init-start
#!/bin/sh
echo 524288 > /proc/sys/net/core/rmem_max
echo 524288 > /proc/sys/net/core/wmem_max
echo 8192 > /proc/sys/vm/min_free_kbytes

Save with CTRL-O, press ENTER and exit nano with CTRL-X

Make scripts executable

chmod a+rx /jffs/scripts/*

ACCESS FROM WAN
• If you want to access transmission from WAN like work, school, smartphone, tablet or some other device we need to open the port 9091 but the firmware doesn't allow port forwarding to the router himself, for that we will use firewall-start script on /jffs partition:

Create firewall rules

nano /jffs/scripts/firewall-start
Paste this lines in terminal

#!/bin/sh

iptables -I INPUT -p tcp --destination-port 9091 -j ACCEPT
iptables -I INPUT -p tcp --destination-port 51413 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51413 -j ACCEPT

Save with CTRL-O / Enter / and exit with CTRL-X
Make scripts executable and apply rules

chmod a+rx /jffs/scripts/*
sh /jffs/scripts/firewall-start

Go to YourWanIp:9091 on preferred internet browser or install Transmission Remote GUI

opkg remove transmission-web
opkg install transmission-web-control
opkg install mc

Copyright © 2000-2024 PROHARDVER Informatikai Kft.