Self-contained HTTP/HTTPS/TCP/UDP reverse proxy manager written in Go, with SQLite storage, a Bootstrap 5 admin UI (Go templates, no JS framework), and a REST API under /api/v1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTXFrNP1imCW7jtfL5SZrw
41 lines
2.2 KiB
HTML
41 lines
2.2 KiB
HTML
{{define "streams"}}{{template "header" .}}
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<input type="text" class="form-control w-auto" placeholder="Search streams…" data-search-target="streamsTable">
|
|
<a href="/streams/new" class="btn btn-primary"><i class="bi bi-plus-lg"></i> Add Stream</a>
|
|
</div>
|
|
<div class="card">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0" id="streamsTable">
|
|
<thead class="table-light">
|
|
<tr><th>Protocol</th><th>Listen</th><th>Destination</th><th>PROXY protocol</th><th>Status</th><th></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Data}}
|
|
<tr>
|
|
<td><span class="badge text-bg-{{if eq .Protocol "tcp"}}primary{{else}}purple bg-secondary{{end}}">{{.Protocol}}</span></td>
|
|
<td>{{.ListenIP}}:{{.ListenPort}}</td>
|
|
<td>{{.DestinationHost}}:{{.DestinationPort}}</td>
|
|
<td>{{if .ProxyProtocol}}<i class="bi bi-check-lg text-success"></i>{{else}}—{{end}}</td>
|
|
<td>{{if .Enabled}}<span class="badge text-bg-success">enabled</span>{{else}}<span class="badge text-bg-secondary">disabled</span>{{end}}</td>
|
|
<td class="text-end">
|
|
<form method="post" action="/streams/{{.ID}}/toggle" class="d-inline">
|
|
{{template "csrf_field" $.CSRFToken}}
|
|
<button class="btn btn-sm btn-outline-secondary"><i class="bi bi-power"></i></button>
|
|
</form>
|
|
<a href="/streams/{{.ID}}/edit" class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></a>
|
|
<form method="post" action="/streams/{{.ID}}/delete" id="del-stream-{{.ID}}" class="d-inline">
|
|
{{template "csrf_field" $.CSRFToken}}
|
|
</form>
|
|
<button type="button" class="btn btn-sm btn-outline-danger" data-confirm-delete-form="del-stream-{{.ID}}" data-confirm-message="Delete this stream?"><i class="bi bi-trash"></i></button>
|
|
</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr><td colspan="6" class="text-center text-secondary py-4">No streams yet.</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{template "confirm_delete_modal" .}}
|
|
{{template "footer" .}}{{end}}
|