Prompt on init and skip the prompt in init -f (and not have a -y flag)
This would be in line with other state subcommands which ask by default
and -f skips the prompt.
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
This modifies the Makefile so that gx and gx-go downloads are first
attempted from the local ipfs gateway (127.0.0.1:8080) and then
from the offical gateway (ipfs.io).
Make and wget doesn't work well dealing with stuff in subfolders,
so I have moved deptools-related rules to the deptools folder in its own
Makefile.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
By default, CORS headers allowing GET requests from everywhere are
set. This should facilitate the IPFS Web UI integration with the
Cluster API.
This commit refactors the sendResponse methods in the API, merging
them into one as it was difficult to follow the flows that actually
send something to the client. All tests now check the presence of
the configured headers too, to make sure no route was missed.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
In the snap-installed distribution, calls like `ipfs-cluster-ctl add myfile.txt` fail with error `Error: open myfile.txt: permission denied` due to strict confinement to files in the /snap folder. Modifying confinement to `classic` will allow access to files elsewhere on the system.
License: MIT
Signed-off-by: brianmcmichael <brian@brianmcmichael.com>
Adding more missing pieces in config
Use the right package(not the inbuilt one)
Setup rpc client for proxy in the cluster
Add back SetClient and Shutdown into Connector as they are required to
implement Component interface
Add `ipfsproxy` as into list of logging identifier and add its default
log level
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
Go through `ipfshttp` repo and remove unnecessary proxy related code
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
Go through `ipfsproxy` repo and change things that are inappropriate
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
Extract the IPFS Proxy from ipfshttp and make it an api module
The `ipfshttp` IPFSConnector implementation includes the so called IPFS
Proxy. An endpoint which offers an IPFS API, hijacking some interesting
requests and forwarding the rest to the ipfs daemon.
`ipfshttp` should contain an implementation of IPFSConnector whose only
task should be to talk to IPFS
A new module should be created, `api/ipfsproxy`, an API Component
implementation for Cluster. The whole proxy code should be moved here.
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
This straigthens some mistakes with the outputs of the /add endpoints.
Currently, we had exactly the same output format which:
* was not exactly the ipfs API output format but was sort of similar
* made some weird concessions to be compatible (like having a string-type "size")
* was not aligned with Cluster API conventions (lowercase keys)
This corrects all this:
* The Cluster API /add output format now uses the right types and lowercase keys.
* `Hash` is now `Cid`, because the field carries a Cid.
* We copy error handling with request trailers from IPFS, and avoid carrying the
errors in the output objects.
* The proxy now returns exactly the types as ipfs would
* We add the X-Chunked-Output: 1 header, which is custom and redundant, but
otherwise breaks js-ipfs-api integrations with the /add endpoint.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
When we increased the default concurrency setting
we forgot the tests are for ConcurrentPins=1.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>