Files
vibeproxy/internal/web/templates/stream_form.html
T
owenandClaude Sonnet 5 ba1f7c4c03 Initial vibeproxy implementation
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
2026-08-17 10:28:59 -05:00

62 lines
2.7 KiB
HTML

{{define "stream_form"}}{{template "header" .}}
{{$d := .Data}}{{$s := $d.Stream}}
<div class="card"><div class="card-body">
<form method="post" action="{{if $d.IsNew}}/streams/new{{else}}/streams/{{$s.ID}}/edit{{end}}">
{{template "csrf_field" .CSRFToken}}
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Protocol</label>
<select class="form-select" name="protocol">
<option value="tcp" {{if eq $s.Protocol "tcp"}}selected{{end}}>TCP</option>
<option value="udp" {{if eq $s.Protocol "udp"}}selected{{end}}>UDP</option>
</select>
</div>
<div class="col-md-4">
<label class="form-label">Listen IP</label>
<input class="form-control" name="listen_ip" value="{{$s.ListenIP}}" placeholder="0.0.0.0 (all interfaces)">
</div>
<div class="col-md-2">
<label class="form-label">Listen Port</label>
<input class="form-control" name="listen_port" value="{{$s.ListenPort}}" required>
</div>
<div class="col-md-6">
<label class="form-label">Destination Host</label>
<input class="form-control" name="destination_host" value="{{$s.DestinationHost}}" required>
</div>
<div class="col-md-3">
<label class="form-label">Destination Port</label>
<input class="form-control" name="destination_port" value="{{$s.DestinationPort}}" required>
</div>
<div class="col-md-3">
<label class="form-label">Connect Timeout (ms)</label>
<input class="form-control" name="connect_timeout_ms" value="{{$s.ConnectTimeoutMS}}">
</div>
<div class="col-md-3">
<label class="form-label">Idle Timeout (ms)</label>
<input class="form-control" name="idle_timeout_ms" value="{{$s.IdleTimeoutMS}}">
</div>
<div class="col-md-9">
<label class="form-label">Comments</label>
<input class="form-control" name="comments" value="{{$s.Comments}}">
</div>
<div class="col-md-6">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" name="proxy_protocol" id="pp" {{if $s.ProxyProtocol}}checked{{end}}>
<label class="form-check-label" for="pp">Send PROXY protocol header to backend</label>
</div>
</div>
<div class="col-md-6">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" name="enabled" id="en" {{if $s.Enabled}}checked{{end}}>
<label class="form-check-label" for="en">Enabled</label>
</div>
</div>
</div>
<div class="mt-4">
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Save</button>
<a href="/streams" class="btn btn-outline-secondary">Cancel</a>
</div>
</form>
</div></div>
{{template "footer" .}}{{end}}