feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking: - E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes relay encrypted blobs transparently via Meshcore native routing - Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic looks like sensor data on the wire, 0xAA marker, configurable per-node - Pre-flight Bitcoin Core health check on relay node — specific error codes (bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails - mesh.relay-status RPC endpoint — frontend polls for relay result every 3s - On-Chain / Lightning tabs in Off-Grid Bitcoin panel - Archy Peers vs Mesh Broadcast relay mode selector - Mesh view fills viewport (no page scroll), internal panel scrolling - Version bump to 1.2.0-alpha Also includes: deploy hardening, container fixes, IndeedHub updates, boot screen, dashboard improvements, MASTER_PLAN task tracking Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
70f1348c15
commit
d37ec1dea5
@@ -27,9 +27,13 @@ const docker = new Docker()
|
||||
const app = express()
|
||||
const PORT = 5959
|
||||
|
||||
// Dev mode from environment (setup, onboarding, existing, or default)
|
||||
// Dev mode from environment (setup, onboarding, existing, boot, or default)
|
||||
const DEV_MODE = process.env.VITE_DEV_MODE || 'default'
|
||||
|
||||
// Boot mode: simulate server startup delay
|
||||
let BOOT_START_TIME = Date.now()
|
||||
const BOOT_DELAY_MS = 25000 // 25 seconds of simulated startup (slower for analysis)
|
||||
|
||||
// CORS configuration
|
||||
const corsOptions = {
|
||||
credentials: true,
|
||||
@@ -89,6 +93,15 @@ function initializeUserState() {
|
||||
passwordHash: MOCK_PASSWORD,
|
||||
}
|
||||
break
|
||||
case 'boot':
|
||||
// Boot mode: Simulate server startup delay (shows boot screen)
|
||||
// Server responds with 502 for the first 10 seconds, then works like onboarding mode
|
||||
userState = {
|
||||
setupComplete: true,
|
||||
onboardingComplete: false,
|
||||
passwordHash: MOCK_PASSWORD,
|
||||
}
|
||||
break
|
||||
default:
|
||||
// Default: Fully set up (for UI development)
|
||||
userState = {
|
||||
@@ -748,6 +761,26 @@ app.post('/rpc/v1', (req, res) => {
|
||||
const { method, params } = req.body
|
||||
console.log(`[RPC] ${method}`)
|
||||
|
||||
// Boot mode: return 502 during simulated startup delay
|
||||
if (DEV_MODE === 'boot') {
|
||||
// Reset boot timer when browser does a fresh page load (server.echo with 'boot' message)
|
||||
if (method === 'server.echo' && params?.message === 'boot-reset') {
|
||||
BOOT_START_TIME = Date.now()
|
||||
console.log(`[Boot] Timer RESET — simulating ${BOOT_DELAY_MS / 1000}s startup`)
|
||||
return res.status(502).json({ error: 'Server starting up (reset)' })
|
||||
}
|
||||
const elapsed = Date.now() - BOOT_START_TIME
|
||||
if (elapsed < BOOT_DELAY_MS) {
|
||||
const secs = Math.round(elapsed / 1000)
|
||||
const total = Math.round(BOOT_DELAY_MS / 1000)
|
||||
console.log(`[Boot] Server starting... ${secs}s / ${total}s`)
|
||||
return res.status(502).json({ error: 'Server starting up' })
|
||||
}
|
||||
if (elapsed < BOOT_DELAY_MS + 2000) {
|
||||
console.log(`[Boot] Server is now READY (took ${Math.round(elapsed / 1000)}s)`)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
switch (method) {
|
||||
// Authentication endpoints
|
||||
|
||||
Reference in New Issue
Block a user