MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / anchorBlock

Function anchorBlock

src/helper/macos/firewallcontroller.cpp:22–33  ·  view source on GitHub ↗

Emits the inline pf anchor block used inside the main pf.conf. Mirrors the engine-side helper that previously built these rules.

Source from the content-addressed store, hash-verified

20// Emits the inline pf anchor block used inside the main pf.conf. Mirrors the engine-side helper that
21// previously built these rules.
22std::string anchorBlock(const std::string &name, const std::vector<std::string> &rules)
23{
24 if (rules.empty()) {
25 return "anchor " + name + " all";
26 }
27 std::string str = "anchor " + name + " all {\n";
28 for (const auto &r : rules) {
29 str += r + "\n";
30 }
31 str += "}";
32 return str;
33}
34
35} // namespace
36

Callers 1

buildPfConfMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected