Giter VIP home page Giter VIP logo

Comments (8)

astro avatar astro commented on May 14, 2024

Private torrents is a bit in the .torrent files, to be respected by clients. Please see the BEP.

from bittorrent-tracker.

KamuelaFranco avatar KamuelaFranco commented on May 14, 2024

What about .torrent files that need to pass authentication with the tracker? I was told this is sometimes accomplished through specific announce URL's. How does this project allow for this level of user authorization?

from bittorrent-tracker.

astro avatar astro commented on May 14, 2024

I currently do it like in the express example but with a custom handler that checks these URLs. I then prepare req.url = "/announce" and pass to onHttpRequest(). Admittedly a little quirky.

Actually, I would like to move the checks to my Swarm implementation. For that we'll need to:

  • Convey the HTTP req and its parameters to Swarm params
  • expose interfaces that let us do our own req.url checks

from bittorrent-tracker.

KamuelaFranco avatar KamuelaFranco commented on May 14, 2024

Can you give me an example of your current workaround? Would you keep these announce ID's in a database?

from bittorrent-tracker.

astro avatar astro commented on May 14, 2024

My express handler looks like this:

app.get('/tracker/:secret/announce', function (req, res) {
    checkSecret(req.params.secret, function (isValid) {
        if (isValid) {
            req.url = "/announce";
            server.onHttpRequest(req, res);
        } else {
            res.send(200, EMPTY_ANNOUNCE_RESPONSE);
        }
    });
});

As I said: there would be a better way.

Regarding what/how to store the Swarm data: it depends on your use-case. You will need to keep peer_id in addition to host/port for non-compact tracker responses. (Though you could probably make them up and clients will still connect to the peers.)

from bittorrent-tracker.

feross avatar feross commented on May 14, 2024

expose interfaces that let us do our own req.url checks

That would also address this issue: #35

from bittorrent-tracker.

feross avatar feross commented on May 14, 2024

Answering @KamuelaFranco's email question here for posterity:

Does your tracker already monitor peer statistics? E.g. uploaded amounts, downloaded amounts, etc? If so, the only change would be through the Express implementation portion in your example.

The tracker doesn't track this kind of information for individual peers, but it passes it when it calls swarm.announce() on your custom Swarm backend, so you can track it there :)

from bittorrent-tracker.

astro avatar astro commented on May 14, 2024

PR #59 has been closed.

from bittorrent-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.