Commit Graph

3544 Commits

Author SHA1 Message Date
Steven Allen
a006ded010 chore: update webui to 2.12.1 2021-04-28 11:00:45 -07:00
Luflosi
b3f054f450
Fix typo in comment 2021-04-22 20:30:41 +02:00
Steven Allen
fb4542b9c8
Merge pull request #8069 from ipfs/fix/remove-hardcoded-hostnames
fix(gw): remove hardcoded hostnames
2021-04-13 15:24:00 -07:00
Marcin Rataj
9f8964e6f9
fix(gw): remove hardcoded hostnames
This closes #7317 by removing hardcoded PL hostnames from default
config, making the localhost the only implicit gateway hostname.
2021-04-12 18:03:44 +02:00
Steven Allen
c4b6366536 fix: update root help
* move the `cid` command to the "datastructures" section.
* document bitswap & pubsub commands

fixes #8047
2021-04-05 16:31:40 -07:00
gammazero
8eefcce4a1 Add info to "pin rm" help about how to tell if a pin is indirectly pinned.
Addresses issue #7440
2021-04-01 18:33:18 -07:00
Steven Allen
4cdb67f37d
Merge pull request #7890 from ipfs/fix/remove-clear-site-data
fix(gw): remove use of Clear-Site-Data in subdomain router
2021-03-31 16:24:24 -07:00
Steven Allen
cc54ba1109
Merge pull request #8010 from ipfs/docs/cosmetic-fixes
docs: cosmetic fixes of help text
2021-03-30 15:52:38 -07:00
Steven Allen
0a3f88823c
Merge pull request #7994 from ipfs/chore/deprecate-pathprefixes
chore: deprecate Gateway.PathPrefixes
2021-03-30 15:52:02 -07:00
Marcin Rataj
090953d298
docs: tweak ipfs cmd help
https://github.com/ipfs/go-ipfs/pull/8010#discussion_r600842235
https://github.com/ipfs/go-ipfs/pull/8010#discussion_r600842123
2021-03-30 21:26:32 +02:00
Marcin Rataj
2f105f79b9
chore: deprecate Gateway.PathPrefixes
Context:
https://github.com/ipfs/go-ipfs/issues/7702#issuecomment-803136077
2021-03-30 21:17:41 +02:00
Steven Allen
99309df9e1
Merge pull request #7883 from ipfs/chore/pin-ls-all-faster
Do not fetch recursive pins from pinner unnecessarily
2021-03-29 16:04:37 -07:00
gammazero
fb55f09882 Add comment about reading until channel closed 2021-03-29 15:11:38 -07:00
Adin Schmahmann
e5147d6f5a
Merge pull request #7973 from ipfs/fix/7957
fix: return an error if repo verify is canceled
2021-03-24 15:30:19 -07:00
Steven Allen
d30f1e5d44
Merge pull request #7930 from ipfs/fix/redundant-ns-on-gateway
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
2021-03-24 13:12:16 -07:00
Marcin Rataj
f91411362b
docs: ipfs object only works with dag-pb
Closes #7396
2021-03-24 20:49:50 +01:00
Marcin Rataj
5fad09909f
docs: suggest dag/files cmds in place of object
This is a cosmetic change to 'ipfs --help' that
reorders operations to prioritize 'dag' and 'files' over legacy 'object'.

Context: https://github.com/ipfs/go-ipfs/issues/7936
2021-03-24 18:13:31 +01:00
Marcin Rataj
0ff1cf33aa
docs: cosmetic fixes of help text
Unfortunately, API docs are genereted from go-ipfs sources
via https://github.com/ipfs/http-api-docs
so it all gets lost when API docs for new version are re-generated.

This re-applies manual fixes from:
https://docs.ipfs.io/reference/http/api/
so the next time http-api-docs are re-generated, those changes stay.
2021-03-24 17:41:14 +01:00
Hector Sanjuan
e7ddd3894b Fix: innacuracies in MFS command documentation.
These also end up in API docs.
2021-03-22 19:42:04 +01:00
Marcin Rataj
763a120ed2
fix: no fixup if X-Ipfs-Gateway-Prefix is present
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r597976690
2021-03-20 00:00:58 +01:00
Marcin Rataj
a35ffee136
refactor: safer query handling
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r597246135
2021-03-18 23:48:53 +01:00
Marcin Rataj
450baef0e9
refactor: explicit prefix check
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r584001161
2021-03-18 21:48:04 +01:00
Marcin Rataj
b81b7549d3
refactor: addressing review
- moved to separate utility function
- return Bad Request error
- improved escaping of values passed via URL path
2021-03-18 21:22:07 +01:00
lanzafame
4ba03fa8df revert registration of metrics against unexposed prom registry 2021-03-17 10:15:42 +10:00
Adin Schmahmann
3393b4a39e
Merge pull request #7925 from ipfs/feat/extract-namesys
Extract the namesys and the keystore submodules
2021-03-14 13:34:59 -04:00
Hector Sanjuan
3db9551f79 Extract the namesys and the keystore submodules
Namesys is a very useful submodule. Given a ValueStore and a Datastore it can
resolve and publish /ipns/ paths.

This functionality does not need to be sequestered inside go-ipfs as it can
and should be used without IPFS, for example, for implementing lightweight
IPNS publishing services or for resolving /ipns/ paths.

