FIREWALL_DEBUG variable, refers to #190, #194

This commit is contained in:
Quentin McGaw
2020-07-13 02:14:56 +00:00
parent 7252ac722c
commit 0fc69e068e
10 changed files with 42 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ type Configurator interface {
SetAllowedPort(ctx context.Context, port uint16) error
RemoveAllowedPort(ctx context.Context, port uint16) (err error)
SetPortForward(ctx context.Context, port uint16) (err error)
SetDebug()
}
type configurator struct { //nolint:maligned
@@ -29,6 +30,7 @@ type configurator struct { //nolint:maligned
routing routing.Routing
fileManager files.FileManager // for custom iptables rules
iptablesMutex sync.Mutex
debug bool
// State
enabled bool
@@ -49,3 +51,7 @@ func NewConfigurator(logger logging.Logger, routing routing.Routing, fileManager
allowedPorts: make(map[uint16]struct{}),
}
}
func (c *configurator) SetDebug() {
c.debug = true
}