Torrenting in google drive

Hi onehacks,
Can you help me with a script for that process?
so let’s get it straight and in simple words, How can I create a torrent file from files or folder in google drive using scripts in google colab?
and what if I wanted to create a private torrent using private tracker?
also, what about seeding after creating and loading the file into libtorrent?
thanks in advance :heart::heart:

there r many posts regarding this already
u shd search before posting

1 Like

Making questions way too easy nowadays, but a few questions are just questions, all questions has answers, but thing is to determine does it contain any solution, does it have a solution or it’s just a hopeless question. anyway, let me answer the way it should get done.

It’s not that easy or possible the way you think of it is. first of all, learn what is torrenting.

What Is Torrenting? (Torrent Definition)

Torrenting is a kind of peer-to-peer (P2P) file-sharing technology where a number of users can connect and share their files rather than being dependent on a single website or source for downloading files.

A user can not only download the file from the direct source but also from other users of the same torrent, facilitating a smoother transfer among users.

Each peer acts as a mini-server, which significantly reduces the network load.

It’s easy to search a file of your choice on the internet and download it through a torrent. However, the torrenting experience might improve to a surprising extent once the users get to know the techniques that take place every time a file is downloaded.

How Torrent Works

To understand the peer-to-peer process, it’s essential to know a few terms.

  • Peers: All users involved in sharing files through torrent P2P sharing. They are said to be peers as long as they keep sharing files on the network.
  • Seeders: A user who is downloading a file from a torrent and simultaneously uploading it to be used by other users.
  • Indexers: Websites that work as a search engine for the files and content to be downloaded through a torrent. Some famous indexers are Piratebay, Extratorrent or Torrentz, which are widely used.
  • Trackers: Servers that act as bridges between the peers. They direct the packets from user to user and help find peers on the network for a particular download.
  • Swarms: A number of peers downloading or uploading the same torrent files.
  • Leechers: The peers who download a torrent file but restrict uploading from their server or stop the torrent as soon as their file is downloaded to prevent the upload. Their intention is not to help the other peers download.
  • BitTorrent Client: One of the main requirements for torrenting is the presence of a client. Usually, uTorrent enables the process by combining the fragments from many seeds, assembling them and managing the download.

Now the answer to your question Create torrent from Google drive? that means seeding torrent from Google drive.

As for Google, Note that google drive has several limitations: request limit, download limit, quota limit and CORS, and Google hasn’t announced that it supports CORS so far. Moral, hopeless question.

Your Drive seed a torrent to get it transferred is that for real?. :shushing_face:

It would be cool if you could construct your own WebSeed with custom get mechanism.

Everything isn’t as simple as a GET request with range header

Some require credentials, you might be dealing with streams coming from a socket (Google FireStore) or other storage that doesn’t play nice with easy hotlinking. Perhaps the file isn’t as well mapped as a file hierarchy maybe the file is only accessible by a hash/id identifier, you could build something that uses ftp, afp, smb protocol.

Something like this

peer = new WebSeed({
  async get(pieceIndex, offset, length) {
    const blob_or_arraybufer = await getPiece(...args)
    return blob_or_arraybufer
  }
  destroy() {
  }
}, torrent)

you could then implement a WebSeed using any cloud storage API

Or to make any hybrid torrent client to a WebSeed.

Furthermore, to create a torrent for the file to have it webseeded if hotlinked, then you have to pre-create the torrent with the file, Only if Google Drive doesn’t support CORS there’s nothing we can do, follow the resources…

Good Luck & Happy Learning! :+1:

7 Likes

Told ya! People are always lazy and never take affords (researching, searching or otherwise), just questioning what they want.

That is why I don’t like to give a solution, but hint instead.

2 Likes

So good but not close enough to my request,I know how torrent works since 2011 and clearly I tried the script you provided before to download torrents to Google Drive using colab but the idea here is if it was possible to do a script that let me create a torrent in google colab from a folder in my drive and to pass limitation we may let it copy the folder first to the colab instance and then create the torrent file from it and add trackers and comment and choose piece size … I thought it could be doable via commands in colab since it allowed torrenting for downloading and by the way here is where google led me to py3createtorrent but my lack of coding is the problem here.So, can we do any of those lines in colab? I mean, we already have our torrent client running in colab why not?!!

2 Likes

the search has no answer to my request, if you took time to read the topic rather than its address you may have helped if you know or searched for help if you don’t.And for the lazy part,I searched google enough before I search the community but no similar request any where or at least the coding lines that fit that process.Finally, thanks for your time.

1 Like

People are not lazy some problems are there about understand, or in mind any new ideas are searching to do any new or something different.
People are asking questions here onehack.us on hope of answers.

1 Like

@Abd_Shk @ZaKiLeGenD it just took me 5 seconds to find on Google myself. Any objection?

Once you know the commands, you can run them with “!” via python notebook (or Google Colab). If you wanna runt these commands in python, there are many ways you can perform e.g. via subprocess or os.popen.

Note that I might be tough sometimes as I was taught to do everything myself. This is the way I convey and teach you guys :slight_smile: Learning from doing is the best way to get more understands quickly.

FIND ANOTHER PLACE TO ARGUE. THIS CLEAN TOPIC TURNING INTO A MESS. STOP IT PLEASE! STOP DEFENDING EACH OTHER!