Git Product home page Git Product logo

Comments (23)

PlasmaPower avatar PlasmaPower commented on May 12, 2024

Metadata collection is done through curl, which does not support i2p as far as I can tell.

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

However, only http and https metadata collection is done through curl. If I2P support was implemented for other types of torrents, would that work for you?

from btfs.

TheNain38 avatar TheNain38 commented on May 12, 2024

It would be for I2P torrents only, not for normal torrents

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

Sorry, I'm not quite sure how an I2P torrent is different than a normal one - is there a different format? I had assumed it was just a proxy type.

from btfs.

TheNain38 avatar TheNain38 commented on May 12, 2024

Yes it is just a proxy type, but I don't know how metadata collection can be done... Maybe @str4d could help here to give some details ^^ (He is an I2P developer)

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

Is it possible I2P torrents are already supported? Looking in libtorrent, there's already some code to check if a torrent is an I2P torrent, and code to deal with I2P torrents. Is there a difference between an I2P torrent and an I2P proxy?

from btfs.

TheNain38 avatar TheNain38 commented on May 12, 2024

In libtorrent-rasterbar it is just a type of proxy. Also, when saying I2P proxy, in fact it is the address of the SAM TCP bridge which communicates with the I2P router. What I said is that I don't know how metadata collection could be done using curl...

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

Does an I2P torrent start with http:, https:, magnet:, something else, or is it a file?

from btfs.

TheNain38 avatar TheNain38 commented on May 12, 2024

It is like normal torrents, it just uses I2P trackers and also I2P peers, but it should use I2P to get the file if an url is specified

from btfs.

str4d avatar str4d commented on May 12, 2024

@PlasmaPower an I2P torrent is a regular torrent running over the I2P network. In fact, if there are bridging nodes (torrent peers connected both to clearnet and I2P swarms) then a clearnet magnet link or torrent file can often be opened up with an I2P torrent client. See the documentation for further details, although most of that should be abstracted behind libtorrent. And yes, when the libtorrent documentation refers to "I2P proxy" it really means "I2P SAM API", because that is the API that libtorrent is using to make I2P connections via the user's I2P router.

If you separately wanted to connect to trackers outside of libtorrent, then you could use the I2P HTTP proxy (which by default is 127.0.0.1:4444, though a config option should be provided to change it, as with the SAM API).

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

I think I2P support should be in the latest version of my proxy support PR. Could someone check if it works?

from btfs.

donat-b avatar donat-b commented on May 12, 2024

@PlasmaPower
Tested this command with i2pd and it didn't work.
btfs --i2p-http-proxy=http://127.0.0.1:4446 --proxy-type=i2p

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

@donat-b If you pass -f to btfs, does it output any errors/warnings? Also, I should be able to troubleshoot it myself in ~5 hours when I'm not on a network that probably blocks i2p.

Edit: Oh, also, you might need a proxy hostname+port (specified with --proxy), from the libtorrent documentation:

The only used fields in the proxy settings structs are hostname and port.

from btfs.

donat-b avatar donat-b commented on May 12, 2024

@PlasmaPower no errors or anything suspicious. It's just not receiving anything, I guess.

from btfs.

str4d avatar str4d commented on May 12, 2024

@donat-b with the config options in that PR, I believe you need to run:

btfs --proxy=127.0.0.1:7656 --proxy-type=i2p --i2p-http-proxy=127.0.0.1:4446

ie. SAM port must be specified, and I don't believe the http:// is necessary (but I could be wrong on that).

@PlasmaPower 127.0.0.1:7656 is the default SAM API port, which you could use for --proxy by default if --proxy-type=i2p (but of course listen to --proxy if set).

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

@str4d I'll look into implementing a default, but yeah, that's what I edited into my post. Also, yes the http:// is optional.

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

I've added a default for i2p proxies.

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

I've gotten i2pd setup, and metadata collection through i2p is now working. However, it seems to stall whenever you try to cat a "file". I'll look into this more tomorrow.

from btfs.

TheNain38 avatar TheNain38 commented on May 12, 2024

In your setup you should make sure you enabled SAM, because by default it isn't

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

I enabled SAM and ensured that the port was open, but still nothing when I try to cat a file. Any ideas for how to investigate? The log.txt just has Azureus5.7.0.0.jar added, and there's nothing from the console when running with -f. Looking at it with -d, it would appear that the read calls are locking up as expected.

from btfs.

PlasmaPower avatar PlasmaPower commented on May 12, 2024

Oh, also, it's really annoying because the cat process gets locked up in the D state, so it's a bit of a pain to clean up.

from btfs.

donat-b avatar donat-b commented on May 12, 2024

@PlasmaPower that's exactly the result I have.

from btfs.

str4d avatar str4d commented on May 12, 2024

Just FYI, I2P has launched a development program aimed at helping developers integrate I2P into their apps. If you'd like some help with this in July during our Apps month, let me know! We are currently in APIs month, and have a contributor looking at updating/improving libtorrent's I2P support.

from btfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.