Commit Graph

1302 Commits

Author SHA1 Message Date
Stephen Whitmore
e61e685833 redundency-be-gone
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:32:16 -07:00
Stephen Whitmore
7e88f83f74 Revert "mfs.Mkdir returns the final Directory it creates"
This reverts commit dfd98f27b2.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:30:09 -07:00
Stephen Whitmore
8fcb585cfb Removes write flag from Finalize
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:03:11 -07:00
Stephen Whitmore
6588bbc988 More thorough error checking.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:03:11 -07:00
Stephen Whitmore
6b0ff2bd78 Output dirs on ipfs add -rn
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:03:11 -07:00
Stephen Whitmore
dfd98f27b2 mfs.Mkdir returns the final Directory it creates
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:03:11 -07:00
Jeromy Johnson
8d7117f55a Merge pull request #2549 from ipfs/datastore-config
repo: properly init Datastore config, and leave it be
2016-04-12 10:41:20 -07:00
Lars Gierth
caec086c28 metrics: add prometheus back
With a proper IpfsCollector object and tests, this time.
The collector object makes it easy to add further metrics,
like e.g. bitswap wants/provs.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-11 19:33:16 -07:00
Lars Gierth
a79907b7c1 repo: properly init Datastore config, and leave it be
We didn't previously initialize the Datastore config section.
The respective function exists, but was dead code up until now.

This lead to weird decisions like the GC code deciding on defaults,
and writing these to the config file. Don't want GC to touch the config.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-11 16:21:14 -07:00
Jeromy
bdc5456d52 update libp2p dep to fix hanging listeners problem
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-11 12:52:54 -07:00
Stephen Whitmore
c89723d316 Adds files api cmd to helptext
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-08 12:33:00 -07:00
Jeromy
00e4472dff Remove debug log
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-08 11:23:21 -07:00
Jeromy
c5b2e09708 test for the dht key escaping
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-08 11:23:21 -07:00
Jeromy
65c66fd09b fix dht command key escaping
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-08 11:23:21 -07:00
Jeromy
8f3a51ac42 switch to new libp2p with mss crypto
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 15:55:41 -07:00
Jeromy Johnson
ae3fed721f Merge pull request #2520 from slothbag/sloth_b64_fix
Add option to decode 'Data' field as base64
2016-04-04 20:00:25 -07:00
Lars Gierth
09937f84b6 gateway: enforce allowlist for path prefixes
The gateway accepts an X-Ipfs-Path-Prefix header,
and assumes that it is mounted in a reverse proxy
like nginx, at this path. Links in directory listings,
as well as trailing-slash redirects need to be rewritten
with that prefix in mind.

We don't want a potential attacker to be able to
pass in arbitrary path prefixes, which would end up
in redirects and directory listings, which is why
every prefix has to be explicitly allowed in the config.

Previously, we'd accept *any* X-Ipfs-Path-Prefix header.

Example:

We mount blog.ipfs.io (a dnslink page) at ipfs.io/blog.

nginx_ipfs.conf:

    location /blog/ {
        rewrite "^/blog(/.*)$" $1 break;
        proxy_set_header Host blog.ipfs.io;
        proxy_set_header X-Ipfs-Gateway-Prefix /blog;
        proxy_pass http://127.0.0.1:8080;
    }

.ipfs/config:

    "Gateway": {
        "PathPrefixes": ["/blog"],
        // ...
    },

