Commit Graph

13503 Commits

Author SHA1 Message Date
Gus Eggert
310dca55dd feat: add fx options plugin
This adds a plugin interface that lets the plugin modify the fx
options that are passed to fx when the app is initialized. This means
plugins can inject their own implementations of IPFS interfaces. This
enables granular customization of go-ipfs behavior by plugins, such
as:

- Bitswap with custom filters (e.g. for CID blocking) Custom interface

- implementations such as Pinner or DAGService

- Dynamic configuration of libp2p ...

One downside of this is that we're exposing the entire dependency
graph, init hooks, initialization, etc. to users, so this comes with a
caveat that we reserve the right to make breaking changes to the graph
structure and initialization logic (although this historically happens
rarely). If these things are changed, we should mention them in
release notes and changelogs though, since they could impact users of
this plugin interface.

I'm not particularly fond of DI frameworks (and neither are some of
the folks work on/near go-ipfs), but it seems unlikely that somebody
will rewrite the dependency wiring and lifecycle hooks of go-ipfs, and
add dynamic extension points, so this seems like a palatable
compromise.

There are also problems that we should clean up in how model the
go-ipfs app in fx, such as:

- We make extensive use of nested fx.Options, which fx itself
discourages because it "limits the user's ability to customize their
application". It should be easy to flatten these out into a single
[]fx.Option slice.

- We pass around a list of opaque libp2p opts, which makes it hard to
customize after-the-fact...we should consider naming each of these
opts and providing them to fx as proper dependencies, so that they can
be explicitly overridden.

- We call fx.Invoke() in some places with anonymous functions. We
should instead only pass exported functions to fx.Invoke(), so that
they have exported names, which would make it easier to remove/augment
the invocations that happen when the app is initialized.

These aren't blocking issues, they just make it harder and more
brittle to customize go-ipfs with this plugin.
2022-08-12 17:04:29 -04:00
Claudia Richoux
2fb7437e2a feat: add blake3 support
Support hashes from 20 <= x <= 128 bytes, but does not yet have any option to generate anything else than 32 bytes hashes.

