|
|
|
|
|
|
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
{%- endmacro %} |
|
|
{%- endmacro %} |
|
|
[Interface] |
|
|
[Interface] |
|
|
{{ output_list_if_set(interface, 'address', 'Address') %} |
|
|
|
|
|
{{ output_if_set(interface, 'listenport', 'ListenPort') %} |
|
|
|
|
|
{{ output_list_if_set(interface, 'dns', 'DNS') %} |
|
|
|
|
|
{{ output_if_set(interface, 'mtu', 'MTU') %} |
|
|
|
|
|
{{ output_if_set(interface, 'privatekey', 'PrivateKey') %} |
|
|
|
|
|
{{ output_if_set(interface, 'table', 'Table') %} |
|
|
|
|
|
{{ output_if_set(interface, 'preup', 'PreUp') %} |
|
|
|
|
|
{{ output_if_set(interface, 'postup', 'PostUp') %} |
|
|
|
|
|
{{ output_if_set(interface, 'predown', 'PreDown') %} |
|
|
|
|
|
{{ output_if_set(interface, 'postdown', 'PostDown') %} |
|
|
|
|
|
{{ output_if_set(interface, 'saveconfig', 'SaveConfig') %} |
|
|
|
|
|
{{ output_if_set(interface, 'fwmark', 'FwMark') %} |
|
|
|
|
|
|
|
|
{{ output_list_if_set(interface, 'address', 'Address') }} |
|
|
|
|
|
{{ output_if_set(interface, 'listenport', 'ListenPort') }} |
|
|
|
|
|
{{ output_list_if_set(interface, 'dns', 'DNS') }} |
|
|
|
|
|
{{ output_if_set(interface, 'mtu', 'MTU') }} |
|
|
|
|
|
{{ output_if_set(interface, 'privatekey', 'PrivateKey') }} |
|
|
|
|
|
{{ output_if_set(interface, 'table', 'Table') }} |
|
|
|
|
|
{{ output_if_set(interface, 'preup', 'PreUp') }} |
|
|
|
|
|
{{ output_if_set(interface, 'postup', 'PostUp') }} |
|
|
|
|
|
{{ output_if_set(interface, 'predown', 'PreDown') }} |
|
|
|
|
|
{{ output_if_set(interface, 'postdown', 'PostDown') }} |
|
|
|
|
|
{{ output_if_set(interface, 'saveconfig', 'SaveConfig') }} |
|
|
|
|
|
{{ output_if_set(interface, 'fwmark', 'FwMark') }} |
|
|
|
|
|
|
|
|
{%- for peer in interface.get('peers', []) %} |
|
|
{%- for peer in interface.get('peers', []) %} |
|
|
[Peer] |
|
|
[Peer] |
|
|
{{ output_if_set(peer, 'publickey', 'PublicKey') %} |
|
|
|
|
|
{{ output_if_set(peer, 'presharedkey', 'PresharedKey') %} |
|
|
|
|
|
{{ output_list_if_set(peer, 'allowedips', 'AllowedIPs') %} |
|
|
|
|
|
{{ output_if_set(peer, 'endpoint', 'Endpoint') %} |
|
|
|
|
|
{{ output_if_set(peer, 'persistentkeepalive', 'PersistentKeepalive') %} |
|
|
|
|
|
|
|
|
{{ output_if_set(peer, 'publickey', 'PublicKey') }} |
|
|
|
|
|
{{ output_if_set(peer, 'presharedkey', 'PresharedKey') }} |
|
|
|
|
|
{{ output_list_if_set(peer, 'allowedips', 'AllowedIPs') }} |
|
|
|
|
|
{{ output_if_set(peer, 'endpoint', 'Endpoint') }} |
|
|
|
|
|
{{ output_if_set(peer, 'persistentkeepalive', 'PersistentKeepalive') }} |
|
|
{%- endfor %} |
|
|
{%- endfor %} |