1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 03:19:47 +08:00

4637 Commits

Author SHA1 Message Date
5cced6f21a t0051: check json i/o
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-08-24 23:13:55 +02:00
e4a0a3bfcb t0051: add UTF-8 test file
This new file comes from:

https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt

It is licensed under CC BY 4.0.

After discussing that with its author, I think it is ok to
add it as is to our repository. The only restriction might
be that we should indicate in the file any change we make
to it.

License: CC BY 4.0
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-08-24 23:05:48 +02:00
4cef86298e Merge pull request #1595 from ipfs/hotfix-venodr
fix master: make vendor
2015-08-20 18:22:56 +02:00
941e0769ed fix master: make vendor
blame: @whyrusleeping on ed4274c9b75b513672fa674884a5df2cdb45276c

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-20 18:15:59 +02:00
3dfe02aa95 Merge pull request #1577 from lgierth/gateway-host-header
gateway: make IPNSHostname work on responses too
2015-08-19 05:50:05 +02:00
d1dd53bde0 Merge pull request #1587 from rht/feat/read-only-api-gateway
Add test for readonly gateway api sanitation
2015-08-19 05:49:00 +02:00
0634f98da4 Merge pull request #1588 from ipfs/version-bump
bump development version
2015-08-19 02:22:56 +02:00
e9bedb1aef bump development version
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-18 15:45:14 -07:00
09d7501724 gateway: make IPNSHostname complete
IPNSHostnameOption() touches the URL path only on the way in,
but not on the way out. This commit makes it complete by
touching the following URLs in responses:

- Heading, file links, back links in directory listings
- Redirecting /foo to /foo/ if there's an index.html link
- Omit Suborigin header

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-08-17 15:39:19 +02:00
a3a10a4bc1 gateway: bring back TestGatewayGet test
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-08-17 15:27:13 +02:00
rht
90b6490a35 Add test for readonly gateway api sanitation
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-17 15:07:31 +07:00
d07bf89988 Merge pull request #1563 from ipfs/dag-diff
implement a basic DAG diffing algorithm
2015-08-17 04:50:32 +02:00
49dab68bfc Merge pull request #1568 from ipfs/fix/dht-commands
use correct context for dht notifs
2015-08-17 04:38:05 +02:00
e10e711a19 Merge pull request #1583 from rht/feat/read-only-api-gateway
Readonly gateway API fix
2015-08-17 04:36:54 +02:00
ee54f87411 Merge pull request #1579 from heems/nonerouter
Add router that does nothing for bitswap_wo_routing test
2015-08-17 04:32:27 +02:00
d140b8aae1 Add router that does nothing for bitswap_wo_routing test
License: MIT
Signed-off-by: Karthik Bala <karthikbala444@gmail.com>
2015-08-16 16:42:08 -07:00
rht
916f987de2 Sanitize readonly refs
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-16 07:21:10 +07:00
rht
e4dbec59cf Show readonly commands in gateway readonly API
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-16 07:03:25 +07:00
fbac82046d Merge pull request #1581 from rht/feat/read-only-api-gateway
Add readonly api to gateway
2015-08-15 12:25:34 +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
4433c30ef2 Merge pull request #1575 from ipfs/blockservice-no-err
blockservice.New doesnt need to return an error
2015-08-15 06:47:23 +02:00
7789077dbd Merge pull request #1076 from zorun/fix-listen-ipv6
Default config: listen on IPv6 for the swarm address
2015-08-15 06:41:26 +02:00
f209763357 blockservice.New doesnt need to return an error
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-14 16:25:51 -07:00
da75e92d5b Merge pull request #1570 from rht/config-null
Config: allow to set maps on null value
2015-08-14 04:08:45 +02:00
c1380f122b Merge pull request #1571 from ipfs/fix/refs-json
dont put newlines in refs json output
2015-08-14 04:08:30 +02:00
8d6fa2ede7 dont put newlines in refs json output
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-13 11:08:10 -07:00
rht
c0a0cde986 Config: allow to set maps on null value
Also, now, if ipfs config foo.bar has value of anything that is not map (0, "0", 0.1),
then ipfs config foo.bar.baz now returns an error instead of a panic

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 19:42:32 +07:00
afbdedb469 config set: test setting with null & not-defined parent
This adds a failing for the case described in #1561

License: MIT
Signed-off-by: Stephan Seidt <evilhackerdude@gmail.com>
2015-08-13 19:41:41 +07:00
64102a5810 use correct context for dht notifs
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-12 16:08:57 -07:00
ace06b47d1 Merge pull request #1565 from ipfs/add-patch
cmds/add: use dagutils.Editor, like patch
2015-08-12 15:34:41 +02:00
978c9fa16f cmds/add: use dagutils.Editor, like patch
This changes the pin behavior. It uses the filenames given through
the api, and allows files to be streamed faltly (not a hierarchy),
which is easier for other things (like vinyl in node-ipfs-api land).
Files can also be entirely out of order, and the garbage intermediate
directories will not be pinned (gc-ed later).

The changes also mean the output of add has changed slightly-- it
no longer shows the local path added, but rather the dag path
relative to the added roots. This is a small difference, but changes
tests.

The dagutils.Editor creates a lot of chaff (intermediate objects)
along the way. Wonder how we might minimize the writes to the
datastore...

This commit also removes the "NilRepo()" part of the --only-hash
mode. We need to store at least in an in-mem repo/datastore because
otherwise the dagutils.Editor breaks.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-12 08:24:06 +02:00
e8d6f79062 Merge pull request #1545 from ipfs/feat/real-rabin
Feat/real rabin
2015-08-11 08:14:56 -07:00
ed4274c9b7 implement a basic DAG diffing algorithm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 17:47:08 -07:00
4d287bce51 randomly getting a bad data layout shouldnt fail the tests
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 14:44:06 -07:00
39a23392c1 use rabin fingerprinting for a chunker
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

implement rabin fingerprinting as a chunker for ipfs

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

vendor correctly

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

refactor chunking interface a little

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

work chunking interface changes up into importer

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

move chunker type parsing into its own file in chunk

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-08 15:33:10 -07:00
d1366cde1b Merge pull request #1552 from ipfs/fix-tar-reader
get: fix halt bug + improvements
2015-08-05 10:57:51 +02:00
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00
741cf7e793 sharness/t009-get: fix space/tabs
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:47:58 +02:00
f460984594 thirdparty/tar: clearer var names for recursion
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:47:07 +02:00
b858928662 unixfs/tar: cleaned up reader code
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:46:58 +02:00
6944c73312 Merge pull request #1547 from makevoid/patch-1
Update link to ipfs installation guide
2015-08-05 09:44:15 +02:00
6f943d7c81 Merge pull request #1553 from ipfs/fix-providing-speed
bitswap/provide: improved rate limiting
2015-08-05 09:36:05 +02:00
6e705e1ef0 bitswap/provide: improved rate limiting
this PR greatly speeds up providing and add.

(1) Instead of idling workers, we move to a ratelimiter-based worker.
We put this max at 512, so that means _up to_ 512 goroutines. This
is very small load on the node, as each worker is providing to the
dht, which means mostly waiting. It DOES put a large load on the DHT.
but i want to try this out for a while and see if it's a problem.
We can decide later if it is a problem for the network (nothing
stops anyone from re-compiling, but the defaults of course matter).

(2) We add a buffer size for provideKeys, which means that we block
the add process much less. this is a very cheap buffer, as it only
stores keys (it may be even cheaper with a lock + ring buffer
instead of a channel...). This makes add blazing fast-- it was being
rate limited by providing. Add should not be ratelimited by providing
(much, if any) as the user wants to just store the stuff in the local
node's repo. This buffer is initially set to 4096, which means:

  4096 * keysize (~258 bytes + go overhead) ~ 1-1.5MB

this buffer only last a few sec to mins, and is an ok thing to do
for the sake of very fast adds. (this could be a configurable
paramter, certainly for low-mem footprint use cases). At the moment
this is not much, compared to block sizes.

(3) We make the providing EventBegin() + Done(), so that we can
track how long a provide takes, and we can remove workers as they
finish in bsdash and similar tools.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-04 20:07:25 +02:00
b30d9d4db5 Merge pull request #1548 from prusnak/remove-p224
remove elliptic.P224 usage
2015-08-04 18:31:43 +02:00
d3efdcf0c3 remove elliptic.P224 usage
Fedora/RedHat distros comply with US patent law and remove this curve,
which makes it impossible to run ipfs with distro provided Golang.

License: MIT
Signed-off-by: Pavol Rusnak <stick@gk2.sk>
2015-08-03 16:41:10 +02:00
8b6ec6600e Update link to ipfs installation guide
in Readme.md

License: MIT
Signed-off-by: Francesco (makevoid) <makevoid@gmail.com>
2015-08-03 00:08:34 +01:00
ec51450d07 go-ipfs version 0.3.7 release
This patch update fixes a problem we introduced in 0.3.6 and did not
catch: the webui failed to work with out-of-the-box CORS configs.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
v0.3.7
2015-08-02 16:00:34 +02:00
4a8c938c7a release checklist
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 15:54:12 +02:00
b19dd47f14 Merge pull request #1544 from ipfs/fix/allowed-origins
fix allowed origins to make webui work again
2015-08-02 08:30:01 +02:00
3ee83a7c5e fix cors: defaults should take the port of the listener
need to do it this way to avoid VERY confusing situations where
the user would change the API port (to another port, or maybe even
to :0). this way things dont break on the user, and by default,
users only need to change the API address and things should still
"just work"

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00