This will be forward compatible when we add such option.
2022-08-12 16:45:42 +00:00
Brendan O'Brien
8fd49badc2
Add reference to Experimental config doc (#9181)
* Add reference to Experimental config doc

this clarifies that `Experimental` is in fact a top level configuration key, and links to the most current documentation

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-08-11 10:15:08 -07:00
Mark Gaiser
d419c0e95b
feat: add $IPFS_PATH/gateway file
The file contains the gateway your node is hosting in the http://<host>:<port> RFC 3986 format.
Structurally it works exactly the same as the API file.
2022-08-08 13:50:26 +02:00
Seungbae Yu
cb280cbf16
docs: replace docs.ipfs.io with docs.ipfs.tech (#9158)
* docs: fix redirecting URL in README.md
* all: replace `docs.ipfs.io` with `docs.ipfs.tech`
* apply suggestions from code review

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-08-05 19:01:10 +03:00
lostystyg
f9db823138
chore: fix markdown link syntax typo for AutoNAT.ServiceMode 2022-08-03 15:17:28 +02:00
Jorropo
7ec0c245a4 chore: bump go-blockservice to only do put onces
Fixes: #7956
2022-07-28 14:41:46 +00:00
link2xt
846d362581
docs: update Arch Linux installation instructions
Package is named `kubo`, not `go-ipfs` now.
2022-07-25 20:43:56 +02:00
dependabot[bot]
a3bdea4ed4 build(deps): bump go.uber.org/dig from 1.14.0 to 1.14.1
Bumps [go.uber.org/dig](https://github.com/uber-go/dig) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/uber-go/dig/releases)
- [Changelog](https://github.com/uber-go/dig/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/dig/compare/v1.14.0...v1.14.1)

---
updated-dependencies:
- dependency-name: go.uber.org/dig
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:45:11 +00:00
dependabot[bot]
8bc466f2ed build(deps): bump github.com/ipld/go-codec-dagpb from 1.4.0 to 1.4.1
Bumps [github.com/ipld/go-codec-dagpb](https://github.com/ipld/go-codec-dagpb) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/ipld/go-codec-dagpb/releases)
- [Commits](https://github.com/ipld/go-codec-dagpb/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: github.com/ipld/go-codec-dagpb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:32:02 +00:00
dependabot[bot]
f9a020a690 build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multiaddr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:31:20 +00:00
dependabot[bot]
0badd5015c build(deps): bump go.uber.org/fx from 1.16.0 to 1.17.1
Bumps [go.uber.org/fx](https://github.com/uber-go/fx) from 1.16.0 to 1.17.1.
- [Release notes](https://github.com/uber-go/fx/releases)
- [Changelog](https://github.com/uber-go/fx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/fx/compare/v1.16.0...v1.17.1)

---
updated-dependencies:
- dependency-name: go.uber.org/fx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:29:46 +00:00
Marcin Rataj
2f08eb45e7 chore: update kubo-as-a-library example 2022-07-25 16:48:52 +02:00
Steve Loeppky
3902c9be00
docs(readme): add maintainer info (#9141)
* Update readme with important maintainer info.

The release process should have more visibility.  For now just getting the links at least surfaced.
2022-07-23 02:29:25 +02:00
Marcin Rataj
7992025254 fix(gw): 404 when a valid DAG is missing link 2022-07-23 00:16:31 +02:00
Marcin Rataj
cf82ae54ab
Merge pull request #9123 from ipfs/fix/gw-trailing-slash-unixfs-dirs
fix(gw): directory URL normalization
2022-07-21 21:34:49 +02:00
Marcin Rataj
3182986151 fix(gw): ensure dir URLs have trailing slash
This fixes a regression around directory listing and index.html hosting.
Seems that during one of recent refactors code changed and we no longer
check for trailing slash in HTTP request path, but look at content path
instead.

This cleans this up and also ensures dir behavior is the same for
both index.html hosting and dir-index-html (generated listing).

It also adds more tests so we catch any future regressions.
2022-07-21 21:06:18 +02:00
Marcin Rataj
c95f5c9fce test(gw): index.html with go-get=1
This adds a missing test for https://github.com/ipfs/kubo/pull/3963
2022-07-21 21:06:18 +02:00
Marcin Rataj
bcab64d42d docs(config): add link to someguy router 2022-07-21 21:00:39 +02:00
Daniel Norman
5b1e04a7b8 fix: typo in README 2022-07-21 15:52:38 +00:00
kpcyrd
2711028c0a Reproducible Builds: Update GOFLAGS for -trimpath 2022-07-21 03:54:25 +00:00
Jorropo
84059cc663
Merge v0.14.0 back into master 2022-07-21 03:20:22 +00:00
Jorropo
c6777956a8 chore: bump version to v0.15.0-dev 2022-07-21 05:03:33 +02:00
Jorropo
e0fabd6dbf
Merge pull request #9133 from ipfs/release-v0.14.0
Release v0.14.0
2022-07-21 03:01:03 +00:00
Jorropo
77747e337d chore: bump to v0.14.0 2022-07-21 04:52:18 +02:00
Jorropo
9412867f5e docs(changelog): finish v0.14.0 changelog
Co-Authored-By: Marcin Rataj <lidel@lidel.org>
2022-07-21 04:52:18 +02:00
Marcin Rataj
84c3f101fd fix(gw): cache-control of index.html websites
This fixes a regression introduced in 0.13.0, where websites hosted via
index.html placed in UnixFS directory were always returned with
Cache-Control: public, max-age=29030400, immutable
even when loaded from mutable /ipns/ contentPath.

(cherry picked from commit e832cc2c1d)
2022-07-21 04:05:27 +02:00
anders
269e08a5f5 chore(license): fix broken link to apache-2.0
Fixes #9130

(cherry picked from commit 318171582b)
2022-07-21 04:05:27 +02:00
Marcin Rataj
7ea5687860 fix: kubo in daemon and cli stdout
(cherry picked from commit d30e71fa5a)
2022-07-21 04:05:27 +02:00
Jorropo
af4211a2fa backport: merge commit '839b0848a' into release-v0.14.0 2022-07-21 04:04:46 +02:00
Marcin Rataj
e832cc2c1d fix(gw): cache-control of index.html websites
This fixes a regression introduced in 0.13.0, where websites hosted via
index.html placed in UnixFS directory were always returned with
Cache-Control: public, max-age=29030400, immutable
even when loaded from mutable /ipns/ contentPath.
2022-07-21 02:02:21 +00:00
anders
318171582b
chore(license): fix broken link to apache-2.0
Fixes #9130
2022-07-20 12:31:34 -07:00
Marcin Rataj
d30e71fa5a fix: kubo in daemon and cli stdout 2022-07-20 16:26:49 +02:00
Steve Loeppky
639155c732
docs(readme): move content to docs website (#9102)
- point towards other implementations.
- add a link to a future ipfs-implementations doc
- link to IPFS in GO docs

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-07-20 15:53:41 +02:00
Marcin Rataj
a6687744c7 fix(gw): no backlink when listing root dir
Closes #9071
2022-07-18 23:35:44 +00:00
Marcin Rataj
839b0848ae fix(ci): ipfs-webui test
- ipfs-webui requires node =16.12.0
  https://app.circleci.com/pipelines/github/ipfs/kubo/7228/workflows/528ee100-ccc9-4e9c-8bb4-46cdbbe4e306/jobs/78516
- use package-lock.json for deterministic build
2022-07-08 23:18:17 +02:00
Marcin Rataj
fbb496b623 docs(changelog): v0.14 rename and breaking changes 2022-07-08 22:11:10 +02:00
Antonio Navarro Perez
93847da2e7
fix: Add routing command to subcommands help list. 2022-07-08 17:51:03 +02:00
Marcin Rataj
506ecdf862 fix: kubo-source.tar.gz on dist.ipfs.io
Closes https://github.com/ipfs/distributions/issues/737
2022-07-08 15:23:07 +02:00
Jorropo
10c3cc1aaf chore: Release v0.14-rc1 2022-07-07 23:47:41 +02:00
Jorropo
44ec4cd444 docs: fix v0.14's changelog format 2022-07-07 23:47:41 +02:00
dependabot[bot]
5e9f2df0dd build(deps): bump github.com/fsnotify/fsnotify from 1.5.1 to 1.5.4
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.1 to 1.5.4.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.1...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 23:36:42 +02:00
Jorropo
cbb9aeec49 chore: update go-multibase 🚀
This add supports for base256emoji.
2022-07-07 23:29:47 +02:00
Antonio Navarro Perez
92c4dc61a8
feat(routing): Delegated Routing (#8997)
* Delegated Routing.

Implementation of Reframe specs (https://github.com/ipfs/specs/blob/master/REFRAME.md) using go-delegated-routing library.

* Requested changes.

* Init using op string

* Separate possible ContentRouters for TopicDiscovery.

If we don't do this, we have a ciclic dependency creating TieredRouter.
Now we can create first all possible content routers, and after that,
create Routers.

* Set dht default routing type

* Add tests and remove uneeded code

* Add documentation.

* docs: Routing.Routers

* Requested changes.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>

* Add some documentation on new fx functions.

* Add changelog entry and integration tests

* test: sharness for 'dht' in 'routing' commands

Since 'routing' is currently the same as 'dht' (minus query command)
we need to test both, that way we won't have unnoticed divergence
in the default behavior.

* test(sharness): delegated routing via reframe URL

* Add more tests for delegated routing.

* If any put operation fails, the tiered router will fail.

* refactor: Routing.Routers: Parameters.Endpoint

As agreed  in https://github.com/ipfs/kubo/pull/8997#issuecomment-1175684716

* Try to improve CHANGELOG entry.

* chore: update reframe spec link

* Update go-delegated-routing dependency

* Fix config error test

* use new changelog format

* Remove port conflict

* go mod tidy

* ProviderManyWrapper to ProviderMany

* Update docs/changelogs/v0.14.md

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-07-07 17:10:25 -04:00
Jorropo
24b8dd5ab0 chore: changelogs split
Closes #8976
2022-07-07 19:44:01 +02:00
Marcin Rataj
58aaee00f8 feat(gw): Cache-Control: only-if-cached
This implements the only-if-cached behavior documented in specs:
https://github.com/ipfs/specs/blob/main/http-gateways/PATH_GATEWAY.md#cache-control-request-header
https://github.com/ipfs/specs/blob/main/http-gateways/PATH_GATEWAY.md#only-if-cached-head-behavior
2022-07-07 08:49:26 +02:00
Russell Dempsey
fbd65e0c8d chore(deps): webui v2.15.1
https://github.com/ipfs/ipfs-webui/releases/tag/v2.15.1
2022-07-07 01:45:19 +02:00
Marcin Rataj
9ce802f28c
Merge pull request #9098 from ipfs/fix/post-rename-papercuts
Follow-ups after repository rename
Context: https://github.com/ipfs/kubo/issues/8959
2022-07-06 23:59:41 +02:00
Marcin Rataj
8565bbb75c
refactor: kubo in ./docs 2022-07-06 23:45:25 +02:00
Marcin Rataj
91e6451419 refactor: kubo in snap docs 2022-07-06 23:44:38 +02:00