1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 11:12:21 +08:00

96 Commits

Author SHA1 Message Date
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
40a49c8399 Mounts detect unmounts and track mount state.
This lets FUSE mounts to track whether they are active or not by
tracking when fs.Serve terminates.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-07 19:54:59 -08:00
5a0b8023be Merge pull request #2256 from ipfs/feat/gx-libp2p
vendor libp2p with gx
2016-02-05 16:52:02 -08:00
e26c1fe60a Change sample API origin settings from wildcard to example.com
Resolves #2035

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@gmail.com>
2016-02-02 22:24:07 +01:00
2263539c1c do that last thing again
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 15:37:39 -08:00
c0101c0c4b update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 10:19:50 -08:00
3d0aa592ec go-keyspace dep from libp2p added
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:08 -08:00
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
38647fad92 Added small note about shutdown
See https://github.com/ipfs/go-ipfs/pull/2180#issuecomment-171889567

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-24 22:41:52 +00:00
rht
6cfc00e18b Merge pull request #2231 from rht/docs/punc-caps
Fix punc-caps issues of cli Tagline
2016-01-23 12:52:08 +07:00
rht
f5b8c7c4ef Merge pull request #2180 from ipfs/feature/shutdown
Edited following @chriscool feedback
2016-01-23 12:10:59 +07:00
rht
21e39240ab Fix punc-caps issues of cli Tagline
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-22 02:36:17 +07:00
6f222711d9 Added env var info to init, dameon help
See #1296

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-13 10:56:34 -05:00
48353a7036 Edited following @chriscool feedback
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-12 16:35:04 -05:00
dec4a72da1 Added a shutdown note to daemon dsec
Cf https://github.com/ipfs/support/issues/5

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-07 13:12:54 -05:00
rht
48a33ffb67 Add fixed period repo GC + test
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-11-10 14:03:29 +07:00
dd20f48454 daemon: instrument the gateway and api HTTP handlers
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-10-05 03:53:49 +02:00
c3e72377b2 write correct address to api file
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-25 15:34:54 -07:00
71d2ab1fc9 use already created config in daemon.go
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 18:20:18 -07:00
ab0c668ab8 fix panic caused by accessing config after repo closed
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 09:28:36 -07:00
8c652907de Merge pull request #1598 from ipfs/check-for-api
check for API -- WIP
2015-08-29 06:20:59 +02:00
94000e6490 replace nodebuilder with a nicer interface
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

use NewNode instead of NewIPFSNode in most of the codebase

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

make mocknet work with node constructor better

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

finish cleanup of old construction method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

blockservice.New doesnt return an error anymore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

break up node construction into separate function

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

add error case to default filling on node constructor

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-27 08:43:10 -07:00
5040fee906 implement support for --api option
This commit adds support for the --api option, which allows users
to specify an API endpoint to run the cli command against. It enables
much easier control of remote daemons.

It also
- ensures the API server version matches the API client
- implements support for the $IPFS_PATH/api file

Still TODO:
- tests!
- multiaddr to support /dns/

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-27 08:03:56 +02:00
a052087974 Merge pull request #1569 from rht/daemon-msg
Notify when daemon is ready
2015-08-23 05:11:27 +02:00
rht
dd99a70a7d Add readonly api to gateway
Based on https://github.com/ipfs/go-ipfs/pull/1389

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-15 17:08:59 +07:00
rht
35ab1e347b Notify when daemon is ready
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 09:51:52 +07:00
3f1cbe2f43 corehttp: add net.Listener to ServeOption
ServeOptions take the node and muxer, they should get the listener
too as sometimes they need to operate on the listener address.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
7cf5e87cfe Added API + Gateway support for arbitrary HTTP headers
This commit fixes + improves CORS support

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:09 -07:00
bb3a75aa08 remove context from context
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 20:53:06 -07:00
c4fb36b8c8 daemon help docs for CORS
Convey the basic idea, plus an example.  Don't encourage using `*`.

This would have saved me some code spelunking.
2015-07-02 18:06:58 -07:00
ed8d3ae388 api: add /metrics endpoint for prometheus
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-29 23:15:15 +02:00
e37fefdfd3 daemon option to optionally disable secio
This commit adds an option to turn off all encryption. This is a mode
used for tests, debugging, achieving protocol implementation interop,
learning about how the protocol works (nc ftw), and worst case
networks which _demand_ to be able to snoop on all the traffic.
(sadly, there are some private intranets like this...). (We should
consider at least _signing_ all this traffic.)

Because of the severity of this sort of thing, this is an
all-or-nothing deal. Either encryption is ON or OFF _fully_.
This way, partially unencrypted nodes cannot be accidentally left
running without the user's understanding. Nodes without encrypted
connections will simply not be able to speak to any of the global
bootstrap nodes, or anybody in the public network.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
9716018ca5 daemon output includes swarm addresses
daemon output now includes initial swarm addresses. this is not a
full solution, as a change in network will not trigger re-printing.
We need a good way to do that.

This made me re-think how we're outputting these messages, perhaps
we should be throwing them as log.Events, and capturing some with
a special keyword to output to the user on stdout. Things like
network addresses being rebound, NATs being holepunched, external
network addresses being figured out, connections established, etc
may be valuable events to show the user. Of course, these should be
very few, as a noisy daemon is an annoying daemon.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
6211ee46c2 close channels and allow daemon to shutdown
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-19 22:40:38 -07:00
a676b5a8ac move eventlogs to an http endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
4b337bb7e8 daemon: addressed CR comments 2015-06-08 11:08:10 +02:00
07b3415cdb http endpoints: dont print before listen
also splits api, gw and fuse bring up into helper functions
2015-06-08 10:56:05 +02:00
e82e5cd87e fix typo 2015-06-06 13:42:54 -07:00
30f674af0e Add option to allow unrestricted API access 2015-05-10 22:25:36 +02:00
c24f421bff Add Go runtime metrics to expvar 2015-05-01 10:51:14 -07:00
df70fe4ac7 Serve expvars and pprof on the API port 2015-05-01 10:50:44 -07:00
3d80b9d27d refactored ipns records to point to paths
Also changed the ipns dns resolution to use the "dnslink" format
2015-04-26 22:32:12 -07:00
bfd12114e7 Remove daemon InitDone guard in interrupt handler
Instead of just terminating right there and then, we cancel the
context, and let the daemon exit cleanly. This make take a few
seconds, as the node builder and its child processes do not
care too much about the context state while building nodes,
but this can be improved by injecting checks for ctx.Done()
before time-consuming steps.
2015-04-20 16:35:35 +02:00
cf6a268cd3 Handle ipfs command interruption by cancelling the command context
Instead of assuming the command is the daemon command and closing
the node, which resulted in bugs like #1053, we cancel the context
and let the context children detect the cancellation and gracefully
clean up after themselves.

The shutdown logging has been moved into the daemon command, where
it makes more sense, so that commands like ping will not print out
the same output on cancellation.
2015-04-20 16:35:35 +02:00
c419a489e1 make ipfs understand the new migration 2015-04-20 02:26:33 -07:00
f3fbedf312 no longer worry about moving key out of config file 2015-04-20 02:25:41 -07:00
140cd1fd1b remove debugerrors
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.

It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
2015-04-20 00:35:35 -07:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
fdd1cd8dc0 Remove fsrepo.At, make Open a constructor function
Nobody calls At without immediately calling Open.

First step, a mechanical transformation. Cleanups will follow.
2015-03-13 20:19:03 -07:00
d23bed5baa Rename ContextIsReadyToBeClosed to InitDone 2015-03-12 11:42:07 +02:00