This is an old revision of the document!
Using mktorrent
:
mktorrent -a http://torrent.tracker.net:9000/announce \ -a udp://torrent.tracker.net:9000 \ -n 'Torrent Name' \ -o torrent_name.torrent \ 'Torrent Directory'
Note that any number of announce parameters (-a
) are allowed and that they do not have to point to the same same domain.
Torrent clients such as qBittorrent allow blocking p2p peers based on a provided blacklist. Since the blacklist may be updated periodically, it must be re-downloaded on a schedule.
For Windows and using only native tools, the peer block list can be downloaded using the task scheduler and bitsadmin. The following Windows task can be saved to a file and them imported in "Task Scheduler":
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <RegistrationInfo> <Date>2020-01-06T06:56:13.2286344</Date> <Author>was\office</Author> <Description>Download p2p Peer Blocklist</Description> </RegistrationInfo> <Triggers> <CalendarTrigger> <StartBoundary>2020-01-06T06:00:00Z</StartBoundary> <Enabled>true</Enabled> <ScheduleByDay> <DaysInterval>1</DaysInterval> </ScheduleByDay> </CalendarTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>was\office</UserId> <LogonType>InteractiveToken</LogonType> <RunLevel>LeastPrivilege</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>true</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession> <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine> <WakeToRun>false</WakeToRun> <ExecutionTimeLimit>P3D</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>C:\Scripts\download-peerblock.bat</Command> <WorkingDirectory>C:\Users\office\Documents</WorkingDirectory> </Exec> </Actions> </Task>
The corresponding script file download-peerblock.bat
is the following:
bitsadmin /create download-peerblock bitsadmin /setnotifycmdline download-peerblock C:\Windows\System32\bitsadmin.exe "C:\Windows\System32\bitsadmin.exe /complete download-peerblock" bitsadmin /addfile download-peerblock http://omeglewarden.weebly.com/uploads/6/9/2/6/6926744/anti-p2p-companies.p2p C:\Users\office\Documents\anti-p2p-companies.p2p bitsadmin /resume download-peerblock
A file can be placed at /etc/cron.daily/peerblock
with the following contents:
#!/bin/sh /usr/bin/wget -q -c -O /opt/peerblock/anti-p2p-companies.p2p http://omeglewarden.weebly.com/uploads/6/9/2/6/6926744/anti-p2p-companies.p2p
that will download the peer block file to the /opt/peerblock
directory.