Skip to content

Commit 9c58a58

Browse files
committed
refactor: migrate flags/routes to UCI lists; tighten rpcd ACL
1 parent 34400ad commit 9c58a58

File tree

11 files changed

+146
-147
lines changed

11 files changed

+146
-147
lines changed

deploy/README.md renamed to .deploy/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ This folder contains a deploy workflow to push files on router for testing based
44

55
## Files
66

7-
- `deploy/deploy.sh` - main deploy script (single pipeline mode)
8-
- `deploy/mapping.tsv` - explicit file mapping (`src -> dst -> mode`)
9-
- `deploy/target.env.example` - target configuration template
10-
- `deploy/target.env` - local router access settings (ignored by git)
7+
- `.deploy/deploy.sh` - main deploy script (single pipeline mode)
8+
- `.deploy/mapping.tsv` - explicit file mapping (`src -> dst -> mode`)
9+
- `.deploy/target.env.example` - target configuration template
10+
- `.deploy/target.env` - local router access settings (ignored by git)
1111

1212
## Requirements
1313

@@ -20,7 +20,7 @@ This folder contains a deploy workflow to push files on router for testing based
2020

2121
Each row contains three columns separated by one or more tabs:
2222

23-
1. local path relative to `deploy/`
23+
1. local path relative to `.deploy/`
2424
2. absolute remote path on router
2525
3. mode (for example `644`, `755`)
2626

@@ -48,11 +48,11 @@ Expected variables:
4848
## SSH Key Bootstrap
4949

5050
- If `SSH_KEY_PATH` is set, deploy uses that key.
51-
- If `SSH_KEY_PATH` is empty, deploy uses project key `deploy/.ssh/id_ed25519`.
51+
- If `SSH_KEY_PATH` is empty, deploy uses project key `.deploy/.ssh/id_ed25519`.
5252
- If the project key does not exist, deploy prompts to generate it on first run.
5353
- Deploy tries to publish the public key to `/etc/dropbear/authorized_keys`.
5454
- If auto-publish is not possible, deploy exits with exact manual commands to install the key on router.
55-
- For non-interactive runs, set `DEPLOY_AUTO_YES=1` to auto-confirm key generation.
55+
- For non-interactive runs, set `.deploy_AUTO_YES=1` to auto-confirm key generation.
5656

5757
## Usage
5858

@@ -74,4 +74,4 @@ Modes:
7474
- Uploads mapped files via `scp -p`
7575
- Applies `chmod` only when remote mode differs from expected mode
7676
- Runs post-sync commands after copy/perms (deploy mode only)
77-
- Post-sync commands are defined in `deploy.sh` (currently `rpcd restart`)
77+
- Post-sync commands are defined in `.deploy.sh` (currently `rpcd restart`)
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
../htdocs/luci-static/resources/view/tailscale-ng/index.js /www/luci-static/resources/view/tailscale-ng/index.js 644
55
../root/etc/config/luci-app-tailscale-ng /etc/config/luci-app-tailscale-ng 644
66
../root/etc/hotplug.d/iface/40-luci-app-tailscale-ng /etc/hotplug.d/iface/40-luci-app-tailscale-ng 755
7-
../root/etc/init.d/luci-app-tailscale-ng /etc/init.d/luci-app-tailscale-ng 755
7+
../root/etc/init.d/luci-app-tailscale-ng /etc/init.d/luci-app-tailscale-ng 755
88
../root/etc/uci-defaults/40_luci-app-tailscale-ng /etc/uci-defaults/40_luci-app-tailscale-ng 755
99
../root/usr/share/luci/menu.d/luci-app-tailscale-ng.json /usr/share/luci/menu.d/luci-app-tailscale-ng.json 644
1010
../root/usr/share/rpcd/acl.d/luci-app-tailscale-ng.json /usr/share/rpcd/acl.d/luci-app-tailscale-ng.json 644

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
*index-status-synthetic.js
2-
deploy/target.env
3-
deploy/.ssh/
1+
.deploy/target.env
2+
.deploy/.ssh/
3+
.private

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI for Tailscale (NG)
99
LUCI_DEPENDS:=+tailscale
1010
LUCI_PKGARCH:=all
1111

12-
PKG_VERSION:=0.1.0
12+
PKG_VERSION:=0.1.1
1313

1414
include $(TOPDIR)/feeds/luci/luci.mk
1515

README.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# luci-app-tailscale-ng
22

