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

4425 Commits

Author SHA1 Message Date
02377fabf8 assets: remove seed logic from init
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-03 10:22:21 +02:00
5fbf1e7416 assets: switch to go-bindata
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-03 09:52:08 +02:00
0d42a6a7bc Merge pull request #1433 from ipfs/fix/addr-filter
add filters from config to addr filter in swarm
2015-07-02 17:00:36 -07:00
c595cf8ae0 config: DialBlocklist -> Swarm.AddrFilters
This commit changes the DialBlocklist key to be under the key
Swarm.AddrFilters instead.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-02 16:11:46 -07:00
a119b72243 t0141-addfilter: check init has no filters
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-02 16:10:30 -07:00
57d7a443a0 test dialblocklist loading from config
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-02 13:38:15 -07:00
9e74a08879 Merge pull request #1437 from lgierth/metrics-fix
swarm: fix peers_total metric
2015-07-01 14:53:53 -07:00
9c30b85180 swarm: fix peers_total metric
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-07-01 21:59:08 +02:00
22c653c71d Merge pull request #1354 from rht/get-flag
Don't use tar reader for '-C' flag
2015-06-30 20:02:34 -07:00
rht
3798178705 Don't use tar reader for '-C' only flag
Currently `ipfs get -C <hash>` returns error even if <hash> is a file.
This PR is for the case when the compress flag is enabled, use the
dagreader directly and pipe to a gzip processor.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-01 09:36:25 +07:00
7cc73f7b86 add command to manipulate address filters and a sharness test for them
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 18:25:34 -07:00
e7fd57f69a add filters from config to addr filter in swarm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 15:03:56 -07:00
74a331db96 Merge pull request #1422 from lgierth/metrics
Expose metrics via Prometheus
2015-06-30 12:32:21 -07:00
e0a4b3ad15 godep: add prometheus
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-30 16:32:49 +02:00
8b164f9e39 swarm: export ipfs_p2p_peers_total metric
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-30 16:32:46 +02: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
2d6b787c99 Merge pull request #1399 from ipfs/disable-secio-option
Swarm Addrs, Disable secio opt, + tests
2015-06-27 01:00:00 -07:00
59d6a9a19c fix swarm notif tests
they were failing intermittently

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-27 00:41:19 -07:00
f796615e10 mock: fix notif test
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-27 00:18:12 -07:00
6b8e9f51fe fix t0061-daemon-opts.sh nc wait
fix the nc wait. the issue was that stdin needs to remain _open_
but not receive any input for some time. If stdin receives (invalid)
input or closes, the other side terminates the connection before
writing out the muxer frames + identify handshake.

This commit also changes the use of `!` for `test_must_fail`

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
f300e97c50 added sharness/t0061-daemon-opts
Test odd daemon options, like:
- unrestricted-api
- disable-transport-encryption (known breakage atm)

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07: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
500f51300d ipfs swarm addrs local - show local addrs
Add a command to return local addresses.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:42 -07:00
c5caccba14 ipfs id -f=<addrs> and \n \t
- added <addrs> field to `ipfs id -f`
- added \n and \t conversion in `ipfs id -f`

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:42 -07:00
748d25f473 t0060-daemon: test transport is encrypted
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:42 -07:00
c9edbf359d Merge pull request #1403 from dylanPowers/object-new-templates
Object new templates
2015-06-26 04:23:26 -07:00
51aeb1216f Merge pull request #1266 from ipfs/add-circleci
add circleci support
2015-06-26 02:26:33 -07:00
15d9a5ccae add circleci support
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 02:07:58 -07:00
1a77297182 t0060: export IPFS_PATH
IPFS_PATH should really be exported to make sure it is
available to the ipfs binary.

