* Allow to configure firewall rules from the GUI (WIP) New features: - Configure and list system firewall rules from the GUI (nftables). - Configure chains' policies. - Add simple rules to allow incoming ports. - Add simple rules to exclude apps (ports) from being intercepted. This feature is only available for nftables. iptables is still supported, you can add rules to the configuration file and they'll be loaded, but you can't configure them from the GUI. More information: #592
15 lines
255 B
Go
15 lines
255 B
Go
package exprs
|
|
|
|
import (
|
|
"github.com/google/nftables/expr"
|
|
)
|
|
|
|
// NewExprCounter returns a counter for packets or bytes.
|
|
func NewExprCounter(counterName string) *[]expr.Any {
|
|
return &[]expr.Any{
|
|
&expr.Objref{
|
|
Type: 1,
|
|
Name: counterName,
|
|
},
|
|
}
|
|
}
|