Comments (8)
Private torrents is a bit in the .torrent files, to be respected by clients. Please see the BEP.
from bittorrent-tracker.
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.
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.
Can you give me an example of your current workaround? Would you keep these announce ID's in a database?
from bittorrent-tracker.
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.
expose interfaces that let us do our own req.url checks
That would also address this issue: #35
from bittorrent-tracker.
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.
PR #59 has been closed.
from bittorrent-tracker.
Related Issues (20)
- Brave Webtorrent buiild broken after [email protected] HOT 1
- Fix documentation for server implementation
- Make HTTPTracker available in browser? HOT 2
- Socks5 error: Socks.createConnection is not a function HOT 1
- Tracker fails to work when pushed to a VPS HOT 1
- /stats additionals HOT 3
- 请问支持win10吗? HOT 2
- Typescript Support HOT 1
- HTTP tracker server still runs when the option of Server constructor "http" is set to be false HOT 1
- ERR_PACKAGE_PATH_NOT_EXPORTED on require HOT 2
- EPERM Issue on install
- `peer_id` from announce query string interpreted as latin1 then converted to UTF-8 before being returned as a transformed and wrong value in the peer list. HOT 5
- BEP for WebTorrent HOT 3
- Can you guys provide a binary excuteable by using javascript pkg framework to the release page? HOT 4
- d14:failure reason17:invalid info_hashe HOT 1
- Bittorrent v2 support HOT 13
- npm versions > 10.0.8 will not run due to bug in simple-peer lite HOT 1
- Upload / download count for each peerID HOT 1
- socksProxy Socks.Agent is not a constructor HOT 1
- SSRF Error and UDP not HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bittorrent-tracker.