diff options
author | Lewis Marshall <lewis@lmars.net> | 2017-05-22 14:56:40 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-05-22 14:56:40 +0800 |
commit | 4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5 (patch) | |
tree | 4a9a0867f1634acbd342c4cc9720ed4798355f06 /cmd/swarm | |
parent | bc75351edfd820235c7609eefc8b0035e01215b8 (diff) | |
download | go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.gz go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.bz2 go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.lz go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.xz go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.tar.zst go-tangerine-4a2c17b1ab8316ab3b4fa2b769d1dccad3cb97d5.zip |
cmd/swarm: Add --httpaddr flag (#14475)
Fixes #14474.
Signed-off-by: Lewis Marshall <lewis@lmars.net>
Diffstat (limited to 'cmd/swarm')
-rw-r--r-- | cmd/swarm/main.go | 8 |
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) |