1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-21 00:47:22 +08:00

refactor: rename to kubo

This commit is contained in:
Marcin Rataj
2022-05-09 20:17:09 +02:00
parent 289e465f05
commit 82467bc936
196 changed files with 554 additions and 538 deletions

View File

@ -119,11 +119,11 @@ jobs:
cp go.sum go.sum.bak
# make sure the examples run against the current version of go-ipfs
go mod edit -replace github.com/ipfs/go-ipfs=./../../..
go mod edit -replace github.com/ipfs/kubo=./../../..
go mod tidy
# use the internal config package when we test the current version of go-ipfs
sed -i.bak 's;"github.com/ipfs/go-ipfs-config";"github.com/ipfs/go-ipfs/config";' ./main.go
sed -i.bak 's;"github.com/ipfs/go-ipfs-config";"github.com/ipfs/kubo/config";' ./main.go
go test -v ./...

View File

@ -1,19 +1,27 @@
# go-ipfs
# kubo
![banner](https://ipfs.io/ipfs/bafykbzacecaesuqmivkauix25v6i6xxxsvsrtxknhgb5zak3xxsg2nb4dhs2u/ipfs.go.png)
![kubo](https://user-images.githubusercontent.com/157609/167471494-dee3a355-b551-4fbf-98e0-2eb76e867b48.png)
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square&cacheSeconds=3600)](https://protocol.ai)
[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square&cacheSeconds=3600)](https://godoc.org/github.com/ipfs/go-ipfs)
[![CircleCI](https://img.shields.io/circleci/build/github/ipfs/go-ipfs?style=flat-square&cacheSeconds=3600)](https://circleci.com/gh/ipfs/go-ipfs)
## What is "IPFS Banana"?
This repo provides "jack of all trades, master of none" implementation of IPFS.
It should be enough to get you started, if you find it lacking, see [other implementations](https://ipfs.io/#install).
## What is IPFS?
IPFS is a global, versioned, peer-to-peer filesystem. It combines good ideas from previous systems such as Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single BitTorrent swarm, exchanging git objects. IPFS provides an interface as simple as the HTTP web, but with permanence built-in. You can also mount the world at /ipfs.
For more info see: https://docs.ipfs.io/introduction/overview/
Before opening an issue, consider using one of the following locations to ensure you are opening your thread in the right place:
- go-ipfs _implementation_ bugs in [this repo](https://github.com/ipfs/go-ipfs/issues).
- kubo (previously named go-ipfs) _implementation_ bugs in [this repo](https://github.com/ipfs/go-ipfs/issues).
- Documentation issues in [ipfs/docs issues](https://github.com/ipfs/ipfs-docs/issues).
- IPFS _design_ in [ipfs/specs issues](https://github.com/ipfs/specs/issues).
- Exploration of new ideas in [ipfs/notes issues](https://github.com/ipfs/notes/issues).
@ -35,13 +43,18 @@ Before opening an issue, consider using one of the following locations to ensure
## Table of Contents
- [kubo](#kubo)
- [What is "IPFS Banana"?](#what-is-ipfs-banana)
- [What is IPFS?](#what-is-ipfs)
- [Next milestones](#next-milestones)
- [Table of Contents](#table-of-contents)
- [Security Issues](#security-issues)
- [Install](#install)
- [System Requirements](#system-requirements)
- [Docker](#docker)
- [Native Linux package managers](#native-linux-package-managers)
- [ArchLinux](#archlinux)
- [Nix](#nix-linux)
- [Nix](#nix)
- [Solus](#solus)
- [openSUSE](#opensuse)
- [Other package managers](#other-package-managers)
@ -49,7 +62,7 @@ Before opening an issue, consider using one of the following locations to ensure
- [Snap](#snap)
- [macOS package managers](#macos-package-managers)
- [MacPorts](#macports)
- [Nix](#nix-macos)
- [Nix](#nix-1)
- [Homebrew](#homebrew)
- [Windows package managers](#windows-package-managers)
- [Chocolatey](#chocolatey)
@ -61,16 +74,16 @@ Before opening an issue, consider using one of the following locations to ensure
- [Cross Compiling](#cross-compiling)
- [OpenSSL](#openssl)
- [Troubleshooting](#troubleshooting)
- [Updating go-ipfs](#updating-go-ipfs)
- [Updating](#updating)
- [Using ipfs-update](#using-ipfs-update)
- [Downloading IPFS builds using IPFS](#downloading-ipfs-builds-using-ipfs)
- [Downloading builds using IPFS](#downloading-builds-using-ipfs)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Some things to try](#some-things-to-try)
- [Troubleshooting](#troubleshooting-1)
- [Packages](#packages)
- [Development](#development)
- [Map of go-ipfs Subsystems](#map-of-go-ipfs-subsystems)
- [Map of Implemented Subsystems](#map-of-implemented-subsystems)
- [CLI, HTTP-API, Architecture Diagram](#cli-http-api-architecture-diagram)
- [Testing](#testing)
- [Development Dependencies](#development-dependencies)
@ -310,7 +323,7 @@ dependencies as well.
- Shell command completions can be generated with one of the `ipfs commands completion` subcommands. Read [docs/command-completion.md](docs/command-completion.md) to learn more.
- See the [misc folder](https://github.com/ipfs/go-ipfs/tree/master/misc) for how to connect IPFS to systemd or whatever init system your distro uses.
### Updating go-ipfs
### Updating
#### Using ipfs-update
@ -318,9 +331,11 @@ IPFS has an updating tool that can be accessed through `ipfs update`. The tool i
not installed alongside IPFS in order to keep that logic independent of the main
codebase. To install `ipfs update`, [download it here](https://ipfs.io/ipns/dist.ipfs.io/#ipfs-update).
#### Downloading IPFS builds using IPFS
#### Downloading builds using IPFS
List the available versions of go-ipfs:
<!-- TODO: rename this section after we figure out if dist.ipfs.io sgould produce both /go-ipfs/ and /kubo/ -->
List the available versions of "go-ipfs" implementation:
```
$ ipfs cat /ipns/dist.ipfs.io/go-ipfs/versions
@ -454,8 +469,8 @@ Some places to get you started on the codebase:
- PubSub: https://github.com/libp2p/go-libp2p-pubsub
- [IPFS : The `Add` command demystified](https://github.com/ipfs/go-ipfs/tree/master/docs/add-code-flow.md)
### Map of go-ipfs Subsystems
**WIP**: This is a high-level architecture diagram of the various sub-systems of go-ipfs. To be updated with how they interact. Anyone who has suggestions is welcome to comment [here](https://docs.google.com/drawings/d/1OVpBT2q-NtSJqlPX3buvjYhOnWfdzb85YEsM_njesME/edit) on how we can improve this!
### Map of Implemented Subsystems
**WIP**: This is a high-level architecture diagram of the various sub-systems of this specific implementation. To be updated with how they interact. Anyone who has suggestions is welcome to comment [here](https://docs.google.com/drawings/d/1OVpBT2q-NtSJqlPX3buvjYhOnWfdzb85YEsM_njesME/edit) on how we can improve this!
<img src="https://docs.google.com/drawings/d/e/2PACX-1vS_n1FvSu6mdmSirkBrIIEib2gqhgtatD9awaP2_WdrGN4zTNeg620XQd9P95WT-IvognSxIIdCM5uE/pub?w=1446&amp;h=1036">
### CLI, HTTP-API, Architecture Diagram
@ -492,7 +507,7 @@ Please reach out to us in one [chat](https://docs.ipfs.io/community/chat/) rooms
## License
The go-ipfs project is dual-licensed under Apache 2.0 and MIT terms:
This project is dual-licensed under Apache 2.0 and MIT terms:
- Apache License, Version 2.0, ([LICENSE-APACHE](https://github.com/ipfs/go-ipfs/blob/master/LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](https://github.com/ipfs/go-ipfs/blob/master/LICENSE-MIT) or http://opensource.org/licenses/MIT)

View File

@ -9,8 +9,8 @@ import (
gopath "path"
"strconv"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreapi"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"
"github.com/cespare/xxhash"
cid "github.com/ipfs/go-cid"

View File

@ -13,7 +13,7 @@ PATH := $(realpath $(d)):$(PATH)
# DEPS_OO_$(d) += merkledag/pb/merkledag.pb.go namesys/pb/namesys.pb.go
# DEPS_OO_$(d) += pin/internal/pb/header.pb.go unixfs/pb/unixfs.pb.go
$(d)_flags =-ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=$(git-hash)"
$(d)_flags =-ldflags="-X "github.com/ipfs/kubo".CurrentCommit=$(git-hash)"
$(d)-try-build $(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags)
@ -42,7 +42,7 @@ CLEAN += $(COVER_BIN_$(d))
$(COVER_BIN_$(d)): GOTAGS += testrunmain
$(COVER_BIN_$(d)): $(d) $$(DEPS_GO) ALWAYS
$(eval TMP_PKGS := $(shell $(GOCC) list -f '{{range .Deps}}{{.}} {{end}}' $(go-flags-with-tags) ./cmd/ipfs | sed 's/ /\n/g' | grep ipfs/go-ipfs) $(call go-pkg-name,$<))
$(eval TMP_PKGS := $(shell $(GOCC) list -f '{{range .Deps}}{{.}} {{end}}' $(go-flags-with-tags) ./cmd/ipfs | sed 's/ /\n/g' | grep ipfs/kubo) $(call go-pkg-name,$<))
$(eval TMP_LIST := $(call join-with,$(comma),$(TMP_PKGS)))
@echo $(GOCC) test $@ -c -covermode atomic -coverpkg ... $(go-flags-with-tags) ./$(@D) # for info
@$(GOCC) test -o $@ -c -covermode atomic -coverpkg $(TMP_LIST) $(go-flags-with-tags) ./$(@D) 2>&1 | (grep -v 'warning: no packages being tested' || true)

View File

@ -9,13 +9,13 @@ import (
"path/filepath"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreapi"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations/ipfsfetcher"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"
"github.com/ipfs/kubo/repo/fsrepo/migrations"
"github.com/ipfs/kubo/repo/fsrepo/migrations/ipfsfetcher"
"github.com/libp2p/go-libp2p-core/peer"
)
@ -36,7 +36,7 @@ func addMigrations(ctx context.Context, node *core.IpfsNode, fetcher migrations.
if err != nil {
return err
}
case *migrations.HttpFetcher, *migrations.RetryFetcher: // https://github.com/ipfs/go-ipfs/issues/8780
case *migrations.HttpFetcher, *migrations.RetryFetcher: // https://github.com/ipfs/kubo/issues/8780
// Add the downloaded migration files directly
if migrations.DownloadDirectory != "" {
var paths []string

View File

@ -15,21 +15,21 @@ import (
multierror "github.com/hashicorp/go-multierror"
version "github.com/ipfs/go-ipfs"
utilmain "github.com/ipfs/go-ipfs/cmd/ipfs/util"
oldcmds "github.com/ipfs/go-ipfs/commands"
config "github.com/ipfs/go-ipfs/config"
cserial "github.com/ipfs/go-ipfs/config/serialize"
"github.com/ipfs/go-ipfs/core"
commands "github.com/ipfs/go-ipfs/core/commands"
"github.com/ipfs/go-ipfs/core/coreapi"
corehttp "github.com/ipfs/go-ipfs/core/corehttp"
corerepo "github.com/ipfs/go-ipfs/core/corerepo"
libp2p "github.com/ipfs/go-ipfs/core/node/libp2p"
nodeMount "github.com/ipfs/go-ipfs/fuse/node"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations/ipfsfetcher"
version "github.com/ipfs/kubo"
utilmain "github.com/ipfs/kubo/cmd/ipfs/util"
oldcmds "github.com/ipfs/kubo/commands"
config "github.com/ipfs/kubo/config"
cserial "github.com/ipfs/kubo/config/serialize"
"github.com/ipfs/kubo/core"
commands "github.com/ipfs/kubo/core/commands"
"github.com/ipfs/kubo/core/coreapi"
corehttp "github.com/ipfs/kubo/core/corehttp"
corerepo "github.com/ipfs/kubo/core/corerepo"
libp2p "github.com/ipfs/kubo/core/node/libp2p"
nodeMount "github.com/ipfs/kubo/fuse/node"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
"github.com/ipfs/kubo/repo/fsrepo/migrations"
"github.com/ipfs/kubo/repo/fsrepo/migrations/ipfsfetcher"
sockets "github.com/libp2p/go-socket-activation"
cmds "github.com/ipfs/go-ipfs-cmds"
@ -801,7 +801,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
}
if len(cfg.Gateway.PathPrefixes) > 0 {
log.Error("Support for X-Ipfs-Gateway-Prefix and Gateway.PathPrefixes is deprecated and will be removed in the next release. Please comment on the issue if you're using this feature: https://github.com/ipfs/go-ipfs/issues/7702")
log.Error("Support for X-Ipfs-Gateway-Prefix and Gateway.PathPrefixes is deprecated and will be removed in the next release. Please comment on the issue if you're using this feature: https://github.com/ipfs/kubo/issues/7702")
}
node, err := cctx.ConstructNode()

View File

@ -3,7 +3,7 @@ package main
import (
"net/http"
"github.com/ipfs/go-ipfs/profile"
"github.com/ipfs/kubo/profile"
)
func init() {

View File

@ -10,18 +10,18 @@ import (
"path/filepath"
"strings"
assets "github.com/ipfs/go-ipfs/assets"
oldcmds "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/commands"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
path "github.com/ipfs/go-path"
unixfs "github.com/ipfs/go-unixfs"
assets "github.com/ipfs/kubo/assets"
oldcmds "github.com/ipfs/kubo/commands"
core "github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/commands"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
cmds "github.com/ipfs/go-ipfs-cmds"
files "github.com/ipfs/go-ipfs-files"
config "github.com/ipfs/go-ipfs/config"
options "github.com/ipfs/interface-go-ipfs-core/options"
config "github.com/ipfs/kubo/config"
)
const (

View File

@ -1,7 +1,7 @@
package main
import (
commands "github.com/ipfs/go-ipfs/core/commands"
commands "github.com/ipfs/kubo/core/commands"
cmds "github.com/ipfs/go-ipfs-cmds"
)

View File

@ -12,15 +12,15 @@ import (
"runtime/pprof"
"time"
util "github.com/ipfs/go-ipfs/cmd/ipfs/util"
oldcmds "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
corecmds "github.com/ipfs/go-ipfs/core/commands"
corehttp "github.com/ipfs/go-ipfs/core/corehttp"
loader "github.com/ipfs/go-ipfs/plugin/loader"
repo "github.com/ipfs/go-ipfs/repo"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/ipfs/go-ipfs/tracing"
util "github.com/ipfs/kubo/cmd/ipfs/util"
oldcmds "github.com/ipfs/kubo/commands"
core "github.com/ipfs/kubo/core"
corecmds "github.com/ipfs/kubo/core/commands"
corehttp "github.com/ipfs/kubo/core/corehttp"
loader "github.com/ipfs/kubo/plugin/loader"
repo "github.com/ipfs/kubo/repo"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel"
cmds "github.com/ipfs/go-ipfs-cmds"

View File

@ -13,8 +13,8 @@ import (
logging "github.com/ipfs/go-log"
pinclient "github.com/ipfs/go-pinning-service-http-client"
config "github.com/ipfs/go-ipfs/config"
"github.com/ipfs/go-ipfs/core"
config "github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core"
)
// mfslog is the logger for remote mfs pinning

View File

@ -7,9 +7,9 @@ import (
"testing"
"time"
config "github.com/ipfs/go-ipfs/config"
ipld "github.com/ipfs/go-ipld-format"
merkledag "github.com/ipfs/go-merkledag"
config "github.com/ipfs/kubo/config"
"github.com/libp2p/go-libp2p-core/host"
peer "github.com/libp2p/go-libp2p-core/peer"
)

View File

@ -6,7 +6,7 @@ package main
import (
"testing"
"github.com/ipfs/go-ipfs/thirdparty/assert"
"github.com/ipfs/kubo/thirdparty/assert"
)
func TestIsHidden(t *testing.T) {

View File

@ -12,11 +12,11 @@ import (
"path/filepath"
"syscall"
commands "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
coreapi "github.com/ipfs/go-ipfs/core/coreapi"
corehttp "github.com/ipfs/go-ipfs/core/corehttp"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
commands "github.com/ipfs/kubo/commands"
core "github.com/ipfs/kubo/core"
coreapi "github.com/ipfs/kubo/core/coreapi"
corehttp "github.com/ipfs/kubo/core/corehttp"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
fsnotify "github.com/fsnotify/fsnotify"
files "github.com/ipfs/go-ipfs-files"

View File

@ -6,15 +6,15 @@ import (
"strings"
"time"
core "github.com/ipfs/go-ipfs/core"
coreapi "github.com/ipfs/go-ipfs/core/coreapi"
loader "github.com/ipfs/go-ipfs/plugin/loader"
core "github.com/ipfs/kubo/core"
coreapi "github.com/ipfs/kubo/core/coreapi"
loader "github.com/ipfs/kubo/plugin/loader"
cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs/config"
logging "github.com/ipfs/go-log"
coreiface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
config "github.com/ipfs/kubo/config"
)
var log = logging.Logger("command")

View File

@ -3,7 +3,7 @@ package config
type Experiments struct {
FilestoreEnabled bool
UrlstoreEnabled bool
ShardingEnabled bool `json:",omitempty"` // deprecated by autosharding: https://github.com/ipfs/go-ipfs/pull/8527
ShardingEnabled bool `json:",omitempty"` // deprecated by autosharding: https://github.com/ipfs/kubo/pull/8527
GraphsyncEnabled bool
Libp2pStreamMounting bool
P2pHttpProxy bool

View File

@ -61,7 +61,7 @@ type Gateway struct {
// Setting to 0 will enable fast listings for all directories.
FastDirIndexThreshold *OptionalInteger `json:",omitempty"`
// FIXME: Not yet implemented: https://github.com/ipfs/go-ipfs/issues/8059
// FIXME: Not yet implemented: https://github.com/ipfs/kubo/issues/8059
APICommands []string
// NoFetch configures the gateway to _not_ fetch blocks in response to

View File

@ -8,7 +8,7 @@ import (
"os"
"path/filepath"
"github.com/ipfs/go-ipfs/config"
"github.com/ipfs/kubo/config"
"github.com/facebookgo/atomicfile"
)

View File

@ -5,7 +5,7 @@ import (
"runtime"
"testing"
config "github.com/ipfs/go-ipfs/config"
config "github.com/ipfs/kubo/config"
)
func TestConfig(t *testing.T) {

View File

@ -7,8 +7,8 @@ import (
"sync"
"time"
"github.com/ipfs/go-ipfs/core/bootstrap"
"github.com/ipfs/go-ipfs/core/node"
"github.com/ipfs/kubo/core/bootstrap"
"github.com/ipfs/kubo/core/node"
"github.com/ipfs/go-metrics-interface"
"go.uber.org/dig"

View File

@ -7,7 +7,7 @@ import (
"text/tabwriter"
"time"
oldcmds "github.com/ipfs/go-ipfs/commands"
oldcmds "github.com/ipfs/kubo/commands"
cmds "github.com/ipfs/go-ipfs-cmds"
)

View File

@ -8,7 +8,7 @@ import (
"path"
"strings"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/cheggaaa/pb"
cmds "github.com/ipfs/go-ipfs-cmds"

View File

@ -4,8 +4,8 @@ import (
"fmt"
"io"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
e "github.com/ipfs/go-ipfs/core/commands/e"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
e "github.com/ipfs/kubo/core/commands/e"
humanize "github.com/dustin/go-humanize"
bitswap "github.com/ipfs/go-bitswap"

View File

@ -8,8 +8,8 @@ import (
files "github.com/ipfs/go-ipfs-files"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/cmdutils"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
cmds "github.com/ipfs/go-ipfs-cmds"
options "github.com/ipfs/interface-go-ipfs-core/options"

View File

@ -6,12 +6,12 @@ import (
"io"
"sort"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
repo "github.com/ipfs/go-ipfs/repo"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
repo "github.com/ipfs/kubo/repo"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs/config"
config "github.com/ipfs/kubo/config"
peer "github.com/libp2p/go-libp2p-core/peer"
ma "github.com/multiformats/go-multiaddr"
)

View File

@ -6,7 +6,7 @@ import (
"io"
"os"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/cheggaaa/pb"
"github.com/ipfs/go-ipfs-cmds"

View File

@ -5,8 +5,8 @@ import (
"strconv"
"strings"
"github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/kubo/commands"
"github.com/ipfs/kubo/core"
cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"

View File

@ -11,7 +11,7 @@ import (
const (
AllowBigBlockOptionName = "allow-big-block"
SoftBlockLimit = 1024 * 1024 // https://github.com/ipfs/go-ipfs/issues/7421#issuecomment-910833499
SoftBlockLimit = 1024 * 1024 // https://github.com/ipfs/kubo/issues/7421#issuecomment-910833499
)
var AllowBigBlockOption cmds.Option

View File

@ -1,6 +1,6 @@
// Package commands implements the ipfs command interface
//
// Using github.com/ipfs/go-ipfs/commands to define the command line and HTTP
// Using github.com/ipfs/kubo/commands to define the command line and HTTP
// APIs. This is the interface available to folks using IPFS from outside of
// the Go language.
package commands

View File

@ -9,13 +9,13 @@ import (
"os/exec"
"strings"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/repo"
"github.com/ipfs/kubo/repo/fsrepo"
"github.com/elgris/jsondiff"
cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs/config"
config "github.com/ipfs/kubo/config"
)
// ConfigUpdateOutput is config profile apply command's output

View File

@ -4,8 +4,8 @@ import (
"fmt"
"io"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/cmdutils"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
cid "github.com/ipfs/go-cid"
cidenc "github.com/ipfs/go-cidutil/cidenc"

View File

@ -11,9 +11,9 @@ import (
"github.com/cheggaaa/pb"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
ipld "github.com/ipfs/go-ipld-format"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
gocar "github.com/ipld/go-car"

View File

@ -4,9 +4,9 @@ import (
"fmt"
"io"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
ipldlegacy "github.com/ipfs/go-ipld-legacy"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime/multicodec"

View File

@ -7,11 +7,11 @@ import (
cid "github.com/ipfs/go-cid"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/cmdutils"
ipld "github.com/ipfs/go-ipld-format"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
cmds "github.com/ipfs/go-ipfs-cmds"
gocarv2 "github.com/ipld/go-car/v2"

View File

@ -6,9 +6,9 @@ import (
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/cmdutils"
ipldlegacy "github.com/ipfs/go-ipld-legacy"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
"github.com/ipld/go-ipld-prime/multicodec"
basicnode "github.com/ipld/go-ipld-prime/node/basic"

View File

@ -1,8 +1,8 @@
package dagcmd
import (
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
)

View File

@ -5,10 +5,10 @@ import (
"io"
"os"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/e"
"github.com/ipfs/go-merkledag/traverse"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/e"
cmds "github.com/ipfs/go-ipfs-cmds"
mdag "github.com/ipfs/go-merkledag"

View File

@ -8,7 +8,7 @@ import (
"io"
"time"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cid "github.com/ipfs/go-cid"
cmds "github.com/ipfs/go-ipfs-cmds"

View File

@ -4,10 +4,10 @@ import (
"fmt"
"io"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
ncmd "github.com/ipfs/go-ipfs/core/commands/name"
namesys "github.com/ipfs/go-namesys"
nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
ncmd "github.com/ipfs/kubo/core/commands/name"
cmds "github.com/ipfs/go-ipfs-cmds"
)
@ -17,7 +17,7 @@ const (
)
var DNSCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/8607
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/8607
Helptext: cmds.HelpText{
Tagline: "Resolve DNSLink records.",
ShortDescription: `

View File

@ -11,8 +11,8 @@ import (
"strings"
humanize "github.com/dustin/go-humanize"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/commands/cmdenv"
bservice "github.com/ipfs/go-blockservice"
cid "github.com/ipfs/go-cid"

View File

@ -8,9 +8,9 @@ import (
filestore "github.com/ipfs/go-filestore"
cmds "github.com/ipfs/go-ipfs-cmds"
core "github.com/ipfs/go-ipfs/core"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
e "github.com/ipfs/go-ipfs/core/commands/e"
core "github.com/ipfs/kubo/core"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
e "github.com/ipfs/kubo/core/commands/e"
"github.com/ipfs/go-cid"
)

View File

@ -11,8 +11,8 @@ import (
"path/filepath"
"strings"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/e"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/e"
"github.com/cheggaaa/pb"
cmds "github.com/ipfs/go-ipfs-cmds"

View File

@ -9,12 +9,12 @@ import (
"sort"
"strings"
version "github.com/ipfs/go-ipfs"
core "github.com/ipfs/go-ipfs/core"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
version "github.com/ipfs/kubo"
core "github.com/ipfs/kubo/core"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
ke "github.com/ipfs/go-ipfs/core/commands/keyencode"
ke "github.com/ipfs/kubo/core/commands/keyencode"
ic "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/host"
peer "github.com/libp2p/go-libp2p-core/peer"

View File

@ -14,14 +14,14 @@ import (
cmds "github.com/ipfs/go-ipfs-cmds"
keystore "github.com/ipfs/go-ipfs-keystore"
oldcmds "github.com/ipfs/go-ipfs/commands"
config "github.com/ipfs/go-ipfs/config"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/e"
ke "github.com/ipfs/go-ipfs/core/commands/keyencode"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
migrations "github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
options "github.com/ipfs/interface-go-ipfs-core/options"
oldcmds "github.com/ipfs/kubo/commands"
config "github.com/ipfs/kubo/config"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/e"
ke "github.com/ipfs/kubo/core/commands/keyencode"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
migrations "github.com/ipfs/kubo/repo/fsrepo/migrations"
"github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer"
)

View File

@ -7,7 +7,7 @@ import (
"sort"
"text/tabwriter"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
unixfs "github.com/ipfs/go-unixfs"

View File

@ -7,12 +7,12 @@ import (
"fmt"
"io"
oldcmds "github.com/ipfs/go-ipfs/commands"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
nodeMount "github.com/ipfs/go-ipfs/fuse/node"
oldcmds "github.com/ipfs/kubo/commands"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
nodeMount "github.com/ipfs/kubo/fuse/node"
cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs/config"
config "github.com/ipfs/kubo/config"
)
const (

View File

@ -7,7 +7,7 @@ import (
"strings"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
mbase "github.com/multiformats/go-multibase"
)

View File

@ -7,8 +7,8 @@ import (
"strings"
"time"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
namesys "github.com/ipfs/go-namesys"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"

View File

@ -6,8 +6,8 @@ import (
"strings"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
ke "github.com/ipfs/go-ipfs/core/commands/keyencode"
"github.com/ipfs/kubo/core/commands/cmdenv"
ke "github.com/ipfs/kubo/core/commands/keyencode"
"github.com/libp2p/go-libp2p-core/peer"
record "github.com/libp2p/go-libp2p-record"
)

View File

@ -6,13 +6,13 @@ import (
"io"
"time"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
ke "github.com/ipfs/go-ipfs/core/commands/keyencode"
iface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
path "github.com/ipfs/interface-go-ipfs-core/path"
ke "github.com/ipfs/kubo/core/commands/keyencode"
peer "github.com/libp2p/go-libp2p-core/peer"
)

View File

@ -8,7 +8,7 @@ import (
"github.com/ipfs/go-merkledag/dagutils"
path "github.com/ipfs/interface-go-ipfs-core/path"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
)
const (
@ -20,7 +20,7 @@ type Changes struct {
}
var ObjectDiffCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Display the diff between two IPFS objects.",
ShortDescription: `

View File

@ -8,7 +8,7 @@ import (
"text/tabwriter"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
humanize "github.com/dustin/go-humanize"
"github.com/ipfs/go-cid"
@ -46,7 +46,7 @@ const (
)
var ObjectCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated commands to interact with dag-pb objects. Use 'dag' or 'files' instead.",
ShortDescription: `
@ -68,7 +68,7 @@ directly. Deprecated, use more modern 'ipfs dag' and 'ipfs files' instead.`,
// ObjectDataCmd object data command
var ObjectDataCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to read the raw bytes of a dag-pb object: use 'dag get' instead.",
ShortDescription: `
@ -108,7 +108,7 @@ is the raw data of the object.
// ObjectLinksCmd object links command
var ObjectLinksCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to output links in the specified dag-pb object: use 'dag get' instead.",
ShortDescription: `
@ -183,7 +183,7 @@ multihash. Provided for legacy reasons. Use 'ipfs dag get' instead.
// ObjectGetCmd object get command
var ObjectGetCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to get and serialize the dag-pb node. Use 'dag get' instead",
ShortDescription: `
@ -275,7 +275,7 @@ DEPRECATED and provided for legacy reasons. Use 'ipfs dag get' instead.
// ObjectStatCmd object stat command
var ObjectStatCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to read stats for the dag-pb node. Use 'files stat' instead.",
ShortDescription: `
@ -375,7 +375,7 @@ DEPRECATED: Provided for legacy reasons. Modern replacements:
// ObjectPutCmd object put command
var ObjectPutCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to store input as a DAG object. Use 'dag put' instead.",
ShortDescription: `
@ -455,7 +455,7 @@ DEPRECATED and provided for legacy reasons. Use 'ipfs dag put' instead.
// ObjectNewCmd object new command
var ObjectNewCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to create a new dag-pb object from a template.",
ShortDescription: `

View File

@ -5,15 +5,15 @@ import (
"io"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/cmdutils"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
"github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/interface-go-ipfs-core/path"
)
var ObjectPatchCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to create a new merkledag object based on an existing one. Use MFS with 'files cp|rm' instead.",
ShortDescription: `
@ -49,7 +49,7 @@ For modern use cases, use MFS with 'files' commands: 'ipfs files --help'.
}
var patchAppendDataCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to append data to the data segment of a DAG node.",
ShortDescription: `
@ -104,7 +104,7 @@ DEPRECATED and provided for legacy reasons. Use 'ipfs add' or 'ipfs files' inste
}
var patchSetDataCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to set the data field of dag-pb object.",
ShortDescription: `
@ -155,7 +155,7 @@ DEPRECATED and provided for legacy reasons. Use 'files cp' and 'dag put' instead
}
var patchRmLinkCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to remove a link from dag-pb object.",
ShortDescription: `
@ -202,7 +202,7 @@ const (
)
var patchAddLinkCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7936
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7936
Helptext: cmds.HelpText{
Tagline: "Deprecated way to add a link to a given dag-pb.",
ShortDescription: `

View File

@ -10,9 +10,9 @@ import (
"text/tabwriter"
"time"
core "github.com/ipfs/go-ipfs/core"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
p2p "github.com/ipfs/go-ipfs/p2p"
core "github.com/ipfs/kubo/core"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
p2p "github.com/ipfs/kubo/p2p"
cmds "github.com/ipfs/go-ipfs-cmds"
peer "github.com/libp2p/go-libp2p-core/peer"

View File

@ -19,9 +19,9 @@ import (
options "github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/interface-go-ipfs-core/path"
core "github.com/ipfs/go-ipfs/core"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
e "github.com/ipfs/go-ipfs/core/commands/e"
core "github.com/ipfs/kubo/core"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
e "github.com/ipfs/kubo/core/commands/e"
)
var PinCmd = &cmds.Command{

View File

@ -17,12 +17,12 @@ import (
cid "github.com/ipfs/go-cid"
cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs/config"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
logging "github.com/ipfs/go-log"
pinclient "github.com/ipfs/go-pinning-service-http-client"
path "github.com/ipfs/interface-go-ipfs-core/path"
config "github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core/commands/cmdenv"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
"github.com/libp2p/go-libp2p-core/host"
peer "github.com/libp2p/go-libp2p-core/peer"
)
@ -761,7 +761,7 @@ func normalizeEndpoint(endpoint string) (string, error) {
return "", fmt.Errorf("service endpoint must be a valid HTTP URL")
}
// cleanup trailing and duplicate slashes (https://github.com/ipfs/go-ipfs/issues/7826)
// cleanup trailing and duplicate slashes (https://github.com/ipfs/kubo/issues/7826)
uri.Path = gopath.Clean(uri.Path)
uri.Path = strings.TrimSuffix(uri.Path, ".")
uri.Path = strings.TrimSuffix(uri.Path, "/")

View File

@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
peer "github.com/libp2p/go-libp2p-core/peer"

View File

@ -9,8 +9,8 @@ import (
"time"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/e"
"github.com/ipfs/go-ipfs/profile"
"github.com/ipfs/kubo/core/commands/e"
"github.com/ipfs/kubo/profile"
)
// time format that works in filenames on windows.
@ -41,7 +41,7 @@ To aid in debugging, this command also attempts to include a copy of
the running go-ipfs binary.
Profiles can be examined using 'go tool pprof', some tips can be found at
https://github.com/ipfs/go-ipfs/blob/master/docs/debug-guide.md.
https://github.com/ipfs/kubo/blob/master/docs/debug-guide.md.
Privacy Notice:

View File

@ -7,7 +7,7 @@ import (
"net/http"
"sort"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
mbase "github.com/multiformats/go-multibase"
"github.com/pkg/errors"
@ -336,7 +336,7 @@ TOPIC AND DATA ENCODING
// TODO: move to cmdenv?
// Encode binary data to be passed as multibase string in URL arguments.
// (avoiding issues described in https://github.com/ipfs/go-ipfs/issues/7939)
// (avoiding issues described in https://github.com/ipfs/kubo/issues/7939)
func urlArgsEncoder(req *cmds.Request, env cmds.Environment) error {
encoder, _ := mbase.EncoderByName("base64url")
for n, arg := range req.Arguments {
@ -346,7 +346,7 @@ func urlArgsEncoder(req *cmds.Request, env cmds.Environment) error {
}
// Decode binary data passed as multibase string in URL arguments.
// (avoiding issues described in https://github.com/ipfs/go-ipfs/issues/7939)
// (avoiding issues described in https://github.com/ipfs/kubo/issues/7939)
func urlArgsDecoder(req *cmds.Request, env cmds.Environment) error {
for n, arg := range req.Arguments {
encoding, data, err := mbase.Decode(arg)
@ -355,7 +355,7 @@ func urlArgsDecoder(req *cmds.Request, env cmds.Environment) error {
}
// Enforce URL-safe encoding is used for data passed via URL arguments
// - without this we get data corruption similar to https://github.com/ipfs/go-ipfs/issues/7939
// - without this we get data corruption similar to https://github.com/ipfs/kubo/issues/7939
// - we can't just deny base64, because there may be other bases that
// are not URL-safe better to force base64url which is known to be
// safe in URL context

View File

@ -7,7 +7,7 @@ import (
"io"
"strings"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cid "github.com/ipfs/go-cid"
cidenc "github.com/ipfs/go-cidutil/cidenc"

View File

@ -11,12 +11,12 @@ import (
"sync"
"text/tabwriter"
oldcmds "github.com/ipfs/go-ipfs/commands"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
corerepo "github.com/ipfs/go-ipfs/core/corerepo"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations/ipfsfetcher"
oldcmds "github.com/ipfs/kubo/commands"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
corerepo "github.com/ipfs/kubo/core/corerepo"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
"github.com/ipfs/kubo/repo/fsrepo/migrations"
"github.com/ipfs/kubo/repo/fsrepo/migrations/ipfsfetcher"
humanize "github.com/dustin/go-humanize"
cid "github.com/ipfs/go-cid"
@ -227,7 +227,7 @@ Version string The repo version.
}
var repoFsckCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/6435
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/6435
Helptext: cmds.HelpText{
Tagline: "Remove repo lockfiles.",
ShortDescription: `

View File

@ -7,9 +7,9 @@ import (
"strings"
"time"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
ncmd "github.com/ipfs/go-ipfs/core/commands/name"
ns "github.com/ipfs/go-namesys"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
ncmd "github.com/ipfs/kubo/core/commands/name"
cidenc "github.com/ipfs/go-cidutil/cidenc"
cmds "github.com/ipfs/go-ipfs-cmds"

View File

@ -3,12 +3,12 @@ package commands
import (
"errors"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
dag "github.com/ipfs/go-ipfs/core/commands/dag"
name "github.com/ipfs/go-ipfs/core/commands/name"
ocmd "github.com/ipfs/go-ipfs/core/commands/object"
"github.com/ipfs/go-ipfs/core/commands/pin"
unixfs "github.com/ipfs/go-ipfs/core/commands/unixfs"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
dag "github.com/ipfs/kubo/core/commands/dag"
name "github.com/ipfs/kubo/core/commands/name"
ocmd "github.com/ipfs/kubo/core/commands/object"
"github.com/ipfs/kubo/core/commands/pin"
unixfs "github.com/ipfs/kubo/core/commands/unixfs"
cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"

View File

@ -2,7 +2,7 @@ package commands
import (
cmds "github.com/ipfs/go-ipfs-cmds"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
)
var daemonShutdownCmd = &cmds.Command{

View File

@ -6,7 +6,7 @@ import (
"os"
"time"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
humanize "github.com/dustin/go-humanize"
cmds "github.com/ipfs/go-ipfs-cmds"

View File

@ -6,7 +6,7 @@ import (
"text/tabwriter"
"time"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/libp2p/go-libp2p-core/network"

View File

@ -8,7 +8,7 @@ import (
humanize "github.com/dustin/go-humanize"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/go-ipfs-provider/batched"
)

View File

@ -13,12 +13,12 @@ import (
"time"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/config"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/node/libp2p"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/ipfs/kubo/commands"
"github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/node/libp2p"
"github.com/ipfs/kubo/repo"
"github.com/ipfs/kubo/repo/fsrepo"
cmds "github.com/ipfs/go-ipfs-cmds"
inet "github.com/libp2p/go-libp2p-core/network"

View File

@ -5,9 +5,9 @@ import (
"path"
"runtime"
version "github.com/ipfs/go-ipfs"
"github.com/ipfs/go-ipfs/core"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
version "github.com/ipfs/kubo"
"github.com/ipfs/kubo/core"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
manet "github.com/multiformats/go-multiaddr/net"

View File

@ -5,15 +5,15 @@ import (
"io"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
tar "github.com/ipfs/go-ipfs/tar"
"github.com/ipfs/kubo/core/commands/cmdenv"
tar "github.com/ipfs/kubo/tar"
dag "github.com/ipfs/go-merkledag"
path "github.com/ipfs/interface-go-ipfs-core/path"
)
var TarCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7951
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7951
Helptext: cmds.HelpText{
Tagline: "Utility functions for tar files in ipfs.",
},
@ -25,7 +25,7 @@ var TarCmd = &cmds.Command{
}
var tarAddCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7951
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7951
Helptext: cmds.HelpText{
Tagline: "Import a tar file into IPFS.",
ShortDescription: `
@ -76,7 +76,7 @@ represent it.
}
var tarCatCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/7951
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/7951
Helptext: cmds.HelpText{
Tagline: "Export a tar file from IPFS.",
ShortDescription: `

View File

@ -6,7 +6,7 @@ import (
"sort"
"text/tabwriter"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
merkledag "github.com/ipfs/go-merkledag"
@ -33,7 +33,7 @@ type LsOutput struct {
}
var LsCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/pull/7755
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/pull/7755
Helptext: cmds.HelpText{
Tagline: "List directory contents for Unix filesystem objects. Deprecated: Use 'ipfs ls' and 'ipfs files ls' instead.",
ShortDescription: `

View File

@ -5,7 +5,7 @@ import (
)
var UnixFSCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/pull/7755
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/pull/7755
Helptext: cmds.HelpText{
Tagline: "Interact with IPFS objects representing Unix filesystems.",
ShortDescription: `

View File

@ -6,7 +6,7 @@ import (
"net/url"
filestore "github.com/ipfs/go-filestore"
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
cmds "github.com/ipfs/go-ipfs-cmds"
files "github.com/ipfs/go-ipfs-files"

View File

@ -6,7 +6,7 @@ import (
"io"
"runtime/debug"
version "github.com/ipfs/go-ipfs"
version "github.com/ipfs/kubo"
cmds "github.com/ipfs/go-ipfs-cmds"
)

View File

@ -43,15 +43,15 @@ import (
ma "github.com/multiformats/go-multiaddr"
madns "github.com/multiformats/go-multiaddr-dns"
"github.com/ipfs/go-ipfs/core/bootstrap"
"github.com/ipfs/go-ipfs/core/node"
"github.com/ipfs/go-ipfs/core/node/libp2p"
"github.com/ipfs/go-ipfs/fuse/mount"
"github.com/ipfs/go-ipfs/p2p"
"github.com/ipfs/go-ipfs/peering"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-namesys"
ipnsrp "github.com/ipfs/go-namesys/republisher"
"github.com/ipfs/kubo/core/bootstrap"
"github.com/ipfs/kubo/core/node"
"github.com/ipfs/kubo/core/node/libp2p"
"github.com/ipfs/kubo/fuse/mount"
"github.com/ipfs/kubo/p2p"
"github.com/ipfs/kubo/peering"
"github.com/ipfs/kubo/repo"
)
var log = logging.Logger("core")

View File

@ -5,11 +5,11 @@ import (
context "context"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/kubo/repo"
datastore "github.com/ipfs/go-datastore"
syncds "github.com/ipfs/go-datastore/sync"
config "github.com/ipfs/go-ipfs/config"
config "github.com/ipfs/kubo/config"
)
func TestInitialization(t *testing.T) {

View File

@ -15,8 +15,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
util "github.com/ipfs/go-ipfs/blocks/blockstoreutil"
"github.com/ipfs/go-ipfs/tracing"
util "github.com/ipfs/kubo/blocks/blockstoreutil"
"github.com/ipfs/kubo/tracing"
)
type BlockAPI CoreAPI

View File

@ -39,10 +39,10 @@ import (
record "github.com/libp2p/go-libp2p-record"
madns "github.com/multiformats/go-multiaddr-dns"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/node"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-namesys"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/node"
"github.com/ipfs/kubo/repo"
)
type CoreAPI struct {

View File

@ -5,9 +5,9 @@ import (
cid "github.com/ipfs/go-cid"
pin "github.com/ipfs/go-ipfs-pinner"
"github.com/ipfs/go-ipfs/tracing"
ipld "github.com/ipfs/go-ipld-format"
dag "github.com/ipfs/go-merkledag"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)

View File

@ -9,11 +9,11 @@ import (
cidutil "github.com/ipfs/go-cidutil"
blockstore "github.com/ipfs/go-ipfs-blockstore"
offline "github.com/ipfs/go-ipfs-exchange-offline"
"github.com/ipfs/go-ipfs/tracing"
dag "github.com/ipfs/go-merkledag"
coreiface "github.com/ipfs/interface-go-ipfs-core"
caopts "github.com/ipfs/interface-go-ipfs-core/options"
path "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
peer "github.com/libp2p/go-libp2p-core/peer"
routing "github.com/libp2p/go-libp2p-core/routing"
"go.opentelemetry.io/otel/attribute"

View File

@ -7,11 +7,11 @@ import (
"fmt"
"sort"
"github.com/ipfs/go-ipfs/tracing"
ipfspath "github.com/ipfs/go-path"
coreiface "github.com/ipfs/interface-go-ipfs-core"
caopts "github.com/ipfs/interface-go-ipfs-core/options"
path "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
crypto "github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer"
"go.opentelemetry.io/otel/attribute"

View File

@ -7,8 +7,8 @@ import (
"time"
keystore "github.com/ipfs/go-ipfs-keystore"
"github.com/ipfs/go-ipfs/tracing"
"github.com/ipfs/go-namesys"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

View File

@ -12,7 +12,6 @@ import (
cid "github.com/ipfs/go-cid"
pin "github.com/ipfs/go-ipfs-pinner"
"github.com/ipfs/go-ipfs/tracing"
ipld "github.com/ipfs/go-ipld-format"
dag "github.com/ipfs/go-merkledag"
"github.com/ipfs/go-merkledag/dagutils"
@ -20,6 +19,7 @@ import (
coreiface "github.com/ipfs/interface-go-ipfs-core"
caopts "github.com/ipfs/interface-go-ipfs-core/options"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)

View File

@ -5,8 +5,8 @@ import (
"fmt"
gopath "path"
"github.com/ipfs/go-ipfs/tracing"
"github.com/ipfs/go-namesys/resolve"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

View File

@ -8,11 +8,11 @@ import (
"github.com/ipfs/go-cid"
offline "github.com/ipfs/go-ipfs-exchange-offline"
pin "github.com/ipfs/go-ipfs-pinner"
"github.com/ipfs/go-ipfs/tracing"
"github.com/ipfs/go-merkledag"
coreiface "github.com/ipfs/interface-go-ipfs-core"
caopts "github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)

View File

@ -4,9 +4,9 @@ import (
"context"
"errors"
"github.com/ipfs/go-ipfs/tracing"
coreiface "github.com/ipfs/interface-go-ipfs-core"
caopts "github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/kubo/tracing"
peer "github.com/libp2p/go-libp2p-core/peer"
routing "github.com/libp2p/go-libp2p-core/routing"
pubsub "github.com/libp2p/go-libp2p-pubsub"

View File

@ -5,8 +5,8 @@ import (
"sort"
"time"
"github.com/ipfs/go-ipfs/tracing"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/kubo/tracing"
inet "github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
pstore "github.com/libp2p/go-libp2p-core/peerstore"

View File

@ -10,18 +10,18 @@ import (
"github.com/ipfs/go-filestore"
keystore "github.com/ipfs/go-ipfs-keystore"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/bootstrap"
"github.com/ipfs/go-ipfs/core/coreapi"
mock "github.com/ipfs/go-ipfs/core/mock"
"github.com/ipfs/go-ipfs/core/node/libp2p"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/bootstrap"
"github.com/ipfs/kubo/core/coreapi"
mock "github.com/ipfs/kubo/core/mock"
"github.com/ipfs/kubo/core/node/libp2p"
"github.com/ipfs/kubo/repo"
"github.com/ipfs/go-datastore"
syncds "github.com/ipfs/go-datastore/sync"
"github.com/ipfs/go-ipfs/config"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/tests"
"github.com/ipfs/kubo/config"
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"

View File

@ -5,12 +5,12 @@ import (
"fmt"
"sync"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/tracing"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"github.com/ipfs/go-ipfs/core/coreunix"
"github.com/ipfs/kubo/core/coreunix"
blockservice "github.com/ipfs/go-blockservice"
cid "github.com/ipfs/go-cid"
@ -96,7 +96,7 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options
//}
if settings.NoCopy && !(cfg.Experimental.FilestoreEnabled || cfg.Experimental.UrlstoreEnabled) {
return nil, fmt.Errorf("either the filestore or the urlstore must be enabled to use nocopy, see: https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipfs-filestore")
return nil, fmt.Errorf("either the filestore or the urlstore must be enabled to use nocopy, see: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#ipfs-filestore")
}
addblockstore := api.blockstore

View File

@ -9,15 +9,15 @@ import (
"strconv"
"strings"
version "github.com/ipfs/go-ipfs"
oldcmds "github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/core"
corecommands "github.com/ipfs/go-ipfs/core/commands"
version "github.com/ipfs/kubo"
oldcmds "github.com/ipfs/kubo/commands"
"github.com/ipfs/kubo/core"
corecommands "github.com/ipfs/kubo/core/commands"
cmds "github.com/ipfs/go-ipfs-cmds"
cmdsHttp "github.com/ipfs/go-ipfs-cmds/http"
config "github.com/ipfs/go-ipfs/config"
path "github.com/ipfs/go-path"
config "github.com/ipfs/kubo/config"
)
var (

View File

@ -11,8 +11,8 @@ import (
"net/http"
"time"
core "github.com/ipfs/go-ipfs/core"
logging "github.com/ipfs/go-log"
core "github.com/ipfs/kubo/core"
"github.com/jbenet/goprocess"
periodicproc "github.com/jbenet/goprocess/periodic"
ma "github.com/multiformats/go-multiaddr"

View File

@ -6,9 +6,9 @@ import (
"net/http"
"sort"
version "github.com/ipfs/go-ipfs"
core "github.com/ipfs/go-ipfs/core"
coreapi "github.com/ipfs/go-ipfs/core/coreapi"
version "github.com/ipfs/kubo"
core "github.com/ipfs/kubo/core"
coreapi "github.com/ipfs/kubo/core/coreapi"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
options "github.com/ipfs/interface-go-ipfs-core/options"

View File

@ -189,7 +189,7 @@ func newGatewaySummaryMetric(name string, help string) *prometheus.SummaryVec {
func newGatewayHistogramMetric(name string, help string) *prometheus.HistogramVec {
// We can add buckets as a parameter in the future, but for now using static defaults
// suggested in https://github.com/ipfs/go-ipfs/issues/8441
// suggested in https://github.com/ipfs/kubo/issues/8441
defaultBuckets := []float64{0.05, 0.1, 0.25, 0.5, 1, 2, 5, 10, 30, 60}
histogramMetric := prometheus.NewHistogramVec(
prometheus.HistogramOpts{
@ -666,11 +666,11 @@ func addCacheControlHeaders(w http.ResponseWriter, r *http.Request, contentPath
// mutable namespaces such as /ipns/ can't be cached forever
/* For now we set Last-Modified to Now() to leverage caching heuristics built into modern browsers:
* https://github.com/ipfs/go-ipfs/pull/8074#pullrequestreview-645196768
* https://github.com/ipfs/kubo/pull/8074#pullrequestreview-645196768
* but we should not set it to fake values and use Cache-Control based on TTL instead */
modtime = time.Now()
// TODO: set Cache-Control based on TTL of IPNS/DNSLink: https://github.com/ipfs/go-ipfs/issues/1818#issuecomment-1015849462
// TODO: set Cache-Control based on TTL of IPNS/DNSLink: https://github.com/ipfs/kubo/issues/1818#issuecomment-1015849462
// TODO: set Last-Modified based on /ipns/ publishing timestamp?
} else {
// immutable! CACHE ALL THE THINGS, FOREVER! wolololol
@ -679,7 +679,7 @@ func addCacheControlHeaders(w http.ResponseWriter, r *http.Request, contentPath
// Set modtime to 'zero time' to disable Last-Modified header (superseded by Cache-Control)
modtime = noModtime
// TODO: set Last-Modified? - TBD - /ipfs/ modification metadata is present in unixfs 1.5 https://github.com/ipfs/go-ipfs/issues/6920?
// TODO: set Last-Modified? - TBD - /ipfs/ modification metadata is present in unixfs 1.5 https://github.com/ipfs/kubo/issues/6920?
}
return modtime
@ -874,7 +874,7 @@ func getEtag(r *http.Request, cid cid.Cid) string {
// Etag: "cid.foo" (gives us nice compression together with Content-Disposition in block (raw) and car responses)
suffix = `.` + f + suffix
}
// TODO: include selector suffix when https://github.com/ipfs/go-ipfs/issues/8769 lands
// TODO: include selector suffix when https://github.com/ipfs/kubo/issues/8769 lands
return prefix + cid.String() + suffix
}
@ -957,10 +957,10 @@ func debugStr(path string) string {
}
func handleUnsupportedHeaders(r *http.Request) (err *requestError) {
// X-Ipfs-Gateway-Prefix was removed (https://github.com/ipfs/go-ipfs/issues/7702)
// X-Ipfs-Gateway-Prefix was removed (https://github.com/ipfs/kubo/issues/7702)
// TODO: remove this after go-ipfs 0.13 ships
if prfx := r.Header.Get("X-Ipfs-Gateway-Prefix"); prfx != "" {
err := fmt.Errorf("X-Ipfs-Gateway-Prefix support was removed: https://github.com/ipfs/go-ipfs/issues/7702")
err := fmt.Errorf("X-Ipfs-Gateway-Prefix support was removed: https://github.com/ipfs/kubo/issues/7702")
return newRequestError("unsupported HTTP header", err, http.StatusBadRequest)
}
return nil
@ -996,7 +996,7 @@ func handleProtocolHandlerRedirect(w http.ResponseWriter, r *http.Request, logge
}
// Disallow Service Worker registration on namespace roots
// https://github.com/ipfs/go-ipfs/issues/4025
// https://github.com/ipfs/kubo/issues/4025
func handleServiceWorkerRegistration(r *http.Request) (err *requestError) {
if r.Header.Get("Service-Worker") == "script" {
matched, _ := regexp.MatchString(`^/ip[fn]s/[^/]+$`, r.URL.Path)

View File

@ -7,8 +7,8 @@ import (
"net/http"
"time"
"github.com/ipfs/go-ipfs/tracing"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)

View File

@ -8,9 +8,9 @@ import (
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-ipfs/tracing"
coreiface "github.com/ipfs/interface-go-ipfs-core"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
gocar "github.com/ipld/go-car"
selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse"
"go.opentelemetry.io/otel/attribute"
@ -71,7 +71,7 @@ func (i *gatewayHandler) serveCAR(ctx context.Context, w http.ResponseWriter, r
// Same go-car settings as dag.export command
store := dagStore{dag: i.api.Dag(), ctx: ctx}
// TODO: support selectors passed as request param: https://github.com/ipfs/go-ipfs/issues/8769
// TODO: support selectors passed as request param: https://github.com/ipfs/kubo/issues/8769
dag := gocar.Dag{Root: rootCid, Selector: selectorparse.CommonSelector_ExploreAllRecursively}
car := gocar.NewSelectiveCar(ctx, store, []gocar.Dag{dag}, gocar.TraverseLinksOnlyOnce())

View File

@ -8,8 +8,8 @@ import (
"time"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/go-ipfs/tracing"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"

View File

@ -11,12 +11,12 @@ import (
"github.com/dustin/go-humanize"
cid "github.com/ipfs/go-cid"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/go-ipfs/assets"
"github.com/ipfs/go-ipfs/tracing"
path "github.com/ipfs/go-path"
"github.com/ipfs/go-path/resolver"
options "github.com/ipfs/interface-go-ipfs-core/options"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/assets"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"
@ -81,7 +81,7 @@ func (i *gatewayHandler) serveDirectory(ctx context.Context, w http.ResponseWrit
}
// See statusResponseWriter.WriteHeader
// and https://github.com/ipfs/go-ipfs/issues/7164
// and https://github.com/ipfs/kubo/issues/7164
// Note: this needs to occur before listingTemplate.Execute otherwise we get
// superfluous response.WriteHeader call from prometheus/client_golang
if w.Header().Get("Location") != "" {
@ -146,7 +146,7 @@ func (i *gatewayHandler) serveDirectory(ctx context.Context, w http.ResponseWrit
}
// construct the correct back link
// https://github.com/ipfs/go-ipfs/issues/1365
// https://github.com/ipfs/kubo/issues/1365
var backLink string = originalUrlPath
// don't go further up than /ipfs/$hash/

View File

@ -12,8 +12,8 @@ import (
"github.com/gabriel-vasile/mimetype"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/go-ipfs/tracing"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
@ -54,7 +54,7 @@ func (i *gatewayHandler) serveFile(ctx context.Context, w http.ResponseWriter, r
ctype = mime.TypeByExtension(gopath.Ext(name))
if ctype == "" {
// uses https://github.com/gabriel-vasile/mimetype library to determine the content type.
// Fixes https://github.com/ipfs/go-ipfs/issues/7252
// Fixes https://github.com/ipfs/kubo/issues/7252
mimeType, err := mimetype.DetectReader(content)
if err != nil {
http.Error(w, fmt.Sprintf("cannot detect content-type: %s", err.Error()), http.StatusInternalServerError)
@ -71,7 +71,7 @@ func (i *gatewayHandler) serveFile(ctx context.Context, w http.ResponseWriter, r
// Strip the encoding from the HTML Content-Type header and let the
// browser figure it out.
//
// Fixes https://github.com/ipfs/go-ipfs/issues/2203
// Fixes https://github.com/ipfs/kubo/issues/2203
if strings.HasPrefix(ctype, "text/html;") {
ctype = "text/html"
}

View File

@ -6,8 +6,8 @@ import (
"path"
"strings"
"github.com/ipfs/go-ipfs/assets"
ipfspath "github.com/ipfs/go-path"
"github.com/ipfs/kubo/assets"
)
// structs for directory listing

View File

@ -11,20 +11,20 @@ import (
"testing"
"time"
version "github.com/ipfs/go-ipfs"
core "github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreapi"
repo "github.com/ipfs/go-ipfs/repo"
namesys "github.com/ipfs/go-namesys"
version "github.com/ipfs/kubo"
core "github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"
repo "github.com/ipfs/kubo/repo"
datastore "github.com/ipfs/go-datastore"
syncds "github.com/ipfs/go-datastore/sync"
files "github.com/ipfs/go-ipfs-files"
config "github.com/ipfs/go-ipfs/config"
path "github.com/ipfs/go-path"
iface "github.com/ipfs/interface-go-ipfs-core"
nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
config "github.com/ipfs/kubo/config"
ci "github.com/libp2p/go-libp2p-core/crypto"
id "github.com/libp2p/go-libp2p/p2p/protocol/identify"
)

Some files were not shown because too many files have changed in this diff Show More