headscale/hscontrol/policy/v2
Kristoffer Dalby 834ac27779 policy/v2: add subnet routes and exit node compatibility tests
Add comprehensive test file for validating Headscale's ACL engine
behavior for subnet routes and exit nodes against documented
Tailscale SaaS behavior.

Tests cover:
- Category A: Subnet route basics (wildcard includes routes, tag-based
  ACL excludes routes)
- Category B: Exit node behavior (exit routes not in SrcIPs)
- Category F: Filter placement rules (filters on destination nodes)
- Category G: Protocol and port restrictions
- Category R: Route coverage rules
- Category O: Overlapping routes
- Category H: Edge cases (wildcard formats, CGNAT handling)
- Category T: Tag resolution (tags resolve to node IPs only)
- Category I: IPv6 specific behavior

The tests document expected Tailscale SaaS behavior with TODOs marking
areas where Headscale currently differs. This provides a baseline for
compatibility improvements.
2026-02-05 19:29:16 +01:00
..
filter.go policy: merge filter rules with identical SrcIPs and IPProto 2026-02-05 19:29:16 +01:00
filter_test.go policy: merge filter rules with identical SrcIPs and IPProto 2026-02-05 19:29:16 +01:00
policy.go policy/v2: add IsTagged() guards to prevent panics on tagged nodes 2026-02-03 16:53:15 +01:00
policy_test.go policy/v2: add test for issue #2990 same-user tagged device 2026-02-03 16:53:15 +01:00
tailscale_compat_test.go policy: update test expectations for merged filter rules 2026-02-05 19:29:16 +01:00
tailscale_routes_compat_test.go policy/v2: add subnet routes and exit node compatibility tests 2026-02-05 19:29:16 +01:00
types.go policy: use CGNAT/ULA ranges for wildcard resolution 2026-02-05 19:29:16 +01:00
types_test.go policy: use CGNAT/ULA ranges for wildcard resolution 2026-02-05 19:29:16 +01:00
utils.go modernize: run gopls modernize to bring up to 1.25 (#2920) 2025-12-01 19:40:25 +01:00
utils_test.go integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00