- Components tab replaces Updates: Dawnline, the AmneziaWG build for this firmware (Slava-Shchipunov 2.0 or 2Grey 3.1, Russian translation) and the system packages Dawnline adds, each checked, installed, reinstalled or rolled back in place, with What's new, versions and an activity log - Automatic updates: daily check, install at a set time or right away, per component; AmneziaWG is left out by default and an automatic run never switches its build or generation - Downloads verified against GitHub's sha256; mirrors are used only when GitHub is unreachable and the hash is known - New installer: checks firmware, clock, space and DNS, lets you pick a release, shows the plan and asks first; --dry-run - New uninstaller removes everything Dawnline added (cron, nft, firewall, routing, interfaces, packages it installed); --dry-run - Works without AmneziaWG on the router: Overview, the setup wizard, Health and Components say what is missing and offer to install it - Overview shows failed health checks as notices with their fix - People list no longer reads the config from the browser: private keys stay on the router; personal links are fetched on demand - Config changes are serialized under one lock, the nft table loads atomically and fails closed, and Dawnline never touches network sections it did not create - The portal never opens system ports, keeps disabled devices disabled, rate-limits per address and counts days by the router's clock - Settings and Diagnostics load their heavy parts in the background - Release notes are written from the commits since the previous release - Backend and admin UI split into small single-purpose modules
This commit is contained in:
1 parent
70a932b8ea
commit
34293fb8e5
158 files changed
+17418
-10022
No files matched your search
@@ -36,9 +36,11 @@ limits, live traffic and a LuCI admin that follows a modern design.
|
||||
accounts, no sessions, and a new link locks the old one out at once. People
|
||||
add, rename and remove their devices and get each one as a QR code,
|
||||
"Open in AmneziaVPN" (`vpn://`), a key or a `.conf` file. They cannot change
|
||||
access or limits. Links work on 443 with a Let's Encrypt certificate (via
|
||||
ACME), several addresses at once (a Cloudflare-proxied name, a plain IP), the
|
||||
same link at home, and wrong links can redirect to your website.
|
||||
access or limits. Links work on the portal's own port with a Let's Encrypt
|
||||
certificate (via ACME), several addresses at once (a Cloudflare-proxied name,
|
||||
a plain IP), the same link at home, and wrong links can redirect to your
|
||||
website. Behind Cloudflare, pick a port it proxies (2053, 2083, 2087, 2096 or
|
||||
8443).
|
||||
- **Access per person**, enforced in an `inet dawnline` nftables table on the
|
||||
tunnel interface: home network only, internet only, or both, and optionally
|
||||
only some home networks or home services (picked from the devices the router
|
||||
@@ -88,17 +90,45 @@ On the router:
|
||||
sh -c "$(wget -qO- https://raw.githubusercontent.com/tickcount/luci-app-dawnline/main/install.sh)"
|
||||
```
|
||||
|
||||
The installer checks the firmware, installs AmneziaWG for it if needed, then
|
||||
downloads the Dawnline package for your package manager from the latest
|
||||
release, checks it against `sha256sums.txt` and installs it with its
|
||||
dependencies. Then open **LuCI → Network → Dawnline** and run the setup wizard.
|
||||
The installer checks the firmware, the clock, free space and DNS, lets you pick
|
||||
a release (the latest is the default), shows the plan and asks before it
|
||||
changes anything. It downloads the Dawnline package for your package manager,
|
||||
checks it against `sha256sums.txt`, installs AmneziaWG built for your firmware
|
||||
if it is missing, then installs Dawnline with its dependencies and checks that
|
||||
LuCI can reach it. Then open **LuCI → Network → Dawnline** and run the setup
|
||||
wizard.
|
||||
|
||||
Options:
|
||||
Before changing anything it saves `/etc/config/{dawnline,network,firewall,dhcp,uhttpd}`
|
||||
and the service state to `/etc/dawnline/installer-backups/` (the newest three
|
||||
are kept); if a step fails, it puts them back. Packages are not rolled back: to
|
||||
return to an older release, run the installer with `--tag`. Everything it does
|
||||
is logged to `/tmp/dawnline-install.log`.
|
||||
|
||||
With options, download it first:
|
||||
|
||||
```sh
|
||||
sh install.sh 0.1.0 # a given release
|
||||
DAWNLINE_AWG=grey sh install.sh # AmneziaWG from 2Grey (default: Slava-Shchipunov, then 2Grey)
|
||||
DAWNLINE_AWG=skip sh install.sh # never install AmneziaWG
|
||||
wget -O /tmp/dawnline-install.sh https://raw.githubusercontent.com/tickcount/luci-app-dawnline/main/install.sh
|
||||
sh /tmp/dawnline-install.sh --dry-run # check everything, change nothing
|
||||
sh /tmp/dawnline-install.sh -y --tag 0.3.1 # a given release, no questions
|
||||
sh /tmp/dawnline-install.sh --awg grey # AmneziaWG from 2Grey
|
||||
```
|
||||
|
||||
| Option | |
|
||||
|---|---|
|
||||
| `-y`, `--yes` | No questions: the latest release (or `--tag`) and the recommended choices |
|
||||
| `-n`, `--dry-run` | Check the system, resolve, download and verify the release; change nothing |
|
||||
| `-v`, `--verbose` / `-q`, `--quiet` | More detail / only warnings and errors |
|
||||
| `--tag X.Y.Z` | A given release (`sh install.sh 0.3.1` works too) |
|
||||
| `--awg auto\|slava\|grey\|skip` | Where AmneziaWG comes from when it is missing: [Slava-Shchipunov](https://github.com/Slava-Shchipunov/awg-openwrt), then [2Grey](https://github.com/2Grey/awg-openwrt) (`auto`, the default), only one of them, or not at all (install it later from **Dawnline → Updates**). `DAWNLINE_AWG` does the same |
|
||||
| `--no-awg` | Same as `--awg skip` |
|
||||
|
||||
When GitHub is slow or blocked, the installer retries downloads through
|
||||
`ghfast.top` and `gh-proxy.com` on its own. To fetch the installer itself
|
||||
through a mirror:
|
||||
|
||||
```sh
|
||||
sh -c "$(wget -qO- https://cdn.jsdelivr.net/gh/tickcount/luci-app-dawnline@main/install.sh)"
|
||||
sh -c "$(wget -qO- https://ghfast.top/https://raw.githubusercontent.com/tickcount/luci-app-dawnline/main/install.sh)"
|
||||
```
|
||||
|
||||
By hand, from a [release](https://github.com/tickcount/luci-app-dawnline/releases):
|
||||
@@ -111,8 +141,32 @@ apk update && apk add --allow-untrusted ./luci-app-dawnline-0.1.0.apk # Open
|
||||
**Upgrade** from **Dawnline → Updates**, or run the installer again. Settings,
|
||||
keys and history are kept, and a backup is made first.
|
||||
|
||||
**Remove**: **Settings → Remove Dawnline from this router** (keeps a backup),
|
||||
then `opkg remove luci-app-dawnline` or `apk del luci-app-dawnline`.
|
||||
**Remove** on the router:
|
||||
|
||||
```sh
|
||||
sh -c "$(wget -qO- https://raw.githubusercontent.com/tickcount/luci-app-dawnline/main/uninstall.sh)"
|
||||
```
|
||||
|
||||
It backs up the configuration to `/etc/dawnline/backups`, runs Dawnline's own
|
||||
removal (the same as **Settings → Remove Dawnline from this router**), removes
|
||||
the package and cleans up what is left. AmneziaWG stays installed, since other
|
||||
tunnels may use it. After installing Dawnline again, restore the backup in
|
||||
**Settings → Backups**. With options, download it first:
|
||||
|
||||
```sh
|
||||
wget -O /tmp/dawnline-uninstall.sh https://raw.githubusercontent.com/tickcount/luci-app-dawnline/main/uninstall.sh
|
||||
sh /tmp/dawnline-uninstall.sh --dry-run
|
||||
```
|
||||
|
||||
| Option | |
|
||||
|---|---|
|
||||
| `-y`, `--yes` | Do not ask for confirmation |
|
||||
| `-p`, `--purge` | Also delete the configuration, keys, history and every backup (`/etc/config/dawnline`, `/etc/dawnline`); no backup is made |
|
||||
| `--remove-awg` | Also remove AmneziaWG, unless another interface still uses it (`--keep-awg`, the default, keeps it) |
|
||||
| `-n`, `--dry-run` | Show what would be removed; change nothing |
|
||||
|
||||
By hand: **Settings → Remove Dawnline from this router** (keeps a backup), then
|
||||
`opkg remove luci-app-dawnline` or `apk del luci-app-dawnline`.
|
||||
|
||||
## What Dawnline changes on the router
|
||||
|
||||
@@ -133,10 +187,11 @@ are kept in `/var/run/dawnline` and flushed to flash at most hourly.
|
||||
|
||||
```
|
||||
package/luci-app-dawnline/
|
||||
root/usr/share/ucode/dawnline/ ucode library (model, apply, live, ops, view, loop)
|
||||
root/usr/share/ucode/dawnline/ ucode library: model (core), AmneziaWG (awg), apply, live,
|
||||
ops, view, loop, portal
|
||||
root/usr/share/rpcd/ucode/ luci.dawnline RPC object
|
||||
root/usr/libexec/dawnline/ agent (usage, limits, presence) and updater
|
||||
root/usr/share/dawnline/portal/ portal CGI and its (minified) assets
|
||||
root/usr/share/dawnline/portal/ portal CGI wrapper and its (minified) assets
|
||||
root/usr/bin/dawnline command line (`dawnline help`)
|
||||
htdocs/ LuCI views and the generated module dawnline/app.js
|
||||
web/ TypeScript sources of the admin UI and the portal
|
||||
|
||||
Reference in new issue
Block a user