mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-23 16:43:29 +01:00
e69ec6ab6a
* Optimize rules with All groups * Use IP sets in ACLs (nftables implementation) * Fix squash rule when we receive optimized rules list from management
24 lines
504 B
Go
24 lines
504 B
Go
//go:build !linux
|
|
|
|
package acl
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
|
|
"github.com/netbirdio/netbird/client/firewall/uspfilter"
|
|
)
|
|
|
|
// Create creates a firewall manager instance
|
|
func Create(iface IFaceMapper) (manager *DefaultManager, err error) {
|
|
if iface.IsUserspaceBind() {
|
|
// use userspace packet filtering firewall
|
|
fm, err := uspfilter.Create(iface)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return newDefaultManager(fm), nil
|
|
}
|
|
return nil, fmt.Errorf("not implemented for this OS: %s", runtime.GOOS)
|
|
}
|