3-
LuCI web interface for managing [Tailscale](https://tailscale.com/) on OpenWRT routers.
3+
LuCI web interface for managing [Tailscale](https://tailscale.com/) on OpenWrt routers.
44

5-
Inspired by [asvow/luci-app-tailscale](https://github.com/asvow/luci-app-tailscale), this project is a ground-up redesign that eliminates conflicts with the standard OpenWRT `tailscale` package.
5+
Inspired by [asvow/luci-app-tailscale](https://github.com/asvow/luci-app-tailscale), this project is a major redesign that eliminates conflicts with the standard OpenWrt `tailscale` package. See [Motivation](#motivation) for details.
6+
7+
## Quick Install
8+
9+
Auto-detects `opkg` / `apk` and installs the latest release:
10+
11+
```shell
12+
wget -qO- https://raw.githubusercontent.com/vad-b/luci-app-tailscale-ng/main/install.sh | sh
13+
```
14+
15+
After installation, navigate to **VPN -> Tailscale NG** in the LuCI web interface.
16+
17+
Need manual package install options instead? See [Manual Installation](#manual-installation).
618

719
## Screenshots
820

@@ -21,18 +33,23 @@ Inspired by [asvow/luci-app-tailscale](https://github.com/asvow/luci-app-tailsca
2133

2234
## Motivation
2335

24-
The goals of `luci-app-tailscale-ng` are:
25-
26-
- keep integration non-conflicting with the standard OpenWRT `tailscale` package
27-
- make the OpenWRT Tailscale UI closer to the Tailscale management UI in pfSense and OPNsense
36+
### Problem
2837

29-
The original [asvow/luci-app-tailscale](https://github.com/asvow/luci-app-tailscale) project is excellent and inspired this work, but its integration model is tightly coupled to core files from the OpenWRT `tailscale` package, which leads to two operational drawbacks:
38+
The original [asvow/luci-app-tailscale](https://github.com/asvow/luci-app-tailscale) project is excellent and inspired this work, but its integration model is tightly coupled to core files from the OpenWrt `tailscale` package, which leads to three operational drawbacks:
3039

31-
- **Invasive Installation** - installation overwrites original `/etc/init.d/tailscale` and `/etc/config/tailscale` files.
32-
- **Breaking Uninstallation** - uninstall removes these required files; restoring normal Tailscale operation requires manual file recreation or reinstalling the `tailscale` package.
40+
- **Invasive install:** During installation, `asvow/luci-app-tailscale` replaces core `tailscale` files (`/etc/init.d/tailscale` and `/etc/config/tailscale`) and takes ownership of them.
41+
- **Breaking uninstallation:** When `asvow/luci-app-tailscale` is removed, those same files are deleted, leaving the stock `tailscale` package non-functional.
42+
- **Restore normal operation:** To recover normal Tailscale operation, you must recreate the removed files manually or reinstall the `tailscale` package.
3343

3444
See [asvow/luci-app-tailscale#31](https://github.com/asvow/luci-app-tailscale/issues/31) for details.
3545

46+
### Solution
47+
48+
The goals of `luci-app-tailscale-ng` are:
49+
50+
- keep integration non-conflicting with the standard OpenWrt `tailscale` package
51+
- make the OpenWrt Tailscale UI closer to the Tailscale management UI in pfSense and OPNsense
52+
3653
## How it works
3754

3855
**luci-app-tailscale-ng** takes a non-invasive approach:
@@ -57,9 +74,7 @@ This means you can install and remove the package at any time without breaking y
5774
- Live status dashboard (tailscale status, IP, interface, netcheck, DNS)
5875
- Automatic settings reapply on network interface changes via hotplug
5976

60-
## Current limitations
61-
62-
This package focuses on managing `tailscale up` command-line parameters. It does **not** automatically create network interfaces or firewall rules for Tailscale traffic - you may need to configure these manually if your setup requires it.
77+
> **Right now** this package provides Tailscale management in LuCI (service control, `tailscale up` settings, and status visibility). It does **not** automatically create Tailscale interfaces or firewall rules yet. See [Roadmap](#roadmap) for planned automation.
6378
6479
## Roadmap
6580

@@ -68,32 +83,24 @@ This package focuses on managing `tailscale up` command-line parameters. It does
6883
- Backup and restore of the Tailscale state file
6984
- Update Tailscale directly from the web UI (both standard and size-optimized builds for memory-constrained devices)
7085

71-
## Installation
86+
## Manual Installation
7287

73-
### Quick install (auto-detects `opkg` / `apk`)
74-
75-
```shell
76-
wget -qO- https://raw.githubusercontent.com/vad-b/luci-app-tailscale-ng/main/install.sh | sh
77-
```
78-
79-
### Manual install (`opkg` / `.ipk`)
88+
### Install with `opkg` (`.ipk`)
8089

8190
Download the latest `.ipk` package from [Releases](https://github.com/vad-b/luci-app-tailscale-ng/releases), upload it to the router's `/tmp` directory, then:
8291

8392
```shell
8493
opkg install /tmp/luci-app-tailscale-ng_*.ipk
8594
```
8695

87-
### Manual install (`apk` / `.apk`)
96+
### Install with `apk` (`.apk`)
8897

8998
Download the latest `.apk` package from [Releases](https://github.com/vad-b/luci-app-tailscale-ng/releases), upload it to the router's `/tmp` directory, then:
9099

91100
```shell
92101
apk add --allow-untrusted --upgrade /tmp/luci-app-tailscale-ng_*.apk
93102
```
94103

95-
After installation, navigate to **VPN -> Tailscale NG** in the LuCI web interface.
96-
97104
## Credits
98105

99106
- [asvow/luci-app-tailscale](https://github.com/asvow/luci-app-tailscale) - the project that inspired this work

0 commit comments

Comments
 (0)