c++torrentlibtorrent

Is it possible to disable p2p and only use HTTPSeed in libtorrent


I'm doing some research for a project and was wondering if it's possible to disable p2p using the libtorrent C++ library. When I say disable I mean make it so the client will only download from the HTTPSeeds, basically, I'm hoping to make a checkbox for use p2p to speed up downloads, so if people choose to turn it off, it will just disable the p2p part of libtorrent but leaves it using the HTTP seed.

However, in searching, I can't seem to find any information about it or even others asking. if it's not possible is there an alternative (i don't want recommendations just if there is a known alternative that it's possible to do this with, just the name of the library)


Solution

  • You could set enable_outgoing_utp, enable_incoming_utp, enable_outgoing_tcp and enable_incoming_tcp settings all to false.

    Documentation here.