Add stats collection

This commit is contained in:
Viktor Liu
2024-12-23 15:59:55 +01:00
parent ad9f044aad
commit f57bc604a8
19 changed files with 630 additions and 125 deletions

View File

@@ -215,6 +215,11 @@ func (m *Manager) AllowNetbird() error {
// Flush doesn't need to be implemented for this manager
func (m *Manager) Flush() error { return nil }
// CollectStats returns connection tracking statistics
func (m *Manager) CollectStats() []*firewall.FlowStats {
return nil
}
func getConntrackEstablished() []string {
return []string{"-m", "conntrack", "--ctstate", "RELATED,ESTABLISHED", "-j", "ACCEPT"}
}