Skip to content

v1.135.203 NETFORY WEB4.0 Network

Latest

Choose a tag to compare

@technologiespro technologiespro released this 29 Sep 02:29

dVPN (PQ Web), in‑app browser, storage & memory fixes
image

Companion components: pq-web 0.3.0 · pq-relay 0.2.0 · ntfry-tracker 1.7.0 (renamed from smartnet-tracker).

Highlights

  • PQ Web / dVPN - P2P HTTPS tunnelling through pq-web egress nodes over Iroh QUIC (ALPN netfory/pqweb/1). One‑click dVPN toggle in the address bar routes all browser traffic through the mesh; Auto mode tunnels only blocked domain bundles.
  • In‑app browser for regular https:// sites in isolated native web‑tabs (no Web3 bridge), with downloads, SPA URL tracking, bookmarks and a branded error page on all platforms.
  • Node API over Iroh only - HTTPS RPC removed from the hot path; requests fan out across the Iroh node group with rotation.
  • Storage/memory - fixed a blob‑store leak (hundreds of GB), ~400 MB/h heap growth, and temp‑file accumulation.
  • Wallet - BIP‑44 sub‑accounts from one seed (m/44'/255'/N'/0/0, Core‑Wallet compatible), extension‑style dashboard, address book, live history.
  • Settings -> Network rebuilt as a no‑scroll cockpit with a sticky status strip and sectioned side‑nav.

PQ Web (dVPN)

Client (src-tauri/src/webproxy.rs, websites.rs)

  • Local SOCKS5 router on 127.0.0.1:<port>; Windows: process‑wide PAC via WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--proxy-pac-url=data:… (DIRECT fallback); Linux/macOS: WebviewBuilder::proxy_url(socks5://…).
  • Domain bundles (youtube, x, telegram, iptest, …) with modes auto | relay | direct (sled cfg:webproxy:bundles). Direct‑path probe ≤ 2.5 s: DNS poisoning, RST, timeout, TLS ClientHello/SNI stall; per‑bundle route cache (ok 10 min / blocked 2 min).
  • dVPN total mode : every host outside bundles -> relay via nodes announced with open; auto bundles -> relay without probe; direct bundles stay direct. Route cache is flushed on toggle.
  • Tunnel: NF1 CONNECT host:port over Iroh (no MITM), fallback across the 3 best nodes, per‑node health (PING, RTT) 10 s after start and every 30 min.
  • Keep‑alive: pings cached connections / warms the best node so the first cold CONNECT through TLS‑443 relays succeeds when UDP is dropped by the ISP.
  • HUD: cyberpunk Connecting to NETFORY Relay · region · id · rtt page with up to 3 auto‑retries (relay-failed), then an honest PQ_TUNNEL_FAILED / PQ_NO_NODES error page. Browser error on a bundle host -> mark_blocked -> bundle switched to relay.
  • Node list from trackers: GET /pqweb with operator ECDSA signature (secp256k1, TOFU pin of /operator-pubkey, hard override SMARTNET_OPERATOR_PUBKEY); signed/unsigned/cached badges in UI; allow‑list nodes marked verified; manual nodes by EndpointId.
  • Commands: webproxy_status | set_mode | set_nodes | set_enabled | set_total | recheck; events webproxy-route, webproxy-relays, webproxy-total.

Server - pq-web 0.3.0 (/app/pq/pq-web)

  • Iroh Endpoint + Router/ProtocolHandler on ALPN netfory/pqweb/1; protocol NF1 CONNECT | PING | BENCH | INFO.
  • --open / --allow-all (env PQ_WEB_OPEN): any HTTPS host on allowed ports; otherwise allow‑list bundles (allow.rs, wildcards).
  • Per‑EndpointId stream & bandwidth limits (token bucket), SSRF filter, idle timeout, /metrics + /healthz, node key file (0600).
  • Tracker announce v3 (…|addrs|relay|open), Ed25519‑signed with the node key; CLI serve | id | check | bundles-example; systemd unit.

Relay - pq-relay 0.2.0 (/app/pq/pq-relay)

  • Modes: A DOMAIN -> built‑in ACME (TLS‑ALPN‑01) on 443 + QUIC/QAD 7842; B certbot PEM behind nginx; C legacy. Landing page “NETFORY Relay”. Env PQ_RELAY_* (legacy SMARTNET_RELAY_* accepted).

Tracker - ntfry-tracker 1.7.0 (/app/tracker)

  • Crate/binary renamed smartnet-tracker -> ntfry-tracker. GET /pqweb (live announces + PQWEB_NODES allow‑list, canon v3/v2/v1), POST /pqweb/announce with signature check, GET /operator-pubkey. OPERATOR_SECRET now signs both /seeders-dht and /pqweb.

In‑app browser (websites.rs, tabs.ts, AppLayout.vue)

  • Native child webview per tab, no initialization_script, outside embed-* capabilities. https:// only; http:// auto‑upgraded; SmartNet schemes -> host shell; window.open/_blank -> new tab.
  • Events site-nav, site-title, site-url (SPA pushState via SourceChanged/HistoryChanged on Windows, notify::uri on Linux), site-download (unique path in Downloads, reveal via site_reveal_download).
  • Branded error page (WebView2 NavigationCompleted), Linux (load_failed + TLS errors, webkit2gtk 2.0/v2_40), macOS (DNS+TCP:443 pre‑flight). Pre‑flight also in open_site_webview/site_navigate to avoid blank flashes.
  • Bookmarks (sth_web_bookmarks) on the dashboard; ★ in the address bar. Tray/get_window("main") fixes for multi‑webview windows.

Network core

  • sth_node.rs: pool_all() = Iroh only; iroh_order() / p2p_group(); custom clearnet node -> fallback to Iroh; tx/nonce mirroring to first Iroh node. clearnet_order, p2p_with_backup, iroh_backup, legacy_only removed.
  • Peerbook (peerbook.rs, p2p:peerbook:<nodeId>): cached relay/IP paths per peer (TTL 30 d, ≤ 8 addrs, ≤ 4 000 entries), roles Wallet|Api|Chat|Seed|Ai, used as Iroh AddressLookup for every connect (API, wallet stream, chat, blobs, AI); stealth relay allow‑list preserved.
  • build_default_endpoint: parallel TLS‑443 probe of own n1 relays -> RelayMode::Custom if alive, else n0 fallback (syslog net). Gossip watchdog: isolation counter/cooldown fixes, soft join_peers each cycle.
  • poll_trackers_parallel (3 s) for /seeders and /network/storage; network‑map snapshot cache (sth_netmap_snapshot), 30 s auto‑refresh, “MY NODE” row, Cloud Seeders tab.
  • Desktop seeding on by default for new installs (3 GB cap); parallel heartbeat with per‑tracker status (heartbeat_status).

Storage & memory

  • Blob store leak: add_path().await implied with_tag() -> permanent GC roots. Now import_path() via temp_tag() + SEED_HASHES; drop_legacy_tags() on open; GC every 120 s; purge_stale_temp (> 24 h) on start.
  • Heap growth: txindex::for_each streaming + seq change counter; sync_graph skipped when unchanged; history() cached by (addr, seq); txindex::all() removed.
  • Incremental social graph (subs:g:*, cursors per epoch) and full owner tx index (txi:<A>:t:*, pending set txi:<A>:p:*, TTL 15 min) in sled, fed live by the sth/events/1 stream; consumers: history, subscriptions, name recovery, chat key lookup.
  • Wallet dashboard snapshot (sth_wallet_snap:<identity>) + skeleton on cold start.

Wallet

  • crypto.rs: BIP‑39 seed (PBKDF2‑HMAC‑SHA512 × 2048) -> BIP‑32 m/44'/255'/N'/0/0; index 0 unchanged; hex:<privkey> signing path.
  • Dashboard redesign (balance modes STH ⇄ USDT ⇄ hidden, 7‑day sparkline via get_rate_history, pending cards, theme accents), networks store with probe_network_api (view‑only for non‑mainnet).
  • Send: address book (recent + messenger contacts), @name -> address via resolveUsername, keyboard navigation. Live updates from stream per involved address; optimistic pending; ERR_BAD_NONCE auto‑retry; first‑tx fix for fresh wallets.

Messenger

  • Avatar tap in group -> DM (openDmWith); @mention suggestions; onboarding + balance pre‑check; publish_chat_key syslog chat + result toast; reconnect banner / instant resync; 50‑message history window with lazy load.

Settings

  • Network tab (1.135.202): sticky status strip (dVPN, SOCKS5 port, pq‑web nodes ok/total, active node, online N/M, DHT nodes, trackers, relay‑only) -> click jumps to section; side‑nav sections PQ Web · SmartHoldem Nodes · Discovery · Relays & Privacy · Seeding & Downloads · Diagnostics (persisted in sth_settings_net_section). Advanced items (trackers, seeders, n1 relays, DHT diag, Network Doctor, manual pq‑web nodes) hidden in User mode.
  • Header toolbar (1.135.203): version pill with status dot, Check for updates and Crash log moved to the // SETTINGS_ header, visible on every tab.
  • Dashboard: manual “add site” form removed (bookmarks via ★ only); Network Map table styling.

Breaking / behaviour changes

  • smartnet-tracker binary and crate renamed to ntfry-tracker; update systemd units and paths.
  • Node RPC over HTTPS is no longer used in P2P builds (Iroh only); HTTPS pool remains only in builds without the p2p feature.
  • Desktop seeding defaults to enabled for installations without an explicit cfg:desktop_seeding_enabled setting.
  • Once a client has pinned an operator pubkey, unsigned or differently‑signed tracker lists are rejected - roll OPERATOR_SECRET out to every tracker at once.

Known issues

  • Cold first CONNECT on UDP‑blocked networks may still show the HUD for one retry cycle before the page loads (keep‑alive mitigates after ~25 s of uptime).
  • Gossip topic isolation (“online 0”) is under observation after relay‑priority changes; a relay health‑watch is planned.
  • Linux/macOS error page and download hooks rely on engine‑specific hooks; edge cases may fall back to the engine default.

Additional tools: