Add optional HTTP->HTTPS redirect per proxy target

Each target can now have an HTTP port with a checkbox to enable
automatic redirect to HTTPS. Configurable in WebUI and API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-09 22:32:31 +02:00
parent 0206b5b73a
commit 261482232c
2 changed files with 51 additions and 0 deletions
+26
View File
@@ -237,6 +237,16 @@
<label>Listen-Port (fuer IP-Zugriff)</label>
<input type="number" name="listen_port" placeholder="z.B. 8080" min="0" max="65535">
</div>
<div class="form-group" style="max-width: 200px;">
<label>HTTP-Port (Redirect)</label>
<input type="number" name="http_port" placeholder="z.B. 8080" min="0" max="65535">
</div>
<div class="form-group" style="max-width: 200px; justify-content: center;">
<label>
<input type="checkbox" name="http_redirect" style="width:auto;margin-right:6px;">
HTTP &rarr; HTTPS Redirect
</label>
</div>
</div>
<div class="form-group">
@@ -301,6 +311,11 @@
<span>Domain:</span> {{ d.domain }}:{{ d.port }}
</div>
{% endfor %}
{% if target.http_redirect and target.http_port %}
<div class="target-detail">
<span>HTTP Redirect:</span> Port {{ target.http_port }} &rarr; HTTPS
</div>
{% endif %}
</div>
<!-- Edit form -->
@@ -332,6 +347,17 @@
<label>Listen-Port</label>
<input type="number" name="listen_port" value="{{ target.listen_port or '' }}">
</div>
<div class="form-group" style="max-width: 200px;">
<label>HTTP-Port (Redirect)</label>
<input type="number" name="http_port" value="{{ target.http_port or '' }}">
</div>
<div class="form-group" style="max-width: 200px; justify-content: center;">
<label>
<input type="checkbox" name="http_redirect" style="width:auto;margin-right:6px;"
{{ "checked" if target.http_redirect }}>
HTTP &rarr; HTTPS Redirect
</label>
</div>
</div>
<div class="form-group">
<label>Domaenen</label>