mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user