1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-20 16:36:46 +08:00

40 Commits

Author SHA1 Message Date
f287524949 cmd: use go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:41 +01:00
cccc6a94a3 update go-multihash and bubble up changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 19:27:43 -07:00
b15470d548 bubble up updates from go-multihash changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-20 20:28:04 +02:00
b4eeff2d84 update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-02-12 12:25:41 -08:00
67c2a4ec14 make path resolver no longer require whole node for construction
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-25 15:04:44 -07:00
1f9ec4e3ed update to libp2p 4.0.1 and propogate other changes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-05 22:12:43 -07:00
c8fe495934 integrate CIDv0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-09-07 13:32:32 -07:00
5d301cb8ec re-enable the stdin
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-08 16:39:15 -07:00
ddc8d0c60c commands: remove EnableStdin support for StringArg
With verbose flag:
* remove EnableStdin() flags on all StringArg,

* remove all unneeded parsing code for StringArg, and print an
* informative message if `ipfs` begins reading from a CharDevice,

* remove broken go tests for EnableStdin cli parsing, and add some
* trivial test cases for reading FileArg from stdin,

* add a panic to prevent EnableStdin from being set on
* StringArg in the future.

Resolves: #2877, #2870
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
2016-06-26 12:28:55 +10:00
f52050de80 Added Default false to all remaining options
Specifically, to `repo`, `resolve`, `swarm`, and `version`. Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-05-12 12:02:47 -04:00
e8a49d94a6 Make non recursive resolve print the result
Currently it prints out error message but should just print
the intermediate result as it is what we expect.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@gmail.com>
2016-04-13 19:49:48 +02:00
2a79e0ddd4 Added default false
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-02-26 12:25:43 -05:00
6ea9f60148 Removed double spaces, added an, siwitched carrot to dollar
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-02-18 15:51:20 -05:00
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
28fe2e4f4c Capitalized beginning of line messages, added periods
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-24 22:39:34 +00: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
d49a15f566 Add newline to end of the output for a few commands.
Commands affected:

 - ipfs object put
 - ipfs tar add
 - ipfs resolve
 - ipfs name resolve

License: MIT
Signed-off-by: Nick Hamann <nick@wabbo.org>
2015-11-29 11:50:48 -06:00
rht
2e0c072dac Use core path resolver for 'resolve command' [1]
[1] 172eeb87fa

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-10-13 16:51:47 +07:00
3a2b83d904 resolve cmd: Fully resolve IPFS paths after resolving IPNS names
License: MIT
Signed-off-by: Matt Bell <mappum@gmail.com>
2015-10-13 13:11:40 +07:00
8d370a3946 Added help text to 'resolve' command to show DAG path resolution.
License: MIT
Signed-off-by: Matt Bell <mappum@gmail.com>
2015-10-13 13:11:40 +07:00
eddd64119e Resolve '/ipfs/root/some/path' paths in 'ipfs resolve' command
License: MIT
Signed-off-by: Matt Bell <mappum@gmail.com>
2015-10-13 13:11:40 +07:00
bb3a75aa08 remove context from context
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 20:53:06 -07:00
416d454b42 core/commands: Make 'ipfs name resolve' IPNS-only
And add a generic 'ipfs resolve' to handle cross-protocol name
resolution.
2015-05-20 08:40:44 -07:00
c2ff02850b core/commands/resolve: Add a -r / --recursive option
For explicitly enabling recursive behaviour (it was previously always
enabled).  That allows folks who are interested in understanding
layered indirection to step through the chain one link at a time.
2015-05-20 08:40:42 -07:00
3ead2443e5 namesys: Add recursive resolution
This allows direct access to the earlier protocol-specific Resolve
implementations.  The guts of each protocol-specific resolver are in
the internal resolveOnce method, and we've added a new:

  ResolveN(ctx, name, depth)

method to the public interface.  There's also:

  Resolve(ctx, name)

which wraps ResolveN using DefaultDepthLimit.  The extra API endpoint
is intended to reduce the likelyhood of clients accidentally calling
the more dangerous ResolveN with a nonsensically high or infinite
depth.  On IRC on 2015-05-17, Juan said:

15:34 <jbenet> If 90% of uses is the reduced API with no chance to
  screw it up, that's a huge win.
15:34 <wking> Why would those 90% not just set depth=0 or depth=1,
  depending on which they need?
15:34 <jbenet> Because people will start writing `r.Resolve(ctx, name,
  d)` where d is a variable.
15:35 <wking> And then accidentally set that variable to some huge
  number?
