feat(aa): add support for advanced network rule.

This commit is contained in:
Alexandre Pujol 2025-08-24 23:08:41 +02:00
parent bfcf9f846c
commit 3a17dd3310
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
3 changed files with 73 additions and 22 deletions

View file

@ -15,6 +15,22 @@
{{ " " }}{{ . }}
{{- end -}}
{{- end -}}
{{- with .LocalAddress.IP -}}
{{ " ip=" }}{{ . }}
{{- end -}}
{{- with .LocalAddress.Port -}}
{{ " port=" }}{{ . }}
{{- end -}}
{{- if and .PeerAddress.IP .PeerAddress.Port -}}
{{ " peer=(ip=" }}{{ .PeerAddress.IP }}{{ ", port="}}{{ .PeerAddress.Port }}{{ ")" }}
{{- else -}}
{{- with .PeerAddress.IP -}}
{{ " peer=(ip=" }}{{ . }}{{ ")" }}
{{- end -}}
{{- with .PeerAddress.Port -}}
{{ " peer=(port=" }}{{ . }}{{ ")" }}
{{- end -}}
{{- end -}}
{{- "," -}}
{{- template "comment" . -}}
{{- end -}}