I have a small network that I want to serve with a Bittorent tracker. It's important, though, that information shared in this network doesn't accidentally spill out with Distributed Hash Tables, allowing unknown peers to accumulate. I have at my disposal all the regular features of a tracker, but I don't know of a way to enforce the clients connecting to disable certain controls (namely,开发者_如何学Python DHT) and expose others in the swarm to outside connections.
Does a control like that exist in the protocol specification? If not, what would be involved in implementing it?
If you can't trust the client, then you can't trust the client!
That said, if you can trust the clients to a certain extent, then there is a feature that does what you want. From the wikipedia article:
After the DHT was adopted, a "private" flag — analogous to the broadcast flag — was unofficially introduced, telling clients to restrict the use of decentralized tracking regardless of the user's desires. The flag is intentionally placed in the info section of the torrent so that it cannot be disabled or removed without changing the identity of the torrent. The purpose of the flag is to prevent torrents from being shared with clients that do not have access to the tracker. The flag was requested for inclusion in the official specification in August, 2008, but has not been accepted. Clients that have ignored the private flag were banned by many trackers, discouraging the practice.
If you are willing to trust the clients to honor the "private" flag, then all you need to do is set that flag.
精彩评论