Dont duplicate interfaces on port change

This commit is contained in:
2026-08-01 06:31:15 +03:00
parent a2ae800a19
commit bc0ef8c613
2 changed files with 24 additions and 6 deletions
+18
View File
@@ -99,5 +99,23 @@ export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
receipts.push(await tlsOrigin.export([stratumTls])) receipts.push(await tlsOrigin.export([stratumTls]))
} }
// Drop bindings we no longer use. `bindPort` registers a binding per
// (hostId, internalPort) and nothing removes the old one when the user
// changes a port in Configure — the stale binding lingers and the OS lists
// its interface again, so the UI shows two identical "Stratum" entries (and
// keeps a forward open on the abandoned port). Packages with fixed ports
// never hit this; ours has user-configurable ports, so it must clean up
// after itself. Runs last, after the current bindings exist, so the `except`
// list is exactly what we just bound.
await sdk.clearBindings(effects, {
except: [
{ id: uiHostId, internalPort: uiPort },
{ id: stratumHostId, internalPort: stratumPort },
...(ports?.tlsEnabled
? [{ id: stratumTlsHostId, internalPort: stratumTlsPort }]
: []),
],
})
return receipts return receipts
}) })
+6 -6
View File
@@ -21,18 +21,18 @@ type LegacyConfig = {
} }
export const current = VersionInfo.of({ export const current = VersionInfo.of({
version: '0.2.0:0', version: '0.2.0:1',
releaseNotes: { releaseNotes: {
en_US: en_US:
'StartOS 0.4.0 port. Stratum is now exposed directly on the LAN as a raw TCP interface (no more router forwards or simpleproxy), Bitcoin Core is reached over the internal network bridge with cookie authentication, and settings moved from Config to the Configure action. Existing settings, found-block history, and the stratum TLS certificate are migrated automatically.', 'Adds configurable stratum and stratum-TLS ports to the Configure action, and fixes a duplicate Stratum interface left behind when a port is changed. StartOS 0.4.0 port: stratum is exposed directly on the LAN as a raw TCP interface (no more router forwards or simpleproxy), Bitcoin Core is reached over the internal network bridge with cookie authentication, and settings moved from Config to the Configure action. Existing settings, found-block history, and the stratum TLS certificate are migrated automatically.',
es_ES: es_ES:
'Adaptación a StartOS 0.4.0. Stratum ahora se expone directamente en la LAN como interfaz TCP, Bitcoin Core se alcanza a través del puente de red interno con autenticación por cookie, y la configuración se movió a la acción Configurar. Los ajustes existentes, el historial de bloques y el certificado TLS se migran automáticamente.', 'Añade puertos stratum y stratum-TLS configurables en la acción Configurar, y corrige una interfaz Stratum duplicada que quedaba al cambiar un puerto. Adaptación a StartOS 0.4.0: Stratum se expone directamente en la LAN como interfaz TCP, Bitcoin Core se alcanza a través del puente de red interno con autenticación por cookie, y la configuración se movió a la acción Configurar. Los ajustes existentes, el historial de bloques y el certificado TLS se migran automáticamente.',
de_DE: de_DE:
'Portierung auf StartOS 0.4.0. Stratum wird jetzt direkt im LAN als TCP-Schnittstelle bereitgestellt, Bitcoin Core wird über die interne Netzwerk-Bridge mit Cookie-Authentifizierung erreicht, und die Einstellungen sind in die Aktion „Konfigurieren“ umgezogen. Bestehende Einstellungen, Blockhistorie und das TLS-Zertifikat werden automatisch migriert.', 'Fügt konfigurierbare Stratum- und Stratum-TLS-Ports in der Aktion „Konfigurieren“ hinzu und behebt eine doppelte Stratum-Schnittstelle, die beim Ändern eines Ports zurückblieb. Portierung auf StartOS 0.4.0: Stratum wird direkt im LAN als TCP-Schnittstelle bereitgestellt, Bitcoin Core wird über die interne Netzwerk-Bridge mit Cookie-Authentifizierung erreicht, und die Einstellungen sind in die Aktion „Konfigurieren“ umgezogen. Bestehende Einstellungen, Blockhistorie und das TLS-Zertifikat werden automatisch migriert.',
pl_PL: pl_PL:
'Port na StartOS 0.4.0. Stratum jest teraz udostępniany bezpośrednio w sieci LAN jako interfejs TCP, Bitcoin Core jest osiągany przez wewnętrzny mostek sieciowy z uwierzytelnianiem cookie, a ustawienia przeniesiono do akcji Konfiguruj. Istniejące ustawienia, historia bloków i certyfikat TLS są migrowane automatycznie.', 'Dodaje konfigurowalne porty stratum i stratum-TLS w akcji Konfiguruj oraz naprawia zduplikowany interfejs Stratum pozostający po zmianie portu. Port na StartOS 0.4.0: Stratum jest udostępniany bezpośrednio w sieci LAN jako interfejs TCP, Bitcoin Core jest osiągany przez wewnętrzny mostek sieciowy z uwierzytelnianiem cookie, a ustawienia przeniesiono do akcji Konfiguruj. Istniejące ustawienia, historia bloków i certyfikat TLS są migrowane automatycznie.',
fr_FR: fr_FR:
'Portage vers StartOS 0.4.0. Stratum est désormais exposé directement sur le LAN comme interface TCP, Bitcoin Core est atteint via le pont réseau interne avec authentification par cookie, et les réglages ont migré vers laction Configurer. Les réglages existants, lhistorique des blocs et le certificat TLS sont migrés automatiquement.', 'Ajoute des ports stratum et stratum-TLS configurables dans laction Configurer, et corrige une interface Stratum en double laissée après un changement de port. Portage vers StartOS 0.4.0 : Stratum est exposé directement sur le LAN comme interface TCP, Bitcoin Core est atteint via le pont réseau interne avec authentification par cookie, et les réglages ont migré vers laction Configurer. Les réglages existants, lhistorique des blocs et le certificat TLS sont migrés automatiquement.',
}, },
migrations: { migrations: {
up: async ({ effects }) => { up: async ({ effects }) => {