From e4c91426be957c28cd92413ae4b00015a4f40e54 Mon Sep 17 00:00:00 2001 From: syoul Date: Mon, 27 Apr 2026 02:31:58 +0200 Subject: [PATCH] feat(config): default tcp/quic listen ports to mycelium standard 9651/9652 Pinning ephemeral ports made the existing field useful but left the default behaviour (random port at every start) hostile to the typical private-network setup, where the user pre-configures a port-forward on their home router and expects mycelium to keep using the same port. Default to 9651 (TCP) and 9652 (QUIC), which match the public mycelium convention. Clearing either field still falls back to ephemeral. Help text updated; placeholder now says "leave empty for ephemeral" instead of "ephemeral" so users understand the field is currently filled with the default. --- src/stores/config.ts | 8 +++++--- src/views/Settings.vue | 13 ++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/stores/config.ts b/src/stores/config.ts index baf48a5..a95bc38 100644 --- a/src/stores/config.ts +++ b/src/stores/config.ts @@ -8,14 +8,16 @@ const KEY = "sidecar"; // A private overlay has no Threefold-operated seed peer. The user must // declare bootstrap peers they trust (their own VPS, known friends…) -// before the daemon can usefully start. +// before the daemon can usefully start. Default to mycelium's +// well-known peer-listen ports (9651 TCP, 9652 QUIC) so port-forwards +// on a home router are predictable from the first run. const DEFAULT_CONFIG: SidecarConfig = { peers: [], tunName: null, noTun: false, networkName: null, - tcpListenPort: null, - quicListenPort: null, + tcpListenPort: 9651, + quicListenPort: 9652, }; function normalizePort(p: unknown): number | null { diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 9a36f1c..638634e 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -412,7 +412,7 @@ onMounted(async () => { type="text" inputmode="numeric" class="mt-1 w-full rounded-md border border-input bg-background px-3 py-1.5 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring" - placeholder="ephemeral" + placeholder="leave empty for ephemeral" />
@@ -424,16 +424,15 @@ onMounted(async () => { type="text" inputmode="numeric" class="mt-1 w-full rounded-md border border-input bg-background px-3 py-1.5 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring" - placeholder="ephemeral" + placeholder="leave empty for ephemeral" />

- Pin these to a fixed value (e.g. 9651 for - TCP, 9652 for QUIC) when you port-forward - a stable port on your router so other private-network nodes can dial in - across daemon restarts. Leave empty to keep using a different ephemeral - port at every start. + Defaults are 9651 (TCP) and + 9652 (QUIC) — the conventional mycelium + peer-listen ports, predictable for port-forwarding on a home router. + Clear the field to fall back to a random ephemeral port at every start.