CA instead of leaf for StartTunnel (#3046)

* updated docs for CA instead of cert

* generate ca instead of self-signed in start-tunnel

* Fix formatting in START-TUNNEL.md installation instructions

* Fix formatting in START-TUNNEL.md

* fix infinite loop

* add success message to install

* hide loopback and bridge gateways

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
Matt Hill
2025-11-10 14:15:58 -07:00
committed by GitHub
parent 3efec07338
commit ce97827c42
6 changed files with 59 additions and 36 deletions

View File

@@ -56,7 +56,7 @@ export function getIp({ clients, range }: MappedSubnet) {
const net = IpNet.parse(range)
const last = net.broadcast()
for (let ip = net.add(1); ip.cmp(last) === -1; ip.add(1)) {
for (let ip = net.add(1); ip.cmp(last) === -1; ip = ip.add(1)) {
if (!clients[ip.address]) {
return ip.address
}

View File

@@ -228,24 +228,27 @@ export class PublicDomainService {
private gatewayAndAuthoritySpec() {
const data = this.data()!
const gateways = data.gateways.filter(
({ ipInfo: { deviceType } }) =>
deviceType !== 'loopback' && deviceType !== 'bridge',
)
return {
gateway: ISB.Value.dynamicSelect(() => ({
name: this.i18n.transform('Gateway'),
description: this.i18n.transform(
'Select a gateway to use for this domain.',
),
values: data.gateways.reduce<Record<string, string>>(
values: gateways.reduce<Record<string, string>>(
(obj, gateway) => ({
...obj,
[gateway.id]: gateway.name || gateway.ipInfo!.name,
[gateway.id]: gateway.name || gateway.ipInfo.name,
}),
{},
),
default: '',
disabled: data.gateways
.filter(
g => !g.ipInfo!.wanIp || utils.CGNAT.contains(g.ipInfo!.wanIp),
)
disabled: gateways
.filter(g => !g.ipInfo.wanIp || utils.CGNAT.contains(g.ipInfo.wanIp))
.map(g => g.id),
})),
authority: ISB.Value.select({