1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 03:19:47 +08:00

153 Commits

Author SHA1 Message Date
bc6bee1585 rename Libp2pGatewayOption and hard code its gateway configuration 2023-08-31 03:51:48 -04:00
f7aa1204b1 feat: add gateway to http over libp2p 2023-08-30 18:51:22 +02:00
c08313f032 chore: update go-libp2p to v0.28.1
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2023-07-26 14:48:19 +02:00
2716cd987f feat(gateway): support for IPIP-402 CAR params (#9914) 2023-06-08 17:32:18 +02:00
c10b804449 feat: Gateway.DeserializedResponses config flag (#9789)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-05-30 00:59:34 +02:00
c6a59c9cc1 feat(tracing): use OTEL_PROPAGATORS as per OTel spec (#9801) 2023-04-06 16:36:15 +02:00
d1713ca28e feat(gw): new metrics and HTTP range support (#9786)
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-04-03 08:17:07 +00:00
353dd49be2 refactor: switch gateway code to new API from go-libipfs (#9681)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-03-30 13:20:37 +00:00
3ab1086f71 chore: migrate go-libipfs to boxo
Resolves #9677, #9676, #9675, #9736
2023-03-28 22:05:25 -04:00
1e3b6c9857 feat: add tracing to the commands client 2023-03-28 22:05:25 -04:00
88d431c812 feat: remove writable gateway (#9743)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-03-27 15:19:55 +02:00
b58356939e refactor(gw): move Host (DNSLink and subdomain) handling to go-libipfs (#9624)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-02-07 03:44:24 +01:00
14649aa8ba refactor: new go-libipfs/gateway API, deprecate Gateway.Writable (#9616) 2023-02-02 02:50:46 +01:00
8d3b3154c9 refactor: use gateway from go-libipfs (#9588) 2023-01-31 11:02:31 +01:00
a3c70a11e6 feat(gateway): IPNS record response format (IPIP-351) (#9399)
* feat(gateway): IPNS record response format
* docs(rpc): mark as experimental: routing provide, get, put

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-27 04:46:50 +01:00
7bdb341132 feat: fast directory listings with DAG Size column (#9481)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-12-12 21:45:13 +01:00
e550d9e476 ci: add stylecheck to golangci-lint (#9334) 2022-10-06 10:18:40 -04:00
74aaf37cec chore: bump go-libp2p v0.23.1
This does not include any WebTransport config code in Kubo, this will be done later in an other PR.
2022-09-21 23:16:03 +02:00
c9693edbc5 chore: remove Gateway.PathPrefixes
Closes #7702
2022-08-30 15:38:04 +02:00
2ece5556f0 Change AccessControlHeaders funtion to modify an existing set of headers 2022-07-21 15:09:09 +01:00
f4d87419ce feat: make corehttp a reusable component 2022-07-21 15:09:06 +01:00
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
82467bc936 refactor: rename to kubo 2022-07-06 18:40:37 +02:00
650bc246ab fix: JS caching via Access-Control-Expose-Headers (#8984)
This fix safelists additional headers allowing JS running on websites to
read them when IPFS resource is downloaded via Fetch API.

These headers provide metadata necessary for making smart caching
decisions when IPFS resources are downloaded via Service Worker or a
similar middleware on the edge.
2022-05-19 14:11:19 -04:00
25cc85fa93 feat(gateway): Gateway.FastDirIndexThreshold (#8853)
* fix(core/gateway): option to limit directory size listing

* feat(gw): HTMLDirListingLimit

This is alternative take on the way we limit the HTML listing output.
Instead of a hard cut-off, we list up to HTMLDirListingLimit.
When a directory has more items than HTMLDirListingLimit we show
additional header and footer informing user that only $HTMLDirListingLimit
items are listed. This is a better UX.

* fix: 0 disables Gateway.HTMLDirListingLimit

* refactor: Gateway.FastDirIndexThreshold

see explainer in docs/config.md

* refactor: prealoc slices

* docs: Gateway.FastDirIndexThreshold

* refactor: core/corehttp/gateway_handler.go

https://github.com/ipfs/go-ipfs/pull/8853#discussion_r851437088

* docs: apply suggestions from code review

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2022-04-28 19:36:57 +02:00
f855bfe6ef feat: add basic gateway tracing (#8595)
* add deprecation warning when tracer plugins are loaded
* add response format attribute to span in gateway handler
* add note about tracing's experimental status in godoc
* add nil check for TTL when adding name span attrs
* add basic sharness test for integration with otel collector
* add nil check in UnixFSAPI.processLink
* test: sharness check all json objs for swarm span
* add env var docs to docs/environment-variables.md
* chore: pin the otel collector version
* add tracing spans per response type (#8841)
* docs: tracing with jaeger-ui

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-04 19:24:05 +02:00
3a84352f18 feat(cli): add daemon option --agent-version-suffix (#8419)
* feat(cli): add daemon option --agent-version-suffix
* fix sharness test when commit is empty (release)
2021-09-21 20:31:08 +02:00
5eea0a4ba0 http: use Method* constants
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2020-01-10 10:19:08 +01:00
853ed0be5d chore: fix deprecation warnings 2019-09-26 15:38:12 -07:00
521a29956b fix and improve the writable gateway
1. Fix handling of PUT. The simple implementation was the correct
   implementation, I have no idea what was going on here.
2. Use MFS everywhere to reduce code duplication and add support for sharded
   directories.
3. _Correctly_ block IPNS.
4. Remove the dependency on `core.IpfsNode`.
5. Remove support for putting empty directories with a well-known CID. It was
   useless as directories are automatically created.
2019-07-25 19:22:56 -07:00
42e191c017 gx: unrewrite
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:56 +01:00
f227862e88 gx: update go-ipfs-cmds, go-bitswap, go-libp2p-kad-dht, and go-mplex
Fixes the latest batch of bugs found in RC testing.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-27 12:39:24 -08:00
6972a9aa4d Gx Bubble. libp2p-6.0.38
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-02-27 01:10:59 +00:00
fea7ae727f gx: update go-cid
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-20 20:29:06 -08:00
f924f57c61 gx: update go-bitswap and go-libp2p-kad-dht
* go-bitswap: fix some race conditions.
* go-libp2p-kad-dht: fix a goroutine leak.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-20 17:19:54 -08:00
91ca5911be coreapi: return coreiface.ErrNotSupported when "catting" symlinks.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-19 03:48:04 -08:00
28cf3de0f9 Update protobuf
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-02-18 20:46:22 +01:00
cf0d4706e2 gx: update libp2p stuff
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-14 14:58:35 -08:00
e97a60b073 gx: update go-ipfs-files
fix compatibility issue with js-ipfs

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-11 10:48:58 -08:00
648cc40ec3 coreapi: fix import grouping after extracting iface
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-02-09 01:57:26 +01:00
7ed6b518b6 coreapi: update imports to updated interface
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-02-09 01:42:32 +01:00
2c93eeffc6 gx: update go-libp2p-peer
Switch _back_ to the 0.4.18 style of peer IDs while we figure things out. See
https://github.com/libp2p/specs/issues/138.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-07 17:41:39 -08:00
08cc5da55f gx: update deps
Importantly:

* fixes a bunch of MFS bugs
* pulls in some bitswap improvements

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-01-08 19:19:34 -08:00
42a15ba7e4 Merge pull request #5893 from ipfs/fix/gateway-headers
gateway: fix CORs headers
2019-01-08 13:25:08 -08:00
4bbf4cc9a0 gateway, api: canonicalize headers from user config
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-01-04 13:18:16 -08:00
82629c00ec gateway: fix CORs headers
fixes #5138 -- always add user-agent to access-control-allow-headers.
fixes #5888 -- same with content-type.
fixes #5892 -- extend user-provided headers instead of overriding them.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-01-04 13:18:03 -08:00
c9168ecf05 gateway: use Api.FetchBlocks for NoFetch
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-01-04 15:56:08 +01:00
6cee21d39a Fix offline gateway directory logic
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-01-04 02:39:17 +01:00
aa5daed3cb NoFetch gateway option
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-01-04 02:37:06 +01:00
c832a32a4c coreapi: global offline option
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 16:40:09 +01:00