Open yanmaani opened 3 years ago
I agree. Libtorrent V2 is making using BitTorrent in ZeroNet quite interesting.
ZeroNet Torrent plugin is a PoC toward that direction : https://github.com/rllola/zeronet-torrent-plugin
BitTorrent doesn't play well with Tor. It will take some effort.
From my understanding, it should be fine. BitTorrent over Tor is bad because[1]:
In our case, this is...
force_proxy
setting (now a no-op).proxy_tracker_connections
, which is the default nowproxy_peer_connections
, which is the default nowsocks5_pw
)In summary, I think it's good enough, but we should probably do some light validation that libtorrent does what it says on the tin. This shouldn't be hard.
BTW, is there a python DHT library we can use for ZeroNet?
It should be properly isolated from the transport implementation details and should be compatible with gevent.
For what purpose if I may ask? Usually, DHTs are quite slow and unreliable, and there can be better solutions.
But if you have some reason, maybe you could try and combine asyncio-gevent and kademlia?
I think ZeroNet should transition over to using BitTorrent directly instead of trying to imitate it.
BitTorrent is a much more robust and well-developed protocol. I mean no disrespect to ZeroNet, but projects like libtorrent have very large budgets devoted to them, probably greater than all of ZeroNet, and it's just for transferring data and nothing else. BitTorrent can also handle larger files, as well as other things.
BitTorrent is an open standard. If ZeroNet started to use it, it'd be possible to interact with other BitTorrent-based projects. This is useful. For example, you could embed videos from BitTorrent directly into zites, and people could download zites in their BitTorrent clients.
If ZeroNet started using BitTorrent for new sites, it could focus on the core functionality, like building decentralized interactive websites, like using Tor instead of trying to re-invent the wheel. With that, making new implementations would also become much easier, because you could use a ready-made BitTorrent library instead of having to re-write the entire file sharing module.
Two semi-recent developments on BitTorrent have made this situation more interesting, and cleared away the last blockers:
BEP 50 is a good example of this: ZeroNet handles updates (correct me if I'm wrong here) by naively gossiping them, whereas BEP 50 has a very clever structure for making sure updates are propagated in an efficient manner, basically creating an overlay network. Using BitTorrent allows ZeroNet to make use of all of these improvements, while still giving it the freedom to create extensions as needed. If useful, these extensions could be made into a BEP and pawned off onto upstream maintainers.
To be clear here, I'm not proposing that anything be explosively decommissioned, like Tor or Python v2. There's no urgent security flaw that mandates it.