Files
ansible/roles/nftables/templates/router/90-proxy-output.nft.j2
T

12 lines
451 B
Django/Jinja
Raw Normal View History

2026-08-28 11:03:45 +00:00
#jinja2: trim_blocks: True, lstrip_blocks: True
{% macro set_daddr(rule) %}
2026-09-20 22:14:56 +00:00
{%- if rule in (xray_ip_sets | default([])) or rule in (xray_static_sets | default([])) -%}
2026-08-28 11:03:45 +00:00
{{ rule }}_ip
2026-09-20 22:14:56 +00:00
{%- elif rule in (xray_domain_sets | default([])) -%}
2026-08-28 11:03:45 +00:00
{{ rule }}_dom
2026-09-20 22:14:56 +00:00
{%- endif -%}
2026-08-28 11:03:45 +00:00
{% endmacro %}
{% for rule in output_rules | default([]) | sort %}
2026-09-20 22:14:56 +00:00
ip daddr @{{ set_daddr(rule) }} meta mark set {{ xray_fwmark }} counter accept comment "router -> tproxy"
{% endfor %}