21 comments

  • 2color4 days ago
    This looks neat!<p>IPFS contributor here.<p>I had a look at your code and saw how you handle downloading from multiple gateways.<p>There&#x27;s a better way to this which also leverages direct P2P retrieval in browsers, which is now a thing with IPFS! [0] If you just want to fetch, checkout @helia&#x2F;verified-fetch[1] which gives you a Fetch like API that accepts CIDs. It handles all the content routing and retrieval p2p magic and can help reduce reliance on gateways.<p>You can also pass it gateways in case it can connect to providers directly (due to transports)<p>[0] <a href="https:&#x2F;&#x2F;blog.ipfs.tech&#x2F;2024-shipyard-improving-ipfs-on-the-web&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.ipfs.tech&#x2F;2024-shipyard-improving-ipfs-on-the-w...</a> [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ipfs&#x2F;helia-verified-fetch&#x2F;tree&#x2F;main&#x2F;packages&#x2F;verified-fetch">https:&#x2F;&#x2F;github.com&#x2F;ipfs&#x2F;helia-verified-fetch&#x2F;tree&#x2F;main&#x2F;packa...</a>
    • yoavm4 days ago
      Thanks! I really wanted to use verified-fetch, but it seemed like it doesn&#x27;t really support all types of CIDs? In my case, most of the files use blake2b-256, and the last time I checked verified-fetch didn&#x27;t like that :( Did something change?<p>Edit: I now realised we previously talked on the Discord channel, thank you for the help there!
      • 2color4 days ago
        With some extra config you can pass custom hashers.<p>Any reason you chose BLAKE2b-256?<p>BLAKE2&#x2F;3 are amazing hashing functions and have a lot of cool properties, but they really suck on the web in terms of performance. This came up literally yesterday <a href="https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;norman.life&#x2F;post&#x2F;3lbw2qltokc2i" rel="nofollow">https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;norman.life&#x2F;post&#x2F;3lbw2qltokc2i</a> and has been reported by multiple devs recently (who also shared excitement about BLAKE)
        • yoavm4 days ago
          The main reason I wanted to support it is that it happens to be what Library Genesis uses. I&#x27;ll have a look into passing these custom headers! Would definitely be more elegant than hitting all gateways together and hoping for the best.
    • 2color4 days ago
      Small correction:<p>You can also pass [@helia&#x2F;verified-fetch] gateways as a fallback for when it *cannot* connect to providers directly (due to transports).
  • evolve2k2 hours ago
    Hi I’m here looking for a different offering. I have a personal library of physical books that our small group wants to be able to lend out to others.<p>I want people to be able to see which books are available and reserve books that are out and get notifications when due back.<p>And preferable self host as a small site.<p>Anyone know a small open source physical library management tool like this?
  • aeyes4 days ago
    The Pear P2P framework might be worth a look if you want to get off of GitHub and turn it into a truly distributed system. If the index must be on GitHub then what good is it to have the files on IPFS?<p><a href="https:&#x2F;&#x2F;docs.pears.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.pears.com&#x2F;</a>
    • yoavm4 days ago
      Thanks, I shall have a look into that. Technically the index too can live on IPFS, but the real challenge was how to know which databases exist, and where. This is what I&#x27;m using the GitHub topics for - everyone can create a repo and assign a topic to it, and the GitHub free API lets you search for matching repos. In a way, what I&#x27;m looking is to be able to make a request and get a different result when a new database is up, and the immutable nature of IPFS for example isn&#x27;t great for that. GitHub stars and accounts also give some basic concept of content moderation. I should see what Pears offers in this space.<p>Generally, I see the distributed nature of TeaTime as an instrument for being resilient, and less so a goal by itself. My thinking is that the GitHub database repositories are &quot;resilient enough&quot;, especially if they can contain just a config.json file pointing to database files living elsewhere. But I&#x27;m not a lawyer and could be wrong.
      • boramalper4 days ago
        &gt; Technically the index too can live on IPFS<p>Besides, HTTP requests against indices should be fast enough for a decent user experience and IPFS (and&#x2F;or its gateways) aren’t great at that in my experience. I think using GitHub (or any other static hosting providers) was a good call in that regard.
  • mdaniel4 days ago
    &gt; (I&#x27;m looking into using Helia so that users are also contributing nodes in the network)<p>I had to look that term up &lt;<a href="https:&#x2F;&#x2F;github.com&#x2F;ipfs&#x2F;helia#readme">https:&#x2F;&#x2F;github.com&#x2F;ipfs&#x2F;helia#readme</a>&gt; but while sniffing around in their &lt;<a href="https:&#x2F;&#x2F;github.com&#x2F;ipfs&#x2F;helia&#x2F;wiki&#x2F;Projects-using-Helia">https:&#x2F;&#x2F;github.com&#x2F;ipfs&#x2F;helia&#x2F;wiki&#x2F;Projects-using-Helia</a>&gt; I was reminded of <a href="https:&#x2F;&#x2F;github.com&#x2F;orbitdb&#x2F;orbitdb#readme">https:&#x2F;&#x2F;github.com&#x2F;orbitdb&#x2F;orbitdb#readme</a> which seems like it may be much less rolling your own parts
    • yoavm4 days ago
      Thanks, I haven&#x27;t heard of it before. I wonder if it&#x27;s possible to use OrbitDB to download a file from IPFS though? Based on it&#x27;s CID, I mean, because that was my intention with Helia. I thought that one of the nice thing about reading books is that it takes time, and if users could be seeding their files from IndexedDB to the network, they could automatically and effortlessly become &quot;contributing citizens&quot;.<p>Another interesting use case would be to see if this can replace (or be an addition to) SQLite as the database in which the queries are ran.
      • zwnow4 days ago
        Seeding sounds like what&#x27;s done by torrenting too no? How do you prevent people from distributing content they do not own?
        • yoavm4 days ago
          Yes it is, and you&#x27;re absolutely right with raising this concern. I was planning to make seeding (if I get it working at all) an opt-in feature, firstly to prevent excessive data usage on mobile connections.
          • zwnow3 days ago
            I see, nice project nonetheless! Hope it gets where you want it :-)
  • boramalper4 days ago
    Also see: <i>Show HN: Fully-searchable Library Genesis on IPFS</i><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28585208">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28585208</a><p><a href="https:&#x2F;&#x2F;libgen-crypto.ipns.dweb.link&#x2F;" rel="nofollow">https:&#x2F;&#x2F;libgen-crypto.ipns.dweb.link&#x2F;</a>
  • viborcip5 days ago
    &quot;Everything is done in the browser - no users, no cookies, no tracking. LocalStorage and IndexedDB are used for saving your last readings, your position in each file.&quot;<p>I love this! Thanks for making this!
  • mushufasa4 days ago
    &gt; The databases used in TeaTime are GitHub repositories tagged with the teatime-database topic, which are published on GitHub Pages.<p>Couldn&#x27;t this be a security issue, for a bad actors to use this tag?
    • yoavm4 days ago
      That&#x27;s a fair point - I guess it could be abused. Databases are sorted by their number of GitHub stars, so I was hoping that with the power of the crowds it will be possible to minimize the bad effect such actor might have, by simply not voting them up.
      • mushufasa4 days ago
        there&#x27;s been several attacks recently where a bad actor takes over a repo where the original maintainer wants to take a step back, then launch a supply chain attack. in recent cases, the attack came from obfuscated binary files in the repo rather than code. given we are dealing with documents here (books) that would be easy to hide malicious code in a file. pdfs have all sorts of execution vulnerabilities for example
        • yoavm4 days ago
          Interesting - I&#x27;m kinda counting on PDF.js, which is used for PDF rendering, on doing it safely, but of course that doesn&#x27;t always have to be the case. Do you have any thoughts on how to make this safer?
          • mushufasa4 days ago
            some other method of collection where you can hav eknown trust of the files contributed, some method of &#x27;registering&#x27; a submission to create trust,
        • cicko4 days ago
          PDFs are not executables.
          • samatman4 days ago
            Other than the JavaScript, you mean.<p><a href="https:&#x2F;&#x2F;cloudmersive.com&#x2F;article&#x2F;Understanding-Embedded-JavaScript-in-PDF-Documents" rel="nofollow">https:&#x2F;&#x2F;cloudmersive.com&#x2F;article&#x2F;Understanding-Embedded-Java...</a>
          • taneq4 days ago
            You’d be surprised what’s executable with the right attitude.
          • crest4 days ago
            May I recommend the old 27C3 talk &quot;OMG WTF PDF&quot;?
          • macintux4 days ago
            [dead]
  • garganzol3 days ago
    It does not work for me. For example:<p>&gt; Access to fetch at &#x27;<a href="https:&#x2F;&#x2F;bafykbzacedvzdo4hru3wul5excjthwjuz5ggd6jcs4wg77tg7bkn3c7hlvohq.ipfs.dweb.link&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bafykbzacedvzdo4hru3wul5excjthwjuz5ggd6jcs4wg77tg7bk...</a>&#x27; (redirected from &#x27;<a href="https:&#x2F;&#x2F;w3s.link&#x2F;ipfs&#x2F;bafykbzacedvzdo4hru3wul5excjthwjuz5ggd6jcs4wg77tg7bkn3c7hlvohq" rel="nofollow">https:&#x2F;&#x2F;w3s.link&#x2F;ipfs&#x2F;bafykbzacedvzdo4hru3wul5excjthwjuz5ggd...</a>&#x27;) from origin &#x27;<a href="https:&#x2F;&#x2F;bjesus.github.io" rel="nofollow">https:&#x2F;&#x2F;bjesus.github.io</a>&#x27; has been blocked by CORS policy: No &#x27;Access-Control-Allow-Origin&#x27; header is present on the requested resource. If an opaque response serves your needs, set the request&#x27;s mode to &#x27;no-cors&#x27; to fetch the resource with CORS disabled.
    • yoavm3 days ago
      The CORS headers seem fine, though I&#x27;m a little surprised about the content-type:<p><pre><code> $ curl -I https:&#x2F;&#x2F;bafykbzacedvzdo4hru3wul5excjthwjuz5ggd6jcs4wg77tg7bkn3c7hlvohq.ipfs.dweb.link&#x2F; HTTP&#x2F;2 200 date: Thu, 28 Nov 2024 16:34:03 GMT content-type: application&#x2F;x-rar-compressed content-length: 192215114 access-control-allow-headers: Content-Type access-control-allow-headers: Range access-control-allow-headers: User-Agent access-control-allow-headers: X-Requested-With access-control-allow-methods: GET access-control-allow-methods: HEAD access-control-allow-methods: OPTIONS access-control-allow-origin: * </code></pre> Can you try with another file? I do think that once I implement Helia&#x27;s verified-fetch, issues like this should be less common.
  • slagfart4 days ago
    Sorry if I missed this, but is there an example instance we can play with?
    • yoavm4 days ago
      Yes, <a href="https:&#x2F;&#x2F;bjesus.github.io&#x2F;teatime&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bjesus.github.io&#x2F;teatime&#x2F;</a>
  • sram13374 days ago
    I don&#x27;t know what&#x27;s in the database, so I don&#x27;t know what to search for.<p>How about a browse feature?
    • yoavm4 days ago
      Ha, that&#x27;s a great point... I can probably work on a meta &quot;table of content&quot; for each database, shouldn&#x27;t be hard to do. But generally the database descriptions say what they have - public domain books, library genesis non-fiction, etc.
  • pizza4 days ago
    This is awesome. Would it be able to integrate Pocket bookmarks into this somehow? Would love to be able to keep a cache offline of all the things I wanted to read (esp if I can prevent link-rot), and to be able to query them.
    • yoavm4 days ago
      I need to check about Pocket - do you have any relevant documentation? Note however that TeaTime does keep an offline cache, both a list of your recent books and the files themselves, but it does it using LocalStorage and IndexedDB because I really wanted to prevent the need for having user logins. Maybe I can add an option to download a &quot;state dump&quot; kind of thing, so that you can a file with your history and can always import it. I too always feel that LocalStorage could be a little flaky, in the sense that you don&#x27;t always realize that switching a browser would mean losing all your data.
  • nyolfen4 days ago
    beautiful! i made a much crappier version of the same kind of thing a year or two ago with a manually converted libgen db from annas-archive&#x27;s index, but the best i could come up with was webtorrenting a sqlite db of hashes and importing it into indexeddb then distributing the static fontend bundle as an urbit app; it was much uglier than this
    • yoavm4 days ago
      Thank you! I&#x27;ve seen quite a lot of similar projects as I was working on this, and they all served as much inspiration and also a proof that this can in fact be done.<p>Also, thanks to whoever came up with thebookbay.org instance :)
  • clueless4 days ago
    Is this like an open source distributed libgen?
    • yoavm4 days ago
      Libgen is one of the databases that are currently available (and was probably a good fit because they already had their files on IPFS), but I think that this architecture, in which the UI is decoupled from the database, the database doesn&#x27;t hold any copyrighted materials, and the files are downloaded from IPFS, is quite resilient and could be used for serving all sorts of content.
  • westurner4 days ago
    Do static sites built with sphinx-build or <i>jupyter-book</i> or hugo or other jamstack static site generators work with TeaTime?<p>sphinx-build: <a href="https:&#x2F;&#x2F;www.sphinx-doc.org&#x2F;en&#x2F;master&#x2F;man&#x2F;sphinx-build.html" rel="nofollow">https:&#x2F;&#x2F;www.sphinx-doc.org&#x2F;en&#x2F;master&#x2F;man&#x2F;sphinx-build.html</a><p>There may need to be a different Builder or an extension of sphinxcontrib.serializinghtml.JSONHTMLBuilder which serializes a doctree (basically a DOM document object model) to the output representation: <a href="https:&#x2F;&#x2F;www.sphinx-doc.org&#x2F;en&#x2F;master&#x2F;usage&#x2F;builders&#x2F;#sphinxcontrib.serializinghtml.JSONHTMLBuilder" rel="nofollow">https:&#x2F;&#x2F;www.sphinx-doc.org&#x2F;en&#x2F;master&#x2F;usage&#x2F;builders&#x2F;#sphinxc...</a><p>datasette and datasette-lite can load CSV, JSON, Parquet, and SQLite databases; supports Full-Text Search; and supports search Faceting. datasette-lite is a WASM build of datasette with the pyodide python distribution.<p>datasette-lite &gt; Loading SQLite databases: <a href="https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;datasette-lite#loading-sqlite-databases">https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;datasette-lite#loading-sqlite-data...</a><p>jupyter-lite is a WASM build of jupyter which also supports sqlite in notebooks in the browser with `import sqlite3` with the python kernel and also with a sqlite kernel: <a href="https:&#x2F;&#x2F;jupyter.org&#x2F;try-jupyter&#x2F;lab&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jupyter.org&#x2F;try-jupyter&#x2F;lab&#x2F;</a><p>jupyterlite&#x2F;xeus-sqlite-kernel: <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyterlite&#x2F;xeus-sqlite-kernel">https:&#x2F;&#x2F;github.com&#x2F;jupyterlite&#x2F;xeus-sqlite-kernel</a><p>(edit)<p>xeus-sqlite-kernel &gt; &quot;Loading SQLite databases from a remote URL&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyterlite&#x2F;xeus-sqlite-kernel&#x2F;issues&#x2F;6#issuecomment-1031751580">https:&#x2F;&#x2F;github.com&#x2F;jupyterlite&#x2F;xeus-sqlite-kernel&#x2F;issues&#x2F;6#i...</a><p>%FETCH &lt;url&gt; &lt;filename&gt; <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyter-xeus&#x2F;xeus-sqlite&#x2F;blob&#x2F;ce5a598bdab29eb6aab78a78d0caee93c292ec74&#x2F;src&#x2F;xeus_sqlite_interpreter.cpp#L191">https:&#x2F;&#x2F;github.com&#x2F;jupyter-xeus&#x2F;xeus-sqlite&#x2F;blob&#x2F;ce5a598bdab...</a><p>xlite.cpp &gt; void fetch(const std::string url, const std::string filename) <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyter-xeus&#x2F;xeus-sqlite&#x2F;blob&#x2F;main&#x2F;src&#x2F;xlite.cpp#L38">https:&#x2F;&#x2F;github.com&#x2F;jupyter-xeus&#x2F;xeus-sqlite&#x2F;blob&#x2F;main&#x2F;src&#x2F;xl...</a>
    • yoavm4 days ago
      &gt; Do static sites built with sphinx-build or jupyter-book or hugo or other jamstack static site generators work with TeaTime?<p>I guess it depends on what you mean by &quot;work with TeaTime&quot;. TeaTime itself is a static site, generated using Nuxt. Nothing that it does cannot be achieved with another stack - at the end it&#x27;s just HTML, CSS and JS. I haven&#x27;t tried sphinx-build or jupyter-book, but there isn&#x27;t a technical reason why Hugo wouldn&#x27;t be able to build a TeaTime like website, using the same databases.<p>&gt; datasette-lite &gt; Loading SQLite databases: <a href="https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;datasette-lite#loading-sqlite-data">https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;datasette-lite#loading-sqlite-data</a>...<p>I haven&#x27;t seen datasette before. What are the biggest benefits you think it has over sql.js-httpvfs (which I&#x27;m using now)? Is it about the ability to also use other formats, in addition to SQLite? I got the impression that sql.js-httpvfs was a bit more of a POC, and later some possibly better solutions came out, but I haven&#x27;t really went that rabbit hole to figure out which one would be best.<p>Edit: looking a little more into datasette-lite, it seems like one of the nice benefits of sql.js-httpvfs is that it doesn&#x27;t download the whole SQLite database in order to query it. This makes it possible have a 2GB database but still read it in chunks, skipping around efficiently until you find your data.
      • westurner4 days ago
        So the IPFS part is instead of a CDN? Does it replace asset URLs in templates with e.g. cf IPFS gateway URLs with SRI hashes?<p>datasette-lite &gt; &quot;Could this use the SQLite range header trick?&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;datasette-lite&#x2F;issues&#x2F;28">https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;datasette-lite&#x2F;issues&#x2F;28</a><p>From xeus-sqlite-kernel &gt; &quot;Loading SQLite databases from a remote URL&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyterlite&#x2F;xeus-sqlite-kernel&#x2F;issues&#x2F;6#issuecomment-1031751580">https:&#x2F;&#x2F;github.com&#x2F;jupyterlite&#x2F;xeus-sqlite-kernel&#x2F;issues&#x2F;6#i...</a> re: &quot;Loading partial SQLite databases over HTTP&quot;:<p>&gt; <i>sql.js-httpvfs: <a href="https:&#x2F;&#x2F;github.com&#x2F;phiresky&#x2F;sql.js-httpvfs">https:&#x2F;&#x2F;github.com&#x2F;phiresky&#x2F;sql.js-httpvfs</a></i><p>&gt; <i>sqlite-wasm-http: <a href="https:&#x2F;&#x2F;github.com&#x2F;mmomtchev&#x2F;sqlite-wasm-http">https:&#x2F;&#x2F;github.com&#x2F;mmomtchev&#x2F;sqlite-wasm-http</a></i><p>&gt;&gt; <i>This project is inspired from @phiresky&#x2F;sql.js-httpvfs but uses the new official SQLite WASM distribution.</i><p>Datasette creates a JSON API from a SQLite database, has an optional SQL query editor with canned queries, multi DB query support, docs; <a href="https:&#x2F;&#x2F;docs.datasette.io&#x2F;en&#x2F;stable&#x2F;sql_queries.html#cross-database-queries" rel="nofollow">https:&#x2F;&#x2F;docs.datasette.io&#x2F;en&#x2F;stable&#x2F;sql_queries.html#cross-d...</a> :<p>&gt; <i>SQLite has the ability to run queries that join across multiple databases. Up to ten databases can be attached to a single SQLite connection and queried together.</i>
        • yoavm4 days ago
          The IPFS part is where the actual files are downloaded from. I wouldn&#x27;t necessarily say that it&#x27;s instead of a CDN - it just seems to be a reliable enough way of getting the files (without the pain of setting up a server with all these files myself). Indeed, it fetches them through IPFS Gateways (the Cloudflare IPFS Gateway is unfortunately no longer a thing) using their CID hash.
  • lakomen4 days ago
    I absolutely don&#x27;t understand this.<p>Doesn&#x27;t ipfs require a server running? Where is the server code?
    • 2color4 days ago
      It does require an IPFS node, i.e. server to provide tha data. The point is more that data isn&#x27;t tied to any specific server. By content addressing with CIDs you can fetch from multiple IPFS nodes and even become a &quot;provider&quot; for a CID once your IPFS node downloads a copy.
      • lakomen1 day ago
        Yes, I&#x27;m aware how ipfs works, but that doesn&#x27;t really answer the question :)
    • yoavm4 days ago
      I&#x27;m currently using public IPFS Gateways to fetch the files from IPFS.
  • user_james924 days ago
    IPFS needs server running or am I wrong?
    • yoavm4 days ago
      For fetching files from IPFS, you can use a public IPFS Gateway, and the Gateway is essentially your server. That&#x27;s what TeaTime is doing.
  • noamikotamir5 days ago
    super cool
  • rausr4 days ago
    I&#x27;m slightly disappointed that this is not the Tea-Time that formed the comms&#x2F;sync protocol used in the Croquet VR system (on Squeak Smalltalk) some years back. :)
  • evantbyrne4 days ago
    Any particular reason for choosing IPFS instead of bittorrent or other p2p protocols? It feels like every time I try an IPFS tool it just crashes, whereas I rarely have issues with torrents.
    • 2color4 days ago
      IPFS contributor here.<p>IPFS certainly has its flaws, but it&#x27;s been getting much better in the last year. If you want to do P2P retrieval in browsers, it&#x27;s practically the most advanced from all protocols.<p>We just published an update on this topic <a href="https:&#x2F;&#x2F;blog.ipfs.tech&#x2F;2024-shipyard-improving-ipfs-on-the-web&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.ipfs.tech&#x2F;2024-shipyard-improving-ipfs-on-the-w...</a>
      • boramalper4 days ago
        &gt; If you want to do P2P retrieval in browsers<p>My understanding is that IPFS always requires an IPFS → HTTP gateway to work in browsers, so I wonder what you mean by &quot;P2P retrival in browsers&quot;.<p><i>Verified Fetch</i> is about verifying content retrieved from gateways on client-side but the retrival is still very much client-server (vs P2P) today, and <i>Service Worker Gateway</i> seems to be relying on gateways too (&lt;trustless-gateway.link&gt; in the demo linked).<p>Based on <i>IPFS &amp; HTTP: The Blueprint for Radical Interoperability - Lidel</i> [0], I believe the situation is acknowledged by IPFS devs too. In my unsolicited opinion, using a custom protocol (libp2p transports?) for a project targetting web browsers was a mistake, so I&#x27;m glad to see that HTTP is being considered now.<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=4GwxrQ9Z3Bk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=4GwxrQ9Z3Bk</a>
        • 2color4 days ago
          &gt; My understanding is that IPFS always requires an IPFS → HTTP gateway to work in browsers, so I wonder what you mean by &quot;P2P retrival in browsers&quot;.<p>By P2P retrieval, I mean retrieval directly from a peer that has the data without additional hops.<p>Historically HTTP gateways were the only way, because you couldn&#x27;t dial (most) peers directly from a browser unless they had a CA-signed TLS certificate (needed in secure contexts.)<p>A couple of things changed that:<p>- WebTransport and WebRTC-direct allow browser-server(peer) communication without a CA signed certificate. WebTransport is very new and still has some problems in browser implementations.<p>- We just launched AutoTLS which help public IPFS node get a wildcard let&#x27;s encrypt TLS certificate, making it &quot;dialable&quot; from browsers<p>With these, it becomes a whole lot easier to establish connections from browsers to IPFS nodes. But it takes time for the network to upgrade.<p>Note that Libp2p transports are wrappers over network transports to allow interoperability across runtimes, e.g. TCP, QUIC, WebSockets, WebTransport. These are not custom protocols.<p>Now you point about custom protocols, by which I presume you are referring to data exchange&#x2F;retrieval protocols.<p>There are two IPFS data transfer protocols: - Bitswap: the first and default data transfer protocol which requires a streaming network transport (so HTTP isn&#x27;t ideal). - HTTP Gateways: Initially, HTTP gateways were servers that would handle retrieval (over Bitswap) for you if they didn&#x27;t have the data locally (sometimes we refer to these as Recursive Gateways, like trustless-gateway.link and ipfs.io). For all the reasons in Lidel&#x27;s talk (caching, interop, composability), we extended this notion and made HTTP Gateway a general interface for data retrieval.<p>Today, there are large providers in the network (pinning services) that expose their data with an HTTP Gateway, which allows browsers to retrieve from directly.<p>We still have more work to do to expose the gateway in Kubo with the new AutoTLS certificate, but for the time being, Bitswap should work well enough even in browsers over a WebSockets connection. ---<p>Verified Fetch&#x27;s aims to ensure you get data is it&#x27;s available. If it fails to find a direct provider of the data, it will fall back on a recursive gateway like trustless-gateway.link which is configured in the defaults. As more IPFS nodes upgrade to newer versions, reliance on such centralised recursive gateways will become unnecessary.<p>TL;DR: We&#x27;re all in on HTTP. The real constraint to P2P is browser vendors and slow standard bodies.
    • yoavm4 days ago
      Yeah - the desire to have TeaTime run as a normal website. BitTorrent doesn&#x27;t run over HTTP, unless you use WebTorrent, which most BitTorrent clients aren&#x27;t 100% compatible with. This means you can basically only download from other WebTorrent nodes - and there aren&#x27;t many.<p>I do think this might change with the introduction of things like the Direct Sockets API, but for now they are too restricted and not widely supported.<p>It&#x27;s my first time working with IPFS and I agree it hasn&#x27;t always been 100% reliable, but I do hope that if I manage to get TeaTime users to also be contributing nodes, this might actually improve the reliability of the whole network. Once it&#x27;s possible to use BitTorrent in the browser, I do think it would be a great addition (<a href="https:&#x2F;&#x2F;github.com&#x2F;bjesus&#x2F;teatime&#x2F;issues&#x2F;3">https:&#x2F;&#x2F;github.com&#x2F;bjesus&#x2F;teatime&#x2F;issues&#x2F;3</a>).