15:35 <jbenet> Grom experience, i've seen this happen _dozens_ of
  times. people screw trivial things up.
15:35 <wking> Why won't those same people be using ResolveN?
15:36 <jbenet> Because almost every example they see will tell them to
  use Resolve(), and they will mostly stay away from ResolveN.

The per-prodocol versions also resolve recursively within their
protocol.  For example:

  DNSResolver.Resolve(ctx, "ipfs.io", 0)

will recursively resolve DNS links until the referenced value is no
longer a DNS link.

I also renamed the multi-protocol ipfs NameSystem (defined in
namesys/namesys.go) to 'mpns' (for Multi-Protocol Name System),
because I wasn't clear on whether IPNS applied to the whole system or
just to to the DHT-based system.  The new name is unambiguously
multi-protocol, which is good.  It would be nice to have a distinct
name for the DHT-based link system.

Now that resolver output is always prefixed with a namespace and
unprefixed mpns resolver input is interpreted as /ipfs/,
core/corehttp/ipns_hostname.go can dispense with it's old manual
/ipfs/ injection.

Now that the Resolver interface handles recursion, we don't need the
resolveRecurse helper in core/pathresolver.go.  The pathresolver
cleanup also called for an adjustment to FromSegments to more easily
get slash-prefixed paths.

Now that recursive resolution with the namesys/namesys.go composite
resolver always gets you to an /ipfs/... path, there's no need for the
/ipns/ special case in fuse/ipns/ipns_unix.go.

Now that DNS links can be things other than /ipfs/ or DHT-link
references (e.g. they could be /ipns/<domain-name> references) I've
also loosened the ParsePath logic to only attempt multihash validation
on IPFS paths.  It checks to ensure that other paths have a
known-protocol prefix, but otherwise leaves them alone.

I also changed some key-stringification from .Pretty() to .String()
following the potential deprecation mentioned in util/key.go.
2015-05-20 08:40:05 -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
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
b57ba192e6 fix cast panic in ipfs name resolve when daemon is running
Addresses bug #689
2015-01-31 23:55:07 +00:00
f1267d0624 change ipns resolve/publish to store raw keys, not b58 encoded 2015-01-28 19:36:30 +00:00
7b4de230eb commands: Refactored Command#Run function signature to (req Request, res Response) 2015-01-23 18:29:29 -08:00
86bb8ca7a7 core/commands: Enabled stdin for various command arguments 2015-01-13 22:51:11 -08:00
fd40702f73 commands: Changed Marshaler to return a io.Reader instead of a []byte
core/commands: Refactored command marshalers
2015-01-06 15:53:42 -08:00
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -08:00
c84a714b16 peer change: peer.Peer -> peer.ID
this is a major refactor of the entire codebase
it changes the monolithic peer.Peer into using
a peer.ID and a peer.Peerstore.

Other changes:
- removed handshake3.
-	testutil vastly simplified peer
-	secio bugfix + debugging logs
-	testutil: RandKeyPair
-	backpressure bugfix: w.o.w.
-	peer: added hex enc/dec
-	peer: added a PeerInfo struct
  PeerInfo is a small struct used to pass around a peer with
 	a set of addresses and keys. This is not meant to be a
 	complete view of the system, but rather to model updates to
 	the peerstore. It is used by things like the routing system.
-	updated peer/queue + peerset
-	latency metrics
-	testutil: use crand for PeerID gen
 	RandPeerID generates random "valid" peer IDs. it does not
 	NEED to generate keys because it is as if we lost the key
 	right away. fine to read some randomness and hash it. to
 	generate proper keys and an ID, use:
 	  sk, pk, _ := testutil.RandKeyPair()
 	  id, _ := peer.IDFromPublicKey(pk)
 	Also added RandPeerIDFatal helper
- removed old spipe
- updated seccat
- core: cleanup initIdentity
- removed old getFromPeerList
2014-12-23 08:33:32 -08:00
5aaa45db9a transitioned ipfs2 -> ipfs 2014-11-18 06:15:00 -08:00
ad3f3e003f removed old commands files
https://www.youtube.com/watch?v=kyFyAqLtHq8
2014-11-18 06:15:00 -08:00
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
2fa43ce46c ipfs name cmd improvements
- cleaned up cmd help
- ipfs name publish [<name>] <ref>
- ipfs name resolve [<name>]
- publish validates <ref>
- both validate n args
2014-10-09 03:39:47 -07:00
b787c705e2 command output nit 2014-10-01 01:28:55 -07:00
6080944af9 writing files inside ipns works now! also implemented resolve cli command 2014-10-01 00:41:29 -07:00