Maint: inject Commander to openvpn and firewall

This commit is contained in:
Quentin McGaw (desktop)
2021-07-23 18:25:30 +00:00
parent 94b60d9f70
commit c5d92ae02c
3 changed files with 11 additions and 12 deletions

View File

@@ -50,14 +50,13 @@ type configurator struct { //nolint:maligned
}
// NewConfigurator creates a new Configurator instance.
func NewConfigurator(logger logging.Logger, routing routing.Routing) Configurator {
commander := command.NewCommander()
func NewConfigurator(logger logging.Logger, cmder command.Commander, routing routing.Routing) Configurator {
return &configurator{
commander: commander,
commander: cmder,
logger: logger,
routing: routing,
allowedInputPorts: make(map[uint16]string),
ip6Tables: ip6tablesSupported(context.Background(), commander),
ip6Tables: ip6tablesSupported(context.Background(), cmder),
customRulesPath: "/iptables/post-rules.txt",
}
}