Commit Graph

52 Commits

Author SHA1 Message Date
Jeromy
c419a489e1 make ipfs understand the new migration 2015-04-20 02:26:33 -07:00
Jeromy
f3fbedf312 no longer worry about moving key out of config file 2015-04-20 02:25:41 -07:00
Juan Batiz-Benet
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
Ho-Sheng Hsiao
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
Tommi Virtanen
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
Konstantin Koroviev
d23bed5baa Rename ContextIsReadyToBeClosed to InitDone 2015-03-12 11:42:07 +02:00
Konstantin Koroviev
afd497e194 Dirty hack to fix race conditions in the daemon 2015-03-09 16:39:41 +02:00
anarcat
5cdd8b5d61 expand the ports documentation
i took @jbenet's suggestion, but reorganised it a bit to *not* suggest what is actually warned against later. :)
2015-03-07 08:42:30 -05:00
anarcat
fb8a1ab161 document how to change daemon ports
this more clearly explains that the daemon is listening on the network. it also hints as to how to change the listening ports. this is also related to #874
2015-03-07 08:24:59 -05:00
Juan Batiz-Benet
25f042ce36 daemon: consolidate writable gway line 2015-03-04 08:17:54 -08:00
Henry
56a32a306c using pollEndpoint to block in tests for 'daemon ready' (updates #844) 2015-03-04 14:50:17 +01:00
Jeromy
69e09d40c5 add version info endpoint to gateway 2015-02-20 11:49:48 -08:00
Brian Tiger Chow
c0ca02486b fix(corerouting) pass transport addr 2015-02-15 04:41:18 -08:00
Brian Tiger Chow
2a322ad7fb feat(daemon) learns --routing=supernode 2015-02-15 04:41:18 -08:00
Brian Tiger Chow
bea4ed78d5 feat(cmd/daemon) add --gcr option to run GCR routing client 2015-02-15 04:41:17 -08:00
Juan Batiz-Benet
247649969e Merge pull request #726 from kevinwallace/gateway_hostname
gateway: attempt to resolve hostname to ipfs path
2015-02-12 18:52:16 -08:00
Jeromy
7a2545a14b implement nodebuilder 2015-02-11 21:47:07 +00:00
Kevin Wallace
084cdc3ed8 gateway: attempt to resolve hostname to ipfs path
This allows someone to host a static site by pointing a TXT record at their
content in IPFS, and a CNAME record at an IPFS gateway.

Note that such a setup technically violates RFC1912 (section 2.4; "A CNAME
record is not allowed to coexist with any other data."), but tends to work in
practice.

We may want to consider changing the DNS->IPFS resolution scheme to allow this
scenario to be RFC-compliant (e.g. store the mapping on a well-known subdomain
to allow CNAME records on the domain itself).

License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 11:27:06 -08:00
Brian Tiger Chow
1d01c0354f refactor(cmd/daemon) more compact representation!
exposed the Decider to make configuration nicer @mappum
2015-02-06 08:14:14 -08:00
Brian Tiger Chow
4bc2713a28 more compact respresentation 2015-02-06 08:13:15 -08:00
Juan Batiz-Benet
64a4c27913 corehttp: allow all webui paths we published.
Otherwise we break users links! cc @mappum
2015-02-06 07:30:42 -08:00
Matt Bell
b1ca07d6c5 core/corehttp: Added gateway path whitelisting 2015-02-04 18:46:54 -08:00
Brian Tiger Chow
951ff4f747 repo is owned by node, so close the node 2015-02-01 21:54:17 -08:00
Brian Tiger Chow
cbed858993 use plain-old core.IPFSNode constructor in daemon command
fix(cmd/daemon) set node on req context since it expects daemon to be
present when handling commands over the API

@jbenet revenge of the request context redux
2015-02-01 21:53:45 -08:00
Juan Batiz-Benet
c372255807 daemon: fix output + time waiting 2015-02-01 04:29:32 -08:00
Juan Batiz-Benet
f1d34a2a85 test/sharness: fix errors
- core: daemon stdout print to cmd + daemon init checks
- core: fixed bug where the gateway was printed as "API"
- sharness/test-lib: daemon init checks
- sharness/test-lib: portable TCP port check
- sharness/init: fix test bits output
- sharness: use common hashes in one place.
- move t0100-http-gateway -> t0111-gateway-writable
- sharness: test-lib funcs for gateway config
- sharness/t0111-gateway-writable: use sh funcs
- sharness/t0111-gateway-writable: fixes
  - escape all vars (always `cmd "$VAR"` never `cmd $VAR`)
  - use $FILEPATH, not $path
  - last test seems to fail
2015-01-31 22:54:34 -08:00
Mildred Ki'Lya
7d09da3c8b Make gateway read-only by default and add option to make it writable 2015-01-31 23:36:45 +01:00
Juan Batiz-Benet
73234479fa init docs: go generated welcome dir + files
updated sharness hashes
2015-01-31 07:51:30 -08:00
Matt Bell
7c5b276179 cmd/ipfs: daemon: Added root redirect handler to corehttp options (for both gateway and API) 2015-01-28 16:01:42 -08:00
Juan Batiz-Benet
76d9d89aff user friendliness in logs + output 2015-01-26 17:01:00 -08:00
Brian Tiger Chow
4b78b535b6 perform multiaddr conversion in the function 2015-01-24 01:37:03 -08:00
Brian Tiger Chow
e9d3c9828c perform multiaddr conversion in the function 2015-01-24 01:32:27 -08:00
Matt Bell
7b4de230eb commands: Refactored Command#Run function signature to (req Request, res Response) 2015-01-23 18:29:29 -08:00
Brian Tiger Chow
fadedf9e68 refactor(core) extract corehttp package
PACKAGE DOCUMENTATION

package corehttp

    FUNCTIONS

    func GatewayOption(n *core.IpfsNode, mux *http.ServeMux) error

    func ListenAndServe(n *core.IpfsNode, addr ma.Multiaddr, options
    ...ServeOption) error

    func WebUIOption(n *core.IpfsNode, mux *http.ServeMux) error

    TYPES

    type ServeOption func(*core.IpfsNode, *http.ServeMux) error

    func DaemonOption(cctx commands.Context) ServeOption
2015-01-22 01:08:59 -08:00
Brian Tiger Chow
40e41d24f7 feat(fsrepo): protect with a repo lockfile
NB: daemon is one spot the repo lock is typically acquired
2015-01-14 03:02:23 -08:00
Juan Batiz-Benet
cac7e025b8 daemon: log error from gateway 2015-01-12 01:31:59 -08:00
Juan Batiz-Benet
4afb4e090f daemon gateway async 2015-01-12 01:14:32 -08:00
Juan Batiz-Benet
2c83cd5627 daemon: only try gateway addr if there 2015-01-12 01:05:15 -08:00
Juan Batiz-Benet
ed41ac27fd daemon: refactor common parts of serve funcs 2015-01-12 01:01:21 -08:00
Matt Bell
f39f3fe432 cmd/ipfs: Redirect requests to /webui to webui app 2015-01-11 22:15:33 -08:00
Matt Bell
e25b08231c cmd/ipfs: Renamed 'ipfsHandler' to 'gatewayHandler' 2015-01-11 22:15:33 -08:00
Matt Bell
cb84a376bd cmd/ipfs: Added an ipfsHandler constructor 2015-01-11 22:15:33 -08:00
Simon Kirkby
32823d2085 Static Website serving and listing
adds
 trailing slash redirection
 index.html return
 templated directory listing

Signed off : Simon Kirkby <tigger@interthingy.com>
2015-01-11 22:15:33 -08:00
Matt Bell
9119435cb6 cmd/ipfs: Added gateway server to daemon 2015-01-11 22:15:32 -08:00
Juan Batiz-Benet
cf62f63b58 better daemon + main exit semantics 2015-01-04 00:47:27 -08:00
Juan Batiz-Benet
e21b1f662b fuse mount lifecycle fixes
This commit cleans up how mounting was being done.
It now successfully signals when it is properly mounted
and listen to close signals correctly.
2015-01-04 00:47:27 -08:00
Matt Bell
706ebe8d24 daemon: Set allowed API origins in API_ORIGIN environment variable 2014-11-25 06:12:35 -08:00
Jeromy
34da5f039c log formatting (info -> infof) 2014-11-21 03:54:26 +00:00
Juan Batiz-Benet
43452fdeb7 updated multiaddr + multiaddr-net
I broke out multiaddr/net to its own package so
that multiaddr parsing could remain lean. multiaddr-net
will vendor special implementations of protocols (like utp)
2014-11-20 00:58:48 -08:00
Juan Batiz-Benet
a7d1fd42d8 updating daemon addr output 2014-11-18 08:19:25 -08:00