GiH
GiH

Reputation: 14634

How to create a torrent without tracker on Transmission?

I'm trying to create a torrent without a tracker. I just want to send some GoPro footage to a friend of mine but I can't get it working.

I've created a torrent with nothing in the tracker field and set the torrent to public, private is unchecked. I sent myself the file to test downloading it on another computer.

I can't get it to work. I've opened my port, when I run the test, it says the port's open on both my laptop and desktop. I've got a static IP on the desktop which is where the torrent was created and is being shared, and I emailed it to myself. I'm running Transmission on both, but one is Windows and one is Mac.

Any ideas why I can't get it to work? DHT is enabled on both.

Upvotes: 1

Views: 1740

Answers (1)

iCODEiT
iCODEiT

Reputation: 56

Transmission is not the best option for that i advice you to use mktorrent faster and more reliable all my time using it it never failed but if you want to use transmission as a seeder or a uploader client you can use this php script and just edit it to save the torrent files in transmission watch folder or any folder that you want

<?php

define('ROOT_DIR', '/home');
define('SCAN_DIR', ROOT_DIR.'/scan');
define('COMPLETE_DIR', ROOT_DIR.'/complete');
define('TORRENT_DIR', ROOT_DIR.'/torrent');
define('ANNOUNCE_URL', 'YOUR-TRACKER-ANNOUNCE-AND-PASSKEY-HERE');
define('PIECE_SIZE', '21');
function move($source, $dest) {
    $cmd = 'mv "'.$source.'" "'.$dest.'"'; 
    exec($cmd, $output, $return_val); 
    if ($return_val == 0) return 1;
    return 0;
}
function make_torrent($file_full, $new_dir, $file) {
    $file = pathinfo($file_full, PATHINFO_BASENAME);
    $move_file = $new_dir.'/'.$file;

    $rez = move($file_full, $move_file);
    if (!$rez) die('Cannot move file!');

    $info = pathinfo($file);
    $output = TORRENT_DIR.'/'.$info['basename'].'.torrent';
    if (file_exists($output)) unlink($output);
    $cmd = "mktorrent '$move_file' -o '$output'-l".PIECE_SIZE." -a ".ANNOUNCE_URL;
    echo $cmd."<br /> <br /> \n \n";
    exec($cmd);
    if (file_exists($output)) return $output;
    else die('Cannot make torrent!');
}
function scan_folder() {
    $dir = SCAN_DIR;
    $dir_done = COMPLETE_DIR;

    if (!is_dir($dir_done))
    {
        $ok = mkdir($dir_done);
        if (!$ok) die('Cannot create destination folder!');
    }

    $dh = opendir($dir);
    while ( $file = readdir($dh) )
    {
        if ($file == '.' || $file == '..') continue;
        $file_full = $dir.'/'.$file;
        if ($file_full == COMPLETE_DIR) continue;
        make_torrent($file_full, $dir_done, $file);
    }
}
scan_folder();
?>

you can ignore the tracker lines or just delete them the script is more or less self explanatory if you need any help please ask away

iCODEiT 0UT

Upvotes: 0

Related Questions