From 0cbbdae1a37c1f5a1c80dca50e62e4d4b97602ac Mon Sep 17 00:00:00 2001 From: Jeromy Date: Tue, 17 Jan 2017 14:27:41 -0800 Subject: [PATCH] add in option to use nil-routing License: MIT Signed-off-by: Jeromy --- cmd/ipfs/daemon.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 51864d05a41..3a32c247bdd 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -45,6 +45,7 @@ const ( routingOptionSupernodeKwd = "supernode" routingOptionDHTClientKwd = "dhtclient" routingOptionDHTKwd = "dht" + routingOptionNoneKwd = "none" unencryptTransportKwd = "disable-transport-encryption" unrestrictedApiAccessKwd = "unrestricted-api" writableKwd = "writable" @@ -331,6 +332,8 @@ func daemonFunc(req cmds.Request, res cmds.Response) { ncfg.Routing = core.DHTClientOption case routingOptionDHTKwd: ncfg.Routing = core.DHTOption + case routingOptionNoneKwd: + ncfg.Routing = core.NilRouterOption default: res.SetError(fmt.Errorf("unrecognized routing option: %s", routingOption), cmds.ErrNormal) return