dnslink:

    > dig TXT _dnslink.blog.ipfs.io
    dnslink=/ipfs/QmWcBjXPAEdhXDATV4ghUpkAonNBbiyFx1VmmHcQe9HEGd

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-04 16:31:57 -04:00
slothbag
bd5e08ca9b datafieldenc switch statement
License: MIT
Signed-off-by: slothbag <slothbag@gmail.com>
2016-04-04 13:21:39 +10:00
slothbag
edf0bb0544 Tidy up object put cmd defaults
License: MIT
Signed-off-by: slothbag <slothbag@gmail.com>
2016-04-04 13:09:22 +10:00
slothbag
903a4851b7 Add option to decode 'Data' field as base64
License: MIT
Signed-off-by: slothbag@gmail.com <slothbag@gmail.com>
2016-04-04 12:55:27 +10:00
Steven Allen
f15abc223c use the builtin option parser to set the default for ipfs pin ls --type
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2016-03-30 20:00:40 -04:00
Steven Allen
ef4e8837c6 change ipfs pin response field name from Pinned to Pins
This way, we don't claim to pin when unpinning.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2016-03-30 20:00:40 -04:00
Jeromy
9f75ac4d75 update utp and cleanup more godeps along the way
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-29 19:18:14 -07:00
Michael Muré
c88e46cb52 clean deprecated Key.Pretty()
License: MIT
Signed-off-by: Michael Muré <batolettre@gmail.com>
2016-03-25 12:05:45 +01:00
Jeromy Johnson
2b6da0c024 Merge pull request #2471 from ipfs/feature/alphabetize-object
Alphabetized object subcommands
2016-03-21 19:44:31 -07:00
Richard Littauer
5f0c997504 Edited the grammar for diag
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-18 17:12:45 -04:00
Richard Littauer
c692286b41 Alphabetized subcommands
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-15 13:23:22 -04:00
dignifiedquire
c0ec80215e feat: Update the webui to work with the latest changes in 0.4
License: MIT
Signed-off-by: dignifiedquire <dignifiedquire@gmail.com>
2016-03-14 20:49:18 +01:00
Jeromy Johnson
286a5968c5 Merge pull request #2430 from diasdavid/feat/repo-stat
Feature: `ipfs repo stat`
2016-03-11 12:51:11 -08:00
Jeromy
97d583dd8f update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-09 09:53:19 -08:00
David Dias
c10e329b78 repo-stat
License: MIT
Signed-off-by: David Dias <daviddias.p@gmail.com>
2016-03-04 23:45:03 +00:00
Jeromy Johnson
91c6f0f3db Merge pull request #2359 from mildred/ipld
Simplify merkledag package interface to ease IPLD inclusion
2016-03-04 12:02:37 -08:00
Jeromy
767ee13ea2 add default option value support to commands lib
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-04 10:58:27 -08:00
Mildred Ki'Lya
b3c9922c7b merkledag: Remove unused AddRecursive and RemoveRecursive
License: MIT
Signed-off-by: Mildred Ki'Lya <mildred-pub.git@mildred.fr>
2016-03-04 07:48:34 +01:00
Lars Gierth
89b233e360 dns: update dns command docs
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-03-03 17:06:10 +01:00
Stephen Whitmore
1ee3645a49 adds tests for gateway url escaping
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-03-02 16:46:49 -08:00
Adrian Ulrich
ec7623bb81 Use net/url to escape paths in web-ui
License: MIT
Signed-off-by: Adrian Ulrich <adrian@blinkenlights.ch>
2016-03-02 15:46:58 -08:00
Richard Littauer
96204b5ef5 Fix spelling error
My bad. Introduced in #2366

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-02 18:03:24 -05:00
Thomas Gardner
288f7bc621 Humanize byte size
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
2016-03-02 08:08:22 +00:00
Thomas Gardner
f988a54c1b repo stat: add Type
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
2016-03-02 08:07:56 +00:00
Thomas Gardner
bb9904bde1 repo: add ipfs repo stat command
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
2016-03-02 08:07:56 +00:00
Jeromy Johnson
a551991122 Merge pull request #2424 from ipfs/docs/dns-resolve-default
Add default to dns resolve
2016-03-01 22:57:01 -08:00
Jeromy Johnson
d2b9ff4964 Merge pull request #2422 from ipfs/docs/config-add-as
Added an `as` to ensure good English
2016-03-01 16:35:31 -08:00
Jeromy Johnson
922dc201a3 Merge pull request #2423 from ipfs/docs/files-read-add-byte
Change language for files read slightly
2016-03-01 12:52:58 -08:00
Richard Littauer
8cce0aa1f7 Add default to dns resolve
See https://github.com/ipfs/http-api-spec/pull/41#discussion_r53164737

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-01 15:17:02 -05:00
Richard Littauer
0d89ae29eb Change language for files read slightly
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-01 14:10:58 -05:00
Richard Littauer
512b25c0cd Added an as to ensure good English
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-01 14:06:36 -05:00
Richard Littauer
7227386b8b Remove period from dns text examples
It is not useful. See https://github.com/ipfs/http-api-spec/pull/41#discussion_r53482505

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-03-01 13:59:09 -05:00
Mildred Ki'Lya
67c59d871e Rename Decoded into DecodeProtobuf
This function work only with protocol buffer encoding. To make this clear,
rename the function.

License: MIT
Signed-off-by: Mildred Ki'Lya <mildred-pub.git@mildred.fr>
2016-03-01 09:01:51 +01:00
Mildred Ki'Lya
5808fe2edd Remove usage of merkledag.Link.Node pointer outside of merkledag
This prepares for inclusion of IPLD where the Node pointer won't be there.

License: MIT
Signed-off-by: Mildred Ki'Lya <mildred-pub.git@mildred.fr>
2016-03-01 08:59:44 +01:00