drxzcl / lightdht Goto Github PK
View Code? Open in Web Editor NEWA lightweight python implementation of the bittorrent DHT
A lightweight python implementation of the bittorrent DHT
In some conditions encodeNodes(nodes) would get called with Node-objects and tuples, resulting in an error.
I forked your repo and implemented a fix. You might want to change all the tabs back to spaces before pushing my fix to your repo (if you want to use it), the diff will not have any usable output otherwise.
There's some more info in my comment here:
laino@622d66e#commitcomment-1903113
I also want to use this comment to tell you how much I appreciate your work because you probably saved me weeks of writing this myself:
Thank You.
Hey, thanks for LightDHT! I was looking for a pure-python Mainline implementation for a project I'm working on, and I've been using LightDHT as the DHT backend during development.
The final project is to be AGPL'd, so I'd love to know what the license is for LightDHT: Do I need to rewrite a new lib from the ground up, or is this OSI/GPL compatible?
PS: My version of LightDHT is by now very different from the clone I made of your repo, if I were being more careful I'd have made more atomic commits and suggested some pulls. :( Suffice to say I did find a few bugs.. the chief one being that if peers are removed from a PrefixRoutingTable bucket and leave it empty, then this can lead to failures later when the empty bucket is used to seek peers and turns up empty. A quick patch to check if the bucket's empty when deleting peers fixes this.
$ python lightdht.py
KRPC request to ('67.215.242.139', 6881)
Traceback (most recent call last):
File "lightdht.py", line 312, in <module>
with dht1:
File "lightdht.py", line 135, in __enter__
self.start()
File "lightdht.py", line 123, in start
DEFAULT_ID = self._server.ping(os.urandom(20), DEFAULT_NODE)['id']
File "/tmp/lightdht/krpcserver.py", line 198, in ping
return self._synctrans(q, node)
File "/tmp/lightdht/krpcserver.py", line 183, in _synctrans
raise KRPCTimeout
krpcserver.KRPCTimeout
How do I actually run it? Should I open any ports other than 54767/tcp and 54767/udp?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.