mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-02 03:28:25 +08:00
Merge pull request #3605 from ipfs/feat/none-routing
add in option to use nil-routing
This commit is contained in:
@ -45,6 +45,7 @@ const (
|
|||||||
routingOptionSupernodeKwd = "supernode"
|
routingOptionSupernodeKwd = "supernode"
|
||||||
routingOptionDHTClientKwd = "dhtclient"
|
routingOptionDHTClientKwd = "dhtclient"
|
||||||
routingOptionDHTKwd = "dht"
|
routingOptionDHTKwd = "dht"
|
||||||
|
routingOptionNoneKwd = "none"
|
||||||
unencryptTransportKwd = "disable-transport-encryption"
|
unencryptTransportKwd = "disable-transport-encryption"
|
||||||
unrestrictedApiAccessKwd = "unrestricted-api"
|
unrestrictedApiAccessKwd = "unrestricted-api"
|
||||||
writableKwd = "writable"
|
writableKwd = "writable"
|
||||||
@ -331,6 +332,8 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
|
|||||||
ncfg.Routing = core.DHTClientOption
|
ncfg.Routing = core.DHTClientOption
|
||||||
case routingOptionDHTKwd:
|
case routingOptionDHTKwd:
|
||||||
ncfg.Routing = core.DHTOption
|
ncfg.Routing = core.DHTOption
|
||||||
|
case routingOptionNoneKwd:
|
||||||
|
ncfg.Routing = core.NilRouterOption
|
||||||
default:
|
default:
|
||||||
res.SetError(fmt.Errorf("unrecognized routing option: %s", routingOption), cmds.ErrNormal)
|
res.SetError(fmt.Errorf("unrecognized routing option: %s", routingOption), cmds.ErrNormal)
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user