@cryptotaxi247 / kubo / commits / 0cbbdae1a

add in option to use nil-routing

License: MIT Signed-off-by: Jeromy <why@ipfs.io>

Jeromy committed Jan 17, 2017 at 14:27 UTC 0cbbdae1a37c1f5a1c80dca50e62e4d4b97602ac
1 file changed +3
cmd/ipfs/daemon.go
+3
@@ -45,6 +45,7 @@ const (
45 routingOptionSupernodeKwd = "supernode"
46 routingOptionDHTClientKwd = "dhtclient"
47 routingOptionDHTKwd = "dht"
48 + routingOptionNoneKwd = "none"
49 unencryptTransportKwd = "disable-transport-encryption"
50 unrestrictedApiAccessKwd = "unrestricted-api"
51 writableKwd = "writable"
@@ -331,6 +332,8 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
332 ncfg.Routing = core.DHTClientOption
333 case routingOptionDHTKwd:
334 ncfg.Routing = core.DHTOption
335 + case routingOptionNoneKwd:
336 + ncfg.Routing = core.NilRouterOption
337 default:
338 res.SetError(fmt.Errorf("unrecognized routing option: %s", routingOption), cmds.ErrNormal)
339 return