feat: optional label on a forward rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
redteaandClaude Opus 5.5 committed 2026-10-13 20:31:41 +03:00
1 parent 201d63ee1e
commit b51363bf72
3 files changed
+29 -10

No files matched your search

+6 -1
View File
@@ -40,7 +40,7 @@
<h2>Правила</h2>
{{if .Rules}}
<table>
<thead><tr><th>Тип</th><th>Хост (порт)</th><th>→ Клиент (порт)</th><th>Слушать на</th><th></th></tr></thead>
<thead><tr><th>Тип</th><th>Хост (порт)</th><th>→ Клиент (порт)</th><th>Слушать на</th><th>Метка</th><th></th></tr></thead>
<tbody>
{{range .Rules}}
<tr>
@@ -48,6 +48,7 @@
<td class="muted">:{{.HostPort}}</td>
<td class="muted">127.0.0.1:{{.ClientPort}}</td>
<td class="muted">{{.ListenAddr}}{{if and .NoUfw $.UfwEnabled}} · без ufw{{end}}</td>
<td>{{.Label}}</td>
<td style="text-align:right">
<form method="post" action="/forwards/{{.ID}}/delete" style="display:inline"
onsubmit="return confirm('Удалить правило?')">
@@ -89,6 +90,10 @@
<label>Слушать на хосте</label>
<input type="text" name="listen_addr" value="0.0.0.0" style="max-width:160px">
</div>
<div class="fld" style="flex:1; min-width:200px">
<label>Метка (необязательно)</label>
<input type="text" name="label" maxlength="80" placeholder="для чего это правило">
</div>
<button type="submit">Создать</button>
</div>
{{if .UfwEnabled}}