Skip to content

Commit 5d8279e

Browse files
committed
router: Bind external option.
1 parent 729e58b commit 5d8279e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

router/module.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ type (
2222

2323
// Config for the router module
2424
type Config struct {
25-
Port int `json:"port"`
25+
Port int `json:"port"`
26+
BindExternal bool `json:"bindext"`
2627
}
2728

2829
// Module router implements basic routing with helpers for protobuf-rootd responses.
@@ -83,6 +84,9 @@ func (m *Module) laddr() string {
8384
iface = "0.0.0.0"
8485
}
8586
}
87+
if m.config.BindExternal {
88+
iface = "0.0.0.0"
89+
}
8690
return fmt.Sprintf("%s:%d", iface, port)
8791
}
8892

0 commit comments

Comments
 (0)