Bump version to 0.2.7 to add upstream share card features
This commit is contained in:
28 files changed
+255
-254
No files matched your search
+17
-17
@@ -19,7 +19,7 @@ export const uiPort = 8080
|
||||
/**
|
||||
* In-container bind ports. These are FIXED and never user-configurable, which
|
||||
* is load-bearing: a binding is keyed by (hostId, internalPort), so moving an
|
||||
* internal port registers a *new* binding and orphans the old one — StartOS
|
||||
* internal port registers a *new* binding and orphans the old one, StartOS
|
||||
* disables the orphan but keeps listing it, and the user sees a duplicate
|
||||
* interface. Keeping these constant means each host has exactly one binding
|
||||
* for the lifetime of the install, and a port change is a pure rebind that
|
||||
@@ -36,7 +36,7 @@ export const stratumTlsInternalPort = 3334
|
||||
* declared to kamado-api via STRATUM_SERVERS (see stratumServers below).
|
||||
*
|
||||
* Both are bound unconditionally, even when nothing is listening in front of
|
||||
* them. That is deliberate — see stratumServerUrls.
|
||||
* them. That is deliberate, see stratumServerUrls.
|
||||
*/
|
||||
/** Self-signed certificate, for miners on the local network. */
|
||||
export const ckpoolTlsLoopbackPort = 3437
|
||||
@@ -46,7 +46,7 @@ export const ckpoolTlsLoopbackPort = 3437
|
||||
* Unlike the self-signed bind above this one listens on 0.0.0.0, because the
|
||||
* terminator in front of it is StartOS itself rather than our in-container
|
||||
* stunnel: the OS decrypts on the public interface and forwards over the LXC
|
||||
* bridge, which never arrives on loopback. It has to be the OS — StartOS only
|
||||
* bridge, which never arrives on loopback. It has to be the OS, StartOS only
|
||||
* provisions ACME certificates for bindings it terminates TLS for, so a raw
|
||||
* TCP binding is offered no certificate authority at all in the UI.
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ export const defaultStratumPublicTlsPort = 3335
|
||||
*
|
||||
* Deliberately not conditional on the local-TLS toggle: the TLS interface is
|
||||
* bound unconditionally now (so a public domain can be attached to it), which
|
||||
* means the two external ports always collide if they match — even with the
|
||||
* means the two external ports always collide if they match, even with the
|
||||
* toggle off.
|
||||
*/
|
||||
export function validatePorts(opts: {
|
||||
@@ -128,7 +128,7 @@ export function stratumServerUrls(): string[] {
|
||||
/**
|
||||
* The meaning of each stratumServerUrls() entry, handed to kamado-api as
|
||||
* STRATUM_SERVERS so the dashboard can name the transport on hover instead of
|
||||
* assuming a bind order. `publicDomains` only affects the label text — the
|
||||
* assuming a bind order. `publicDomains` only affects the label text, the
|
||||
* array shape is fixed.
|
||||
*
|
||||
* These strings surface in the (English-only) dashboard, not the StartOS UI,
|
||||
@@ -136,16 +136,16 @@ export function stratumServerUrls(): string[] {
|
||||
*/
|
||||
export function stratumServers(publicDomains: string[]): StratumServer[] {
|
||||
return [
|
||||
{ kind: 'plain', label: 'Plaintext — not encrypted' },
|
||||
{ kind: 'plain', label: 'Plaintext, not encrypted' },
|
||||
{
|
||||
kind: 'tls-local',
|
||||
label: 'TLS — self-signed certificate (local network)',
|
||||
label: 'TLS, self-signed certificate (local network)',
|
||||
},
|
||||
{
|
||||
kind: 'tls-public',
|
||||
label: publicDomains.length
|
||||
? `TLS — CA-issued certificate for ${publicDomains.join(', ')}`
|
||||
: 'TLS — CA-issued certificate for a public domain',
|
||||
? `TLS, CA-issued certificate for ${publicDomains.join(', ')}`
|
||||
: 'TLS, CA-issued certificate for a public domain',
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -171,7 +171,7 @@ export type EndpointPort = {
|
||||
/**
|
||||
* Public domains attached to this binding, with the port each is published
|
||||
* on. That port follows the *requested* value, so it can differ from
|
||||
* `assigned` — the domain and the IP addresses of one interface are not
|
||||
* `assigned`: the domain and the IP addresses of one interface are not
|
||||
* necessarily reachable on the same number.
|
||||
*/
|
||||
domains: { fqdn: string; port: number }[]
|
||||
@@ -181,7 +181,7 @@ export type EndpointPort = {
|
||||
* Resolve all three stratum endpoints. `mode` picks the read strategy: 'const'
|
||||
* in main (so a port reassignment re-fires it), 'once' in an action.
|
||||
*
|
||||
* The public-domain endpoint is read from `assignedSslPort` — the OS terminates
|
||||
* The public-domain endpoint is read from `assignedSslPort`, the OS terminates
|
||||
* TLS there, so the port miners connect to is the SSL one; `assignedPort` on
|
||||
* that binding is the decrypted side, which is not published.
|
||||
*/
|
||||
@@ -226,7 +226,7 @@ export async function endpointPorts(
|
||||
const binding = host?.bindings[spec.internalPort]
|
||||
const net = binding?.net
|
||||
// Public domains are published on the port the binding *requested*
|
||||
// (addSsl.preferredExternalPort), not the one the OS assigned — so a
|
||||
// (addSsl.preferredExternalPort), not the one the OS assigned, so a
|
||||
// domain and an IP address on the same interface can advertise
|
||||
// different ports. Read the domain entries rather than deriving them.
|
||||
const domains = (binding?.addresses.available ?? [])
|
||||
@@ -276,7 +276,7 @@ export const stratumPublicTlsHostId = 'stratum-tls-public'
|
||||
export const kamadoRoot = '/root/.kamado'
|
||||
/** ckpool volume mountpoint: ckpool's own state + daily logs (logs/) */
|
||||
export const ckpoolRoot = '/root/.ckpool'
|
||||
/** bitcoind's data dir (read-only dependency mount) — used for .cookie auth */
|
||||
/** bitcoind's data dir (read-only dependency mount), used for .cookie auth */
|
||||
export const btcMountpoint = '/mnt/bitcoind'
|
||||
|
||||
export const ckpoolLogDir = `${ckpoolRoot}/logs`
|
||||
@@ -288,8 +288,8 @@ export const tlsDir = `${kamadoRoot}/tls`
|
||||
|
||||
/**
|
||||
* stunnel's config directory, on the subcontainer rootfs rather than a volume.
|
||||
* The config is re-rendered on every main run, so — like ckpool.conf and its
|
||||
* RPC credentials — it lives somewhere ephemeral. The self-signed certificate
|
||||
* The config is re-rendered on every main run, so, like ckpool.conf and its
|
||||
* RPC credentials, it lives somewhere ephemeral. The self-signed certificate
|
||||
* it serves is the one thing that stays on the volume, because its fingerprint
|
||||
* has to survive restarts for miners that pin it.
|
||||
*/
|
||||
@@ -395,7 +395,7 @@ export function bridgeAddress(
|
||||
|
||||
/**
|
||||
* Public (clearnet) domains the user has attached to a host, as a minimal
|
||||
* reactive value — the same pattern as bridgeAddress.
|
||||
* reactive value, the same pattern as bridgeAddress.
|
||||
*
|
||||
* The user adds these in the StartOS interface UI, so this is the package's
|
||||
* only source of truth for "is there a domain to get a CA-issued certificate
|
||||
@@ -426,7 +426,7 @@ export function publicDomains(
|
||||
|
||||
/**
|
||||
* bitcoind's RPC and ZMQ-block endpoints over the LXC bridge. Two reactive
|
||||
* bridge-address watches — one per bitcoind host — each chained `.const()`,
|
||||
* bridge-address watches, one per bitcoind host, each chained `.const()`,
|
||||
* so main restarts only when an address actually changes: a bitcoind update
|
||||
* is 0 restarts, bitcoind installed after Kamado is one healing restart, and
|
||||
* uninstall is one restart. Each resolves null while bitcoind is absent (or,
|
||||
|
||||
Reference in new issue
Block a user