feat(relay): accept a full URL host so relays work behind an HTTPS proxy

Network relay boards (WebSwitch/KMTronic/Dingtian) were always reached at
http://<host>, so a board on the LAN behind a reverse proxy — the common remote
setup where the operator's 80/443 already go to Nginx Proxy Manager — couldn't be
reached from outside. relayBase() now keeps a scheme the operator supplies
(https://relay.example.com, optional sub-path) and only defaults to http:// for a
bare host/host:port. UI hint + test added.
This commit is contained in:
2026-08-06 09:26:16 +02:00
parent 9bfb44925b
commit 62cdabe114
5 changed files with 46 additions and 11 deletions
@@ -672,6 +672,7 @@ function DeviceEditor({ device, onChange, onSave, onCancel, t }: {
<div className={cn('space-y-1', (isKM || isDingtian) ? '' : 'max-w-xs')}>
<Label>{t('station.host')}</Label>
<Input className="font-mono" value={device.host} placeholder="192.168.1.100" onChange={(e) => onChange({ ...device, host: e.target.value })} />
<span className="text-[10px] text-muted-foreground">{t('station.hostHint')}</span>
</div>
{/* Dingtian: both are OFF on a factory board — the session ID only when
"HTTP Session" is enabled in its web page, the password only when a