It looks like sharness tests fail otherwise on CircleCi.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-26 02:07:57 -07:00
ac7d25c2cc Merge pull request #1423 from ipfs/test/only-hash
add test for only-hash to ensure no blocks are added to datastore
2015-06-25 14:07:03 -07:00
0332f3dbaa Merge pull request #1348 from ipfs/tk/unixfs-ls
Add 'ipfs file ls …'
2015-06-25 10:03:52 -07:00
53dee3c64d add test for only-hash to ensure no blocks are added to datastore
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-25 09:33:47 -07:00
aefdb4e0e1 Merge pull request #1417 from ipfs/feat/only-hash
add option to only hash input
2015-06-24 16:24:17 -07:00
65874eb0c1 Merge pull request #1378 from ipfs/feat/filter
add in basic address dial filtering
2015-06-24 15:12:16 -07:00
60ad7a5afc sharness tests for --only-hash
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 09:04:31 -07:00
0bf6b39caf filter incoming connections and add a test of functionality
- add extra check to dialblock test
- move filter to separate package
- also improved tests
- sunk filters down into p2p/net/conn/listener

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-23 01:30:16 -07:00
fbab2a7273 broke filters out into a struct
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
e01f8e4f22 add in basic address dial filtering
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
3f28663ff6 Merge pull request #1414 from ipfs/fix-verify-file
ipns_test: fix slice bounds out of range
2015-06-22 21:14:09 -07:00
e42c967297 add option to only hash input
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-22 15:21:53 -07:00
d18296045e ipns_test: fix slice bounds out of range
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-22 22:52:14 +02:00
4acab79d66 core/commands/unixfs/ls: Explicitily record stat in LsObject
Instead of abusing a LsLink for non-directory objects [1].

[1]: https://github.com/ipfs/go-ipfs/pull/1348#discussion_r32680669

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
5fd4812b20 core/commands/unixfs/ls.go: Fix (and test) single-directory listing
We don't want to prefix these results with the argument.  If there was
only one argument, the unprefixed results are still explicit.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
7fc2410d95 core/commands/unixfs/ls: Hash-map for Objects
Discussion with Juan on IRC ([1] through [2]) lead to this adjusted
JSON output.  Benefits over the old output include:

* deduplication (we only check the children of a given Merkle node
  once, even if multiple arguments resolve to that hash)

* alphabetized output (like POSIX's ls).  As a side-effect of this
  change, I'm also matching GNU Coreutils' ls output (maybe in POSIX?)
  by printing an alphabetized list of non-directories (one per line)
  first, with alphabetized directory lists afterwards.

[1]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41725570&page=5
[2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41726547&page=5

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
ce0bf80368 core/commands/unixfs/ls: Replace TODO context with command context
Discussing this on IRC ([1] through [2]), Jeromy and I decided that
we'd really like a way to configure per-command [3] and per-action
timeouts, but until we have that we want to leave the minute limit
here.  We also decided that the use of TODO here instead of the
per-command req.Context().Context was a bug, which I'm fixing with
this commit.

[1]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41714126&page=4
[2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41715618&page=4
[3]: https://github.com/ipfs/go-ipfs/issues/1325

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
f0a0ac1b83 core/commands/unixfs/ls: Use a stringified type name
This doesn't affect the text output, which was already using a
stringified name.  The earlier stringification does change the JSON
output from an enumeration integer (e.g. 2) to the string form
(e.g. "File").  If/when we transition to Merkle-object types named by
their hash, we will probably want to revisit this and pass both the
type hash and human-readable-but-collision-prone name on to clients.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
c9733c5da7 core/commands/unixfs/ls: Set Argument in JSON output
Change the approach to the directory-header control so we can set the
Argument value in the JSON response.

Stripping the trailing newline from the JSON output is annoying, but
looking over [1] I saw no easy way to add a newline to the JSON
output.  And with the general framework that commands/ attempts to be,
it feels a bit funny to customize the JSON output for a command-line
program.  Perhaps a workable solution is to have the command-line
client append newlines to any output that otherwise lacks them?  But
that seems like a change best left to a separate series.

[1]: http://golang.org/pkg/encoding/json/

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:44 -07:00
3a1c8d7a53 Merge pull request #1400 from dylanPowers/object-help
"object" added to the descriptions of object patch and object data
2015-06-19 23:47:21 -07:00
594c1bfa2a Merge pull request #1405 from ipfs/daemon-shutdown
close channels and allow daemon to shutdown
2015-06-19 23:03:51 -07:00