Add options to set ports on weaver command line
This commit adds two command line options, intended to allow multiple instances of weave to run without container separation between them. * -port=PORT makes weave bind to port PORT (an integer). Without the option, the default value (6783) is used. * -httpaddr=ADDRESS makes weave bind its control interface to a different address. For instance "127.0.0.1:6784" can be used to bind to localhost only. An absent address element makes it bind to all interfaces. ":6784" is the default. An empty string can be used to disable the control interface. Signed-off-by: Alex Bligh <alex@alex.org.uk>
This commit is contained in:
1 parent
bb9e26b4ae
commit
12d88eac23
7 files changed
+49
-40
No files matched your search
@@ -94,7 +94,7 @@ func (peer *LocalPeer) CreateConnection(peerAddr string, acceptNewPeer bool) err
|
||||
return err
|
||||
}
|
||||
// We're dialing the remote so that means connections will come from random ports
|
||||
addrStr := NormalisePeerAddr(peerAddr)
|
||||
addrStr := peer.Router.NormalisePeerAddr(peerAddr)
|
||||
tcpAddr, tcpErr := net.ResolveTCPAddr("tcp4", addrStr)
|
||||
udpAddr, udpErr := net.ResolveUDPAddr("udp4", addrStr)
|
||||
if tcpErr != nil || udpErr != nil {
|
||||
|
||||
Reference in new issue
Block a user