Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHT only used for get_peers #109

Closed
NielsZeilemaker opened this issue Apr 23, 2013 · 16 comments
Closed

DHT only used for get_peers #109

NielsZeilemaker opened this issue Apr 23, 2013 · 16 comments
Assignees

Comments

@NielsZeilemaker
Copy link

If we can expose the DHT of LibTorrent we can remove our DHT implementation. Only a get_peers method is required.

After, we can redirect the miniswarm get_peers request and the DHT libswift node to use the libtorrent DHT instead.

@whirm
Copy link

whirm commented Apr 23, 2013

Ill try to get an answer from the libtorrent developers if such patch would be accepted.

@egbertbouman
Copy link
Member

We now require that we can manually do a DHT announce for hidden services, so we can't remove pymdht yet.

@egbertbouman egbertbouman added this to the V9.0: Shadow Internet milestone Nov 3, 2014
@whirm whirm removed their assignment Jan 26, 2015
@LipuFei
Copy link

LipuFei commented Feb 23, 2015

@NielsZeilemaker @egbertbouman @whirm @synctext I guess this one can be closed.

@NielsZeilemaker
Copy link
Author

Why? Is the pymdht already removed?

@LipuFei
Copy link

LipuFei commented Feb 24, 2015

@NielsZeilemaker Not yet.

@whirm
Copy link

whirm commented Feb 29, 2016

@devos50 do you want to take care of this guy?

@ardhipoetra
Copy link

Libtorrent has get_peer_info for every valid torrent handle. What's the different between this function and the one in pymdht?

@synctext
Copy link
Member

@ardhipoetra Interesting API handle: http://www.rasterbar.com/products/libtorrent/manual.html#torrent-handle

Looks somewhat similar! pymDHT only returns non-validated IP addresses, Libtorrent tries a handshake with them.
Please try if you can download a .torrent file and access the peer info with this Libtorrent API. It initiates uTP handshakes then, so it really measures the swarm size. These calls might not be exposed in the Python wrapper.

@ardhipoetra
Copy link

@synctext yes, we can get list of peers using that function. And it's available on python binding.

Test code can be found in This gist

Tested with this and it was okay.

@whirm
Copy link

whirm commented Mar 29, 2016

should we move this to an early milestone?

@ardhipoetra
Copy link

An update:

in version 1.1.0.0 (the most recent one), there are new function called dht_get_peers providing a swarm's infohash. This can be done without joining the actual swarm. We have to monitor alert to get the peer list.

The bad news is, python binding implementation is not perfect, if I may say. The discussion in arvidn/libtorrent#602 still ongoing till now.

@whirm
Copy link

whirm commented Apr 11, 2016

nice, let us know when it gets into a usable state!

@synctext synctext modified the milestones: V9.0: Shadow Internet, V7.1 Dec 29, 2017
@synctext
Copy link
Member

update needed op dht_get_peers status in libtorrent and Python wrapper. Few years past since issue was created.

@devos50
Copy link
Contributor

devos50 commented Dec 29, 2017

It seems that the get_peers method is exposed in libtorrent 1.1 but as @egbertbouman's comment says, we still require a manual DHT announce. I'm not sure whether that's possible yet.

@aldenml
Copy link

aldenml commented Mar 4, 2018

@devos50 I think session_handle:: dht_announce is what you are looking for

@devos50
Copy link
Contributor

devos50 commented Mar 6, 2019

I guess this issue has been sufficiently addressed.

@devos50 devos50 closed this as completed Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants