Comments (7)
Alternatively, letting the user override Server.prototype._getSwarm()
will allow custom peer database backends. I wouldn't want to keep all that data in v8 when running a huge tracker.
from bittorrent-tracker.
I see, so we could support filter by treating a null
return value from _getSwarm
as an indication that the torrent should not be tracked. That should work for @pwmckenna's use case.
@astro One other thing to figure out: how will you determine when the properties of the returned swarm
object (swarm.complete
, swarm.incomplete
, swarm.peers
) is changed? You need to know when values change in order to update the custom storage backend.
from bittorrent-tracker.
While filtering could piggyback on the storage adapter solution, they feel like very different issues. I'd find an explicit solution more intuitive than one where I have to override a method and return a value that is understood to mean "I'm intentionally not supporting this swarm because its hash doesn't match a whitelist". Certainly not tied to the api I suggested, but I'd prefer to not override something to return null to achieve whitelisting.
from bittorrent-tracker.
with regards to the storage adapter...i took a quick look and realized that everything in there assumes synchronous gets/sets. to convert everything to async, do you have a preference of supporting lib (async/q/etc...), or just straight callbacks all the way through?
from bittorrent-tracker.
@pwmckenna, fair enough. I would accept a PR that added a filter
option, as demonstrated in your initial code example.
If we need flow control, I prefer using run-parallel
, run-series
, run-auto
, etc. which are just extracted out of async
.
from bittorrent-tracker.
@pwmckenna Astro's getSwarm
changes are in, so it would be pretty easy to send a PR to add filtering now.
from bittorrent-tracker.
Implemented in #57 and released as 3.0.0.
from bittorrent-tracker.
Related Issues (20)
- 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
- ipv6 udp tracker outgoing error peers HOT 4
- When the port number is lower than -1 or exceeds 65536, it will cause the program to crash HOT 5
- An error appears on startup: No "exports" main defined HOT 1
- Tracker does not launch 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.