Skip to content

Commit 284a78e

Browse files
authored
Merge pull request #114 from shayanb/release/1.8.3
v1.8.3 — TUI menu + WebSocket default + dashboard/CLI user-mgmt fixes
2 parents bf025f0 + 4fb9ebc commit 284a78e

26 files changed

Lines changed: 811 additions & 263 deletions

.env.example

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,10 @@ GRAFANA_APP_TITLE=
366366
# Access via: https://{CDN_SUBDOMAIN}.{DOMAIN}
367367
CDN_SUBDOMAIN=cdn
368368

369-
# CDN transport type: httpupgrade (Cloudflare, less fingerprinted) or ws (CloudFront/universal WebSocket)
370-
# Use 'ws' if using AWS CloudFront — 'httpupgrade' will fail with CloudFront
371-
CDN_TRANSPORT=httpupgrade
369+
# CDN transport type: ws (WebSocket — default, universal client support, battle-tested
370+
# in heavy-censorship contexts) or httpupgrade (slightly lighter overhead, but newer
371+
# Xray clients warn it's deprecated and some CDNs like CloudFront don't support it).
372+
CDN_TRANSPORT=ws
372373

373374
# CDN transport path for inbound
374375
# Auto-generated with a realistic-looking path if empty (recommended for DPI evasion)

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.8.3] - 2026-06-02
11+
12+
### Added
13+
- **Architecture overview page** ([`docs/architecture.md`](docs/architecture.md)) — container topology grouped by Compose profile, dns-router fan-out, bundle generation flow (bootstrap container → state volume → host bundle writer), and the monitoring stack. Registered in the MkDocs nav under About.
14+
- **`site/llms.txt`** at the site root (served at `https://moav.sh/llms.txt`) — [llmstxt.org-spec](https://llmstxt.org/) discovery file with project summary plus categorized links so AI assistants can navigate the docs. Deploys via the existing GitHub Pages workflow.
15+
- **TUI main menu** expanded with four high-value commands previously only reachable via CLI: **Donate configs** (`moav donate`), **Doctor** (`moav doctor`), **Admin password reset** (`moav admin password`), and **Update MoaV** (`moav update`). Existing items 7 and 8 (build/rebuild, export/import) shift to 11 and 12; slots 1–6 unchanged for muscle memory. Menu grouped into "Services / Users & donations / System" with dim headers.
16+
- **New `moav users` sections** for AmneziaWG, Xray (XHTTP + XDNS), TrustTunnel, and Telegram MTProxy — previously the listing only showed sing-box, WireGuard, and bundles, so operators couldn't see who had access to four of the eight per-user services. Each new section reads from the appropriate config file (jq for xray, awk for telemt's TOML, etc.) and shows totals.
17+
18+
### Changed
19+
- **Default CDN transport flipped to WebSocket**`.env.example`'s `CDN_TRANSPORT` changed from `httpupgrade` to `ws`, and the three matching shell fallback defaults (`scripts/bootstrap.sh`, `scripts/singbox-user-add.sh`, `scripts/generate-user.sh`) now also fall back to `ws` so older installs that lack the `.env` line still pick up the new default. WebSocket is universally supported across V2Ray-family clients, battle-tested in heavy-censorship contexts (Iran/China), and first-class on Cloudflare. Newer Xray clients (≥ v26.x) emit a deprecation warning for `httpupgrade`. Overhead difference (~50 bytes/frame) is negligible. **Existing installs keep their current setting** — only fresh installs / re-bootstraps pick up the new default. Operators specifically needing httpupgrade (CloudFront edge cases) can flip it back.
20+
- **Bootstrap domain prompt re-asks on invalid input** — previously, an unparseable hostname (like `foo bar`) was saved with just a warning. The prompt now loops up to 3 attempts, explaining what a valid hostname needs (a dot, only letters/digits/dots/hyphens). After 3 invalid tries it saves the last value with a warning so the operator can fix `.env` manually. Empty input still means domainless mode.
21+
- **Interactive bootstrap surfaces Cloudflare's required SSL/TLS Flexible setting** — the DNS records prompt previously listed only the Origin Rule as a CDN requirement; operators commonly missed that Cloudflare must also be in **Flexible** SSL/TLS mode (port 2082 is plain HTTP) and got a confusing `525` error after. The prompt now lists both settings up-front, with the 521/525 error decoder inline. `docs/DNS.md`'s Cloudflare CDN section is restructured the same way (Flexible up-front, response-code table for verification).
22+
- **TUI add-user preview lists every service** — the "This will add 'X' to:" screen was stuck on the 1.7-era list (sing-box + WireGuard). Replaced with a grouped 5-line list reflecting what `user-add.sh` actually provisions: proxies (Reality / Trojan / Hysteria2 / SS-2022 / XHTTP / CDN VLESS+WS), VPN (WireGuard direct + wstunnel / AmneziaWG / TrustTunnel), DNS tunnels (dnstt / Slipstream / MasterDNS / XDNS), Telegram MTProxy, and GooseRelay if enabled. Also shows the bundle output path.
23+
- **TUI Admin item goes straight to password reset** — was calling `cmd_admin` (which only prints usage from the menu context); now calls `cmd_admin password` directly, since that's the only useful interactive subcommand. Menu label updated to "Admin password reset." The admin URL is already shown in the main-menu status header.
24+
- **Bootstrap container build message** says "may take a few minutes" instead of "may take a minute" — the first-time build is typically 2–5 minutes on a small VPS.
25+
- **Documentation pass for v1.8.2 drift**:
26+
- `docs/CLI.md` profiles table rewritten (was 11 rows missing the `dnstunnel` composite, `telegram`, `xhttp`, `gooserelay`, `amneziawg`, `monitoring`, and `setup` profiles); new "Disabled profiles" subsection under `moav start`; new `moav conduit-offsets` section (was 100% undocumented since 1.7.9).
27+
- `docs/DNS.md` consolidates the four separate NS-delegation Steps + two redundant "all 4 tunnels coexist on port 53" notes into a single table-based section, and the Cloudflare records table gains the missing `m` and `x` NS rows.
28+
- `docs/SETUP.md` drops the duplicated profile bullet list (cross-links to CLI.md); the 1.8.2 implementation-detail callout (cleaning behavior, readline, Ctrl-C recovery) replaced with a short user-facing note that the prompt accepts any input format and re-running picks up where you left off.
29+
- `docs/MONITORING.md` new "Conduit lifetime bandwidth" section documenting the offset watcher, recording rules, and auto-install behavior (1.7.9+ feature that was missing from docs).
30+
- `docs/philosophy.md` rewritten to integrate the article-derived narrative ("This Is Ours to Build", "What Infrastructure Actually Means", "The Internet Is Closing", "A Global Pattern", "The Arms Race Gets Creative", "You Are Donating Bandwidth", "The Window Is Open") with the existing institutional sections (Human Rights, Why Multi-Protocol Matters, Iran's Shutdown History), plus a cite-ready sources appendix.
31+
- `docs/client-guide-template.html` (bundle viewer): Telegram MTProxy section 9 now has a clickable "Open in Telegram" button on top of the copy-pastable link; Tor (10) + Psiphon (11) sections converted to collapsible `<details>` to match the V2Ray-compatible cards; WireGuard-over-WebSocket subsection inside WireGuard (6) also collapsible. EN + FA mirrors.
32+
33+
### Fixed
34+
- **Dashboard user-add silently broke after CLI user-revoke** — when an operator ran `sudo moav user revoke X`, `wg-user-revoke.sh` and `awg-user-revoke.sh` did `mktemp + awk > tmp; mv -f tmp orig`. `mv -f` swaps inodes, so the rewritten config ended up `-rw------- root:root`. The admin container (running as `moav:moav`) then couldn't write the same config on the next dashboard user-add → permission denied. Same pattern existed in the sing-box, Xray, and TrustTunnel rewrite paths. Replaced every `mv -f tmp orig` with `cat tmp > orig; rm -f tmp` so the original file's inode (and thus mode + owner) survives. `user-add.sh` and `user-revoke.sh` also run a `chmod a+rw` sweep over the six config files at the top of every invocation, so legacy installs whose perms were already broken self-heal on the next CLI op (no admin container restart required).
35+
- **`moav user revoke` reported "User not found in sing-box (skipping)" for users that did exist** — the outer check used `grep -q "\"name\":\"$USERNAME\"" configs/sing-box/config.json`, which requires `"name":"X"` with no whitespace between `:` and `"`. But `jq -S` (which renders the config) always emits `"name": "X"` with a space. Grep returned false-negative every time, the revoke skipped the sing-box cleanup (and its chain of TrustTunnel + telemt + xray), bundles got deleted but users stayed in the configs. Three checks (`user-revoke.sh`, `singbox-user-revoke.sh`, `singbox-user-add.sh`) replaced with the same jq query `user-list.sh` uses — whitespace-insensitive, source-of-truth consistent.
36+
- **Xray (XHTTP + XDNS) revoke was completely missing.** `singbox-user-revoke.sh` cleaned sing-box, TrustTunnel, and telemt but never touched `configs/xray/config.json`. Revoked users' XHTTP `vless://...?type=xhttp` and XDNS configs kept working. New jq-deletion block in `singbox-user-revoke.sh` removes the user from both `.settings.clients[]` and `.settings.users[]` (the v26.5.9 schema rename made these aliases — bootstrap writes the new `users` field, legacy add wrote `clients`, so we now check + delete in both). Restarts xray to apply.
37+
- **Xray users/clients alias split-brain.** Related to the previous: `moav users` showed "(no users)" for Xray on a working install, because bootstrap-added users live in `.settings.users` (template path) and the listing only checked `.settings.clients`. Fixed in `user-list.sh` (reads both); fixed in `singbox-user-add.sh` (exists-check now scans both; new users now written to the canonical `.settings.users` to match the template).
38+
- **`user-add.sh` GOPROXY auto-heal failed on read-only `.env`** — when the admin container called `user-add.sh`, `sed -i.bak .env` errored with "Read-only file system" because `/project` is mounted read-only inside the admin service. Now heals into a tempfile, sources the tempfile (so env vars load correctly), and only `cat`'s the heal back to `.env` when it's writable (the CLI path). The admin-container path no longer trips on the leading sed failure.
39+
- **Main-menu status line leaked `.env` inline comments** — the admin URL rendered as `https://t7d.my:9443 # Admin dashboard` because `get_admin_url`'s parser (`grep | cut -d= -f2 | tr -d '"'`) stripped quotes but not trailing `# comments`. Routed all four URL helpers (`get_admin_url`, `get_grafana_url`, `get_grafana_cdn_url`, `get_cdn_url`) through the existing `get_env_val` helper which strips both comments and whitespace.
40+
1041
## [1.8.2] - 2026-05-29
1142

1243
### Fixed

README-fa.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# MoaV
44

5+
[![Website](https://img.shields.io/badge/website-moav.sh-cyan.svg)](https://moav.sh) [![Docs](https://img.shields.io/badge/docs-moav.sh%2Fdocs-cyan.svg)](https://moav.sh/docs/) [![Version](https://img.shields.io/badge/version-1.8.2-blue.svg)](CHANGELOG.md) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6+
57
**[English](README.md)** | فارسی
68

79
استک عبور از سانسور چند پروتکلی بهینه‌سازی شده برای محیط‌های شبکه‌ای خصمانه.
@@ -361,6 +363,10 @@ MoaV/
361363

362364
MIT
363365

366+
## تغییرات
367+
368+
برای یادداشت‌های انتشار و تاریخچه نسخه‌ها به [CHANGELOG.md](CHANGELOG.md) مراجعه کنید.
369+
364370
## سلب مسئولیت
365371

366372
این پروژه **فقط نرم‌افزار شبکه متن‌باز با کاربرد عمومی** ارائه می‌دهد.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MoaV
22

3-
[![Website](https://img.shields.io/badge/website-moav.sh-cyan.svg)](https://moav.sh) [![Docs](https://img.shields.io/badge/docs-moav.sh%2Fdocs-cyan.svg)](https://moav.sh/docs/) [![Version](https://img.shields.io/badge/version-1.8.2-blue.svg)](CHANGELOG.md) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
3+
[![Website](https://img.shields.io/badge/website-moav.sh-cyan.svg)](https://moav.sh) [![Docs](https://img.shields.io/badge/docs-moav.sh%2Fdocs-cyan.svg)](https://moav.sh/docs/) [![Version](https://img.shields.io/badge/version-1.8.3-blue.svg)](CHANGELOG.md) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
44

55
English | **[فارسی](README-fa.md)**
66

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.2
1+
1.8.3

docs/CLI.md

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,28 @@ Start services.
232232

233233
```bash
234234
moav start # Start DEFAULT_PROFILES from .env
235-
moav start all # Start all services
235+
moav start all # Start all services whose ENABLE_* is true
236236
moav start proxy # Start proxy profile only
237237
moav start proxy admin # Start multiple profiles
238238
moav start proxy wireguard admin # Start three profiles
239239
```
240240

241241
**Arguments:**
242-
- No arguments: Uses `DEFAULT_PROFILES` from `.env`
243-
- Profile names: Start specific profiles (space-separated)
242+
- No arguments: uses `DEFAULT_PROFILES` from `.env`
243+
- Profile names: start specific profiles (space-separated)
244+
- `--force` / `-f`: bypass the profile-filtering prompt (see below)
245+
246+
##### Disabled profiles
247+
248+
`moav start` respects the `ENABLE_*` flags in `.env`:
249+
250+
- **No args** or **`moav start all`**: starts only the profiles whose `ENABLE_*` is `true`. Anything disabled is skipped (you'll see `Skipping disabled profiles: <list>`).
251+
- **`moav start <name>`** for a profile that's disabled in `.env`: you get a prompt:
252+
1. **Enable + start** — flips `ENABLE_*=true` in `.env`, then starts (persists for next time).
253+
2. **Skip** — don't start; `.env` stays as-is.
254+
3. **Start once** — start now without modifying `.env` (won't auto-start next time).
255+
256+
For profiles backed by multiple flags (`proxy`, `dnstunnel`), option 1 shows which flags to set manually. `--force` bypasses the prompt. Non-interactive shells default to skip.
244257

245258
#### `moav stop`
246259
Stop services.
@@ -567,6 +580,17 @@ link inside Ryve.
567580
> publicly. The link you share with users is the Personal Pairing link
568581
> generated inside Ryve, not the claim link. `moav donate info` is an alias.
569582
583+
#### `moav conduit-offsets`
584+
Manage the watcher that keeps Conduit's **lifetime bandwidth** Grafana panels accurate across container restarts.
585+
586+
```bash
587+
moav conduit-offsets install # Install the systemd watcher
588+
moav conduit-offsets status # Show watcher state (enabled/disabled, last run)
589+
moav conduit-offsets uninstall # Remove the watcher
590+
```
591+
592+
The watcher installs itself automatically the first time Conduit and monitoring run together — you usually don't need to touch this. Set `CONDUIT_OFFSETS_AUTOUPDATE=false` in `.env` to opt out. Hosts without systemd skip the watcher; run `scripts/update-conduit-offsets.sh` from cron instead. See [Monitoring → Conduit lifetime bandwidth](MONITORING.md#conduit-lifetime-bandwidth).
593+
570594
---
571595

572596
### Migration
@@ -632,26 +656,30 @@ Use this after:
632656

633657
## Profiles
634658

635-
Profiles group related services together.
636-
637-
| Profile | Services Included |
638-
|---------|-------------------|
639-
| `proxy` | sing-box, decoy, certbot |
640-
| `wireguard` | wireguard, wstunnel |
641-
| `dnstt` | dnstt |
642-
| `slipstream` | slipstream |
643-
| `masterdns` | masterdns |
644-
| `trusttunnel` | trusttunnel |
645-
| `admin` | admin |
646-
| `conduit` | psiphon-conduit |
647-
| `snowflake` | snowflake |
648-
| `client` | client (for testing) |
649-
| `all` | All of the above |
659+
Profiles group related services. Each maps to one or more `ENABLE_*` flags in `.env`; `moav start` filters disabled profiles automatically (see [Profile filtering](#moav-start)).
660+
661+
| Profile | Services | Controlled by |
662+
|---------|----------|---------------|
663+
| `proxy` | sing-box, decoy, certbot | `ENABLE_REALITY` / `ENABLE_TROJAN` / `ENABLE_HYSTERIA2` / `ENABLE_SS` (any) |
664+
| `xhttp` | xray | `ENABLE_XHTTP` |
665+
| `wireguard` | wireguard, wstunnel, decoy, certbot | `ENABLE_WIREGUARD` |
666+
| `amneziawg` | amneziawg | `ENABLE_AMNEZIAWG` |
667+
| `dnstunnel` | dns-router, dnstt, slipstream, masterdns, xray (XDNS) | `ENABLE_DNSTT` / `ENABLE_SLIPSTREAM` / `ENABLE_MASTERDNS` / `ENABLE_XDNS` (any) |
668+
| `trusttunnel` | trusttunnel | `ENABLE_TRUSTTUNNEL` |
669+
| `telegram` | telemt | `ENABLE_TELEMT` |
670+
| `admin` | admin, docker-proxy | `ENABLE_ADMIN_UI` |
671+
| `conduit` | psiphon-conduit | `ENABLE_CONDUIT` |
672+
| `snowflake` | snowflake, snowflake-exporter | `ENABLE_SNOWFLAKE` |
673+
| `gooserelay` | gooserelay | `ENABLE_GOOSERELAY` (opt-in) |
674+
| `monitoring` | prometheus, grafana, grafana-proxy, node-exporter, cadvisor + per-protocol exporters | `ENABLE_MONITORING` (opt-in) |
675+
| `setup` | bootstrap, geoip-updater | (lifecycle, not user-toggled) |
676+
| `client` | client | (for local testing) |
677+
| `all` | All services above | (used by `moav start all`, `moav build`, `moav logs`, etc.) |
650678

651679
**Usage:**
652680
```bash
653681
moav start proxy admin # Start proxy and admin profiles
654-
moav start all # Start everything
682+
moav start all # Expands to every profile whose ENABLE_* is true
655683
```
656684

657685
---

0 commit comments

Comments
 (0)