"keystore" extraction was necessary, as there is a dependency to it in
namesys. Keystore is also a useful module by itself within the stack.

Fixes #6537
2021-03-12 14:09:36 -05:00
Steven Allen
98ee5abe5f fix: return an error if repo verify is canceled
fixes #7957
2021-03-11 11:20:47 -08:00
Will Scott
6e2b166773
split core/commands/dag into individual files for different subcommands 2021-03-10 12:14:50 -08:00
Marcin Rataj
dae7387584
refactor: show error, delay redirect
This implements error page that does not hide the problem,
but still redirects to a valid path after short delay:
https://github.com/ipfs/go-ipfs/pull/7930#issuecomment-786882748
2021-02-27 00:57:05 +01:00
Steven Allen
b94b4b2aa8
Merge pull request #7942 from ipfs/fix/pin-ls-err
fix: correctly return pin ls errors
2021-02-25 14:17:47 -08:00
Steven Allen
ccc2d23730 feat: remove secio support
We've had a reliable and enabled by default TLS implementation since
0.4.23 (over a year ago) and turned off SECIO in September of last year.
We might as well remove support entirely in the next release and
encourage users to upgrade their networks.

Noise is faster, anyways.
2021-02-25 13:36:40 -08:00
Adin Schmahmann
83d94d26d9
fix: correctly return pin ls errors 2021-02-25 15:56:18 -05:00
Marcin Rataj
15e3732afd
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
This will try to recover from invalid paths like  /ipfs/ipfs/{cid}
and redirect to proper one, when possible.
2021-02-20 00:09:17 +01:00
Daniel Martí
17d533909b all: gofmt -s
This "simplify" flag mainly removes redundant types in expressions.

Not particularly important, but a nice change that also makes gopls not
show warnings.
2021-02-05 14:26:08 +00:00
Marcin Rataj
d61ae2bcb4
fix: remove use of Clear-Site-Data
We used Clear-Site-Data to cushion transition period for local gateway
exposed at http://localhost while we were still figuring out
security-related details.

In the final implementation subdomain gateways are not tied to a
hostname explicitly, which removes the risk of cookies leaking,
removing the need for the header.

Turns out it causes issues for Firefox users, so let's just remove it.

Closes https://github.com/ipfs-shipyard/ipfs-companion/issues/977
2021-01-29 22:08:16 +01:00
Petar Maymounkov
8794928c31
add remote pinning policy for mfs (#7798)
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
Andrew Gillis
6f6f04543b
Improve error message when running key command that locks repo (#7821)
* Improve error message when running key commands that must be run when the daemon is not already running

Fixes Issue #7814

`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.

While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.

This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.

* Added more `ipfs key` command tests

When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
Adin Schmahmann
3e7a105676
Merge pull request #7887 from ipfs/docs/clarify-repeated-options
docs: comma delimited options in pin remote --help
2021-01-28 13:31:24 -05:00
Marcin Rataj
3bca93787a
docs: comma delimited options in pin remote --help
This adds clarification suggested in
https://github.com/ipfs/go-ipfs/pull/7823#pullrequestreview-577889138
2021-01-28 17:23:46 +01:00
Adin Schmahmann
61f3a2f3a2 fix: restrict remote pinning service endpoint URIs to HTTP/HTTPS 2021-01-27 19:28:58 -05:00
Marcin Rataj
fc4095cfb3 refactor: url → endpoint
https://github.com/ipfs/go-ipfs/pull/7828#discussion_r543520089
2021-01-27 19:28:58 -05:00
Marcin Rataj
7313a45bc7 fix: url.RawFragment does not work in go1.14
I don't think we need to worry about #hash, so just removed it
2021-01-27 19:28:58 -05:00
Marcin Rataj
6851ede8eb refactor: normalization with path.Clean 2021-01-27 19:28:58 -05:00
Marcin Rataj
5f692a76de fix: normalize remote service endpoint
Closes #7826
2021-01-27 19:28:54 -05:00
Marcin Rataj
0b6912e3b3 refactor: cleanup arg params 2021-01-27 23:55:09 +01:00
Marcin Rataj
1cb90d7109 docs: pin remote readability
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
2021-01-27 23:55:07 +01:00
Marcin Rataj
3b82dd8e55 docs: CLI docs for pin remote commands
This adds docs in form of longer description that is displayed
when --help is passes on the CLI.

While at it, unified some language to match fields in the config file
and other places + included some tips and best practices which should
improve onboarding experience.
2021-01-27 23:53:41 +01:00
gammazero
07aa00dfa6 Do not fetch recursive pins from pinner unnecessarily
When fetching all pins, the recursive pins are fetched from the pinner two times.  The second fetch is unnecessary and copies all recursive pins into a slice again.

Additionally, the output channel is now buffered.  This allows the goroutine to exit in the case the pinner returns an error and there is no reader for the output channel.  This might be possible if a canceled context causes the caller to abandon waiting to read the output of Ls().
2021-01-27 10:17:53 -08:00
Adin Schmahmann
a95a86ed54 feat: ipfs pin remote ls commands are comma delimited on the CLI only 2021-01-27 12:07:44 -05:00
Adin Schmahmann
7588a6a52a
Merge pull request #7829 from ipfs/fix/pin-remote-service-ls-json
fix: remote services ls always return a list
2021-01-14 17:37:40 -05:00