aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorLewis Marshall <lewis@lmars.net>2017-05-22 14:56:40 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2017-05-22 14:56:40 +0800
commit4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5 (patch)
tree4a9a0867f1634acbd342c4cc9720ed4798355f06 /cmd
parentbc75351edfd820235c7609eefc8b0035e01215b8 (diff)
downloaddexon-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.gz
dexon-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.zst
dexon-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.zip
cmd/swarm: Add --httpaddr flag (#14475)
Fixes #14474. Signed-off-by: Lewis Marshall <lewis@lmars.net>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/swarm/main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go
index 26aa3e50f..71149c310 100644
--- a/cmd/swarm/main.go
+++ b/cmd/swarm/main.go
@@ -67,6 +67,10 @@ var (
Name: "bzzaccount",
Usage: "Swarm account key file",
}
+ SwarmListenAddrFlag = cli.StringFlag{
+ Name: "httpaddr",
+ Usage: "Swarm HTTP API listening interface",
+ }
SwarmPortFlag = cli.StringFlag{
Name: "bzzport",
Usage: "Swarm local http api port",
@@ -249,6 +253,7 @@ Cleans database of corrupted entries.
SwarmConfigPathFlag,
SwarmSwapEnabledFlag,
SwarmSyncEnabledFlag,
+ SwarmListenAddrFlag,
SwarmPortFlag,
SwarmAccountFlag,
SwarmNetworkIdFlag,
@@ -345,6 +350,9 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) {
if len(bzzport) > 0 {
bzzconfig.Port = bzzport
}
+ if bzzaddr := ctx.GlobalString(SwarmListenAddrFlag.Name); bzzaddr != "" {
+ bzzconfig.ListenAddr = bzzaddr
+ }
swapEnabled := ctx.GlobalBool(SwarmSwapEnabledFlag.Name)
syncEnabled := ctx.GlobalBoolT(SwarmSyncEnabledFlag.Name)