Skip to content

Add a rule method for masquerading

This commit adds the Rule::masquerade method as a shorthand for Rule::with_expr(expr::Masquerade {}). I believe that this change is helpful especially for new users of the library since NAT/masquerading is a common use case for nftables and this new method doesn't require knowledge of how rules are created from expressions. Similar methods for accepting and dropping packets already exist.

Merge request reports

Loading