- Access split into Internet and Home network cards; network tiles inline, Auto-detect LAN beside them, other interfaces folded by kind - Devices reach each other: Off, Everyone or Circles (per server); circles with names, colours and members; a person's own devices always see each other while it is not off - Per-person home networks: people can be kept out of some of the server's networks (nft lan_part set, AllowedIPs follow) - Home services moved from Settings to Access, added from the devices the router sees over DHCP (ports they announce over Bonjour when umdns runs) - Who reaches what (rules summed up per access) and Check access (walks the same rules as nft and the client configuration, step by step) - Find home devices (Bonjour): umdns services published as DNS-SD records in dnsmasq; installs umdns from Access - Connections from home show the DHCP name with the address in brackets - Repaints keep the scroll position
This commit is contained in:
1 parent
82ab86848e
commit
aa8256bc60
26 files changed
+1661
-289
No files matched your search
@@ -9,7 +9,8 @@ import { api, type SetupDefaults } from '../api';
|
||||
import { attempt, button, callout, closeModal, confirmDialog, copyText, modal, notify } from '../ui';
|
||||
import { icon } from '../../shared/icons';
|
||||
import { duration } from '../../shared/format';
|
||||
import { interfacesCard } from '../interfaces';
|
||||
import { accessCards } from '../interfaces';
|
||||
import { checkAccess, whoReaches } from '../access';
|
||||
import { card, group, input, row, sw } from '../kit';
|
||||
import { methodInfo, methodPicker, type Method } from '../disguise';
|
||||
import { ServerOverview } from './overview';
|
||||
@@ -426,48 +427,12 @@ export class ServerPage {
|
||||
);
|
||||
}
|
||||
|
||||
/** Where devices may go and how their traffic leaves: internet path, WAN, home network, services. */
|
||||
/** Where devices may go and how their traffic leaves: internet path, home network, services, circles. */
|
||||
access(srv: Server): HTMLElement {
|
||||
const svcs = this.st.services;
|
||||
const reload = () => this.refresh();
|
||||
return E('div', { class: 'dl-stack gap16' }, [
|
||||
interfacesCard(srv.id, 'Access'),
|
||||
card(
|
||||
'Home services',
|
||||
[
|
||||
E(
|
||||
'p',
|
||||
{ class: 'dl-muted' },
|
||||
'People with Home-only access can be limited to these services instead of the whole home network (chosen per person). The list is shared by all servers.',
|
||||
),
|
||||
E(
|
||||
'div',
|
||||
{ class: 'dl-list' },
|
||||
svcs.length
|
||||
? svcs.map((sv) =>
|
||||
E('div', { class: 'dl-row' }, [
|
||||
icon('home'),
|
||||
E('span', { class: 'dl-row-main dl-stack' }, [
|
||||
E('b', {}, sv.name),
|
||||
E(
|
||||
'span',
|
||||
{ class: 'dl-mono dl-faint' },
|
||||
`${sv.address}${sv.ports.length ? ` · ports ${sv.ports.join(', ')}` : ' · all ports'}`,
|
||||
),
|
||||
]),
|
||||
]),
|
||||
)
|
||||
: [E('div', { class: 'dl-row dl-muted' }, 'No services yet.')],
|
||||
),
|
||||
],
|
||||
[
|
||||
E('span'),
|
||||
E(
|
||||
'a',
|
||||
{ class: 'cbi-button cbi-button-neutral', href: `${L.url('admin/network/dawnline/settings')}#dl-set-services` },
|
||||
'Edit in Settings',
|
||||
),
|
||||
],
|
||||
),
|
||||
accessCards(srv, this.st, reload),
|
||||
E('div', { class: 'dl-health-cols' }, [whoReaches(this.st, srv), checkAccess(this.st, srv)]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user