Add netclient detection of nftables.

This commit is contained in:
cameronts
2022-08-02 15:01:45 -07:00
parent 903a7a65c8
commit e6d7c95669
6 changed files with 46 additions and 27 deletions
+10
View File
@@ -109,6 +109,16 @@ func GetWireGuard() string {
return "wg"
}
// IsNFTablesPresent - returns true if nftables is present, false otherwise.
// Does not consider OS, up to the caller to determine if the OS supports nftables/whether this check is valid.
func IsNFTablesPresent() bool {
var nftFound bool
nftFound = FileExists("/etc/nftables.conf")
logger.Log(3, "nftables found:", strconv.FormatBool(nftFound))
return nftFound
}
// IsKernel - checks if running kernel WireGuard
func IsKernel() bool {
//TODO