feat: rebranded from vpn-router to linux-manager.

This commit is contained in:
slawek committed 2026-11-22 09:51:07 +01:00
1 parent 8efe21bfa6
commit 85a1ffa21f
238 files changed
+5010 -3761

No files matched your search

+9 -9
View File
@@ -3,11 +3,11 @@ import { useState, type FormEvent } from 'react'
import { ADDRESS_PATTERN, LISTEN_CHOICES, ZONE_PATTERN, type DnsSettings, type Listen } from './api.ts'
/**
* A dialog that edits the router's dns section: whether the name server runs, the secondary name server of every
* domain, the interfaces it answers on and the TTL, and wan.public_address, the router's public IP the records of the
* sites with Public IP take. The primary name server is the router's FQDN, nameserver, shown and not edited. An enabled
* name server needs a secondary other than the router's FQDN. onSave sends the section and the public address; the
* dialog closes when it succeeds and shows the router's message when it fails.
* A dialog that edits the server's dns section: whether the name server runs, the secondary name server of every
* domain, the interfaces it answers on and the TTL, and wan.public_address, the server's public IP the records of the
* sites with Public IP take. The primary name server is the server's FQDN, nameserver, shown and not edited. An enabled
* name server needs a secondary other than the server's FQDN. onSave sends the section and the public address; the
* dialog closes when it succeeds and shows the server's message when it fails.
*/
export default function DnsSettingsDialog(props: {
current: DnsSettings
@@ -26,7 +26,7 @@ export default function DnsSettingsDialog(props: {
const secondaryProblem = secondary === '' ? (enabled ? 'Required while enabled.' : '')
: !ZONE_PATTERN.test(secondary) ? 'A DNS name in lower case.'
: secondary === props.nameserver ? 'The secondary is not the router\'s FQDN, the primary.' : ''
: secondary === props.nameserver ? 'The secondary is not the server\'s FQDN, the primary.' : ''
const addressProblem = publicAddress === '' || ADDRESS_PATTERN.test(publicAddress) ? '' : 'Not an IP address.'
const ttlProblem = /^\d{2,5}$/.test(ttl) && Number(ttl) >= 60 && Number(ttl) <= 86400 ? '' : '60 to 86400 seconds.'
const blocked = secondaryProblem !== '' || addressProblem !== '' || ttlProblem !== ''
@@ -55,9 +55,9 @@ export default function DnsSettingsDialog(props: {
<FormControlLabel control={<Switch checked={enabled} onChange={(event) => setEnabled(event.target.checked)} />} label="Enabled" />
<TextField
label="Primary name server"
value={props.nameserver || '(the router has no FQDN)'}
value={props.nameserver || '(the server has no FQDN)'}
disabled
helperText="The router's FQDN: the SOA and the first NS of every domain."
helperText="The server's FQDN: the SOA and the first NS of every domain."
/>
<TextField
label="Secondary name server"
@@ -73,7 +73,7 @@ export default function DnsSettingsDialog(props: {
value={publicAddress}
autoComplete="off"
error={addressProblem !== ''}
helperText={addressProblem || 'The router\'s public IP, for the records of the sites with Public IP. Empty: none.'}
helperText={addressProblem || 'The server\'s public IP, for the records of the sites with Public IP. Empty: none.'}
onChange={(event) => setPublicAddress(event.target.value.trim().toLowerCase())}
/>
<Stack direction="row" sx={{ gap: 2 }}>