Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Quality

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install test tools
run: |
sudo apt-get update
sudo apt-get install -y luajit shellcheck python3-pyflakes python3-qrcode python3-opencv love xvfb
- name: Run project checks
run: tests/run_all.sh
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and publish release

on:
push:
branches: [main]
paths:
- "app/RtTailscale/VERSION"
workflow_dispatch:

permissions:
contents: write

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read release version
id: version
run: echo "version=$(tr -d '\r\n' < app/RtTailscale/VERSION)" >> "$GITHUB_OUTPUT"
- name: Install packaging tools
run: |
sudo apt-get update
sudo apt-get install -y zip curl git python3 binutils
- name: Build muOS archive
run: |
chmod +x build.sh
./build.sh
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
target_commitish: ${{ github.sha }}
name: Rt:Tailscale-M v${{ steps.version.outputs.version }}
generate_release_notes: true
fail_on_unmatched_files: true
files: |
dist/*.muxapp
dist/*.sha256
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 0.2.0 — 2026-11-17

### muOS Andromeda controls and readability

- Increase all UI font tiers (tiny 14, small 16, body/strong 18, title 23, hero 30) for handheld viewing.
- Increase content-row heights and login URL spacing to prevent the larger text from colliding with controls.
- Use **MENU + START** as the primary quit chord, with SELECT + START retained as a compatibility fallback.
- Recognise SDL's `guide` button as the Andromeda MENU input.
- Map L2/R2 trigger-axis presses to previous/next tab alongside L1/R1; edge detection prevents repeat jumps while held.
- Update the on-screen controls artwork, README, troubleshooting guide and practical wiki.
- Add reproducible GitHub Actions quality checks and a tag-triggered release builder.

## 0.1.0

### Audit fixes (2026-11-01)
Expand All @@ -11,15 +23,12 @@
- `serve` and `funnel` blocked in the CLI console
- `THIRD-PARTY.md` rewritten with the real library list
- `CREDITS.md` added; derivation notice added to `LICENSE`
- README: removed "not yet verified" warning (verified on real hardware),
added Security section
- README: removed "not yet verified" warning (verified on real hardware), added Security section
- Documented the build environment


First release of Rt:Tailscale-M: the muOS Andromeda port of Rt:Tailscale-K, successor of *Shin RtTailscale*.

- Graphical app (LÖVE 11.5, bundled runtime) styled after the Tailscale web client; icon-only button legend; Nintendo layout by default;
quit with SELECT+START; light and dark theme; login by QR code.
- Graphical app (LÖVE 11.5, bundled runtime) styled after the Tailscale web client; icon-only button legend; Nintendo layout by default; quit with SELECT+START; light and dark theme; login by QR code.
- Service stack: daemon + watchdog + web panel + Taildrop receiver; TUN with automatic userspace fallback.
- Start at boot through a muOS user init script (also switches on *User Init Scripts*).
- `rt adopt`: take over another Tailscale app's identity and disable its init script.
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and the successor of *Shin RtTailscale*, by SPDW Factory.
| 🚀 **Starts at boot** | A muOS *user init script*, installed and switched on for you. A watchdog restarts anything that dies. |
| 📱 **Log in by QR code** | No typing on a D-pad: scan the code with your phone. |
| 🌍 **Exit nodes** | Highlight a device, press the button, your traffic leaves through it. |
| 🎮 **Made for the D-pad** | Icon-only button legend, light and dark theme, quit with SELECT+START. |
| 🎮 **Made for the D-pad** | Larger type, icon-only button legend, light and dark theme, quit with MENU+START. |
| 🌐 **Web panel** | PIN-protected panel (status, peers, Taildrop, Serve/Funnel, CLI console) on port 8077. |
| 📥 **Taildrop** | Files sent to the device land in `RtTailscale/taildrop/`. |
| 🧰 **Works without TUN** | No `/dev/net/tun` in your kernel? It falls back to userspace networking by itself. |
Expand Down Expand Up @@ -62,10 +62,16 @@ Everything below is rendered by the real UI code (`tests/fixtures` provide the d

<p align="center"><img src="docs/img/controls.png" width="520" alt="Controller legend"></p>

The app never prints a key legend: it shows the buttons themselves (the same icons you see at the bottom of every screen).
Names follow the **Nintendo layout** of Anbernic handhelds (A = right button, B = bottom); if your buttons feel swapped,
turn it off in *Settings → Nintendo button layout*. Keyboard (for testing on a PC): arrows, Enter = A, Esc = B,
X, Y, Q/E = L/R, Ctrl+Q = quit.
The app shows physical button artwork in the footer rather than a text-only key list. Face-button names follow the
**Nintendo layout** used by many Anbernic handhelds (A = right, B = bottom); change *Settings → Nintendo button layout*
when using a different arrangement.

- **MENU + START** (MENU is SDL's `guide` button): quit to the muOS frontend, matching Andromeda's application shortcut.
- **SELECT + START** remains available as a compatibility fallback.
- **L1 / R1** and **L2 / R2**: previous / next tab.
- D-pad: move through rows; A: confirm; B: back; X: use the highlighted device as exit node; Y: refresh.

Keyboard (PC testing): arrows, Enter = A, Esc = B, X/Y = face actions, Q/E = L/R, Ctrl+Q = quit.

## 📦 Install

Expand Down
2 changes: 1 addition & 1 deletion app/RtTailscale/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.2.0
10 changes: 8 additions & 2 deletions app/RtTailscale/game/lib/icons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,17 @@ function I.shoulder(x, y, w, h, letter, T, font) -- L / R
lg.printf(letter, x, y + (h - font:getHeight()) / 2 + 1, w, "center")
end

function I.startpill(x, y, w, h, kind, T) -- kind = "start" | "select"
function I.startpill(x, y, w, h, kind, T) -- kind = "start" | "select" | "menu"
I.card(x, y, w, h, T.btnFace, T.border2, h / 2)
col(T.btnText)
if kind == "start" then
lg.polygon("fill", x + w / 2 - h * .14, y + h * .26, x + w / 2 - h * .14, y + h * .74, x + w / 2 + h * .26, y + h / 2)
elseif kind == "menu" then
lg.setLineWidth(1.5)
for i = 0, 2 do
local yy = y + h * (0.28 + i * 0.22)
lg.line(x + w * 0.28, yy, x + w * 0.72, yy)
end
else
lg.setLineWidth(1.5)
lg.line(x + w * .3, y + h * .38, x + w * .7, y + h * .38)
Expand All @@ -135,7 +141,7 @@ function I.legend_entry(x, y, e, T, font)
local h = 20
if e.btn == "dpad" then I.dpad(x + 11, y + h / 2, 21, T); x = x + 25
elseif e.btn == "combo" then
I.startpill(x, y + 2, 26, 16, "select", T)
I.startpill(x, y + 2, 26, 16, "menu", T)
col(T.muted); lg.setFont(font); lg.print("+", x + 29, y + 1)
I.startpill(x + 40, y + 2, 26, 16, "start", T)
x = x + 72
Expand Down
15 changes: 13 additions & 2 deletions app/RtTailscale/game/lib/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function M.swap(btn, nintendo)
end

--- The app quits only when SELECT ("back" in SDL) and START are held together.
function M.quit_combo(start_down, back_down)
return (start_down and back_down) and true or false
function M.quit_combo(start_down, select_down, menu_down)
return (start_down and (select_down or menu_down)) and true or false
end

M.KEYMAP = {
Expand All @@ -27,4 +27,15 @@ M.PADMAP = {
a = "a", b = "b", x = "x", y = "y", dpup = "up", dpdown = "down", dpleft = "left", dpright = "right",
leftshoulder = "l", rightshoulder = "r",
}

-- SDL/LÖVE reports L2/R2 as analogue axes on mapped gamepads.
M.TRIGGERMAP = { triggerleft = "l", triggerright = "r" }
function M.trigger_button(axis, value, was_down)
local mapped = M.TRIGGERMAP[axis]
if not mapped then return nil, nil end
local down = (tonumber(value) or 0) >= 0.60
if down and not was_down then return mapped, true end
return nil, down
end

return M
53 changes: 34 additions & 19 deletions app/RtTailscale/game/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,28 @@ function love.keypressed(key)
end

function love.gamepadpressed(joy, b)
if b == "start" or b == "back" then
if input.quit_combo(joy:isGamepadDown("start"), joy:isGamepadDown("back")) then love.event.quit() end
-- muOS Andromeda exposes MENU as SDL's "guide" button.
-- SELECT+START remains a compatibility fallback for older layouts.
if b == "start" or b == "back" or b == "guide" then
if input.quit_combo(
joy:isGamepadDown("start"),
joy:isGamepadDown("back"),
joy:isGamepadDown("guide")
) then love.event.quit() end
return
end
if PADMAP[b] then button(PADMAP[b]) end
end

-- L2/R2 are SDL trigger axes rather than ordinary gamepad buttons.
-- Convert a threshold crossing to one press so holding a trigger does not repeat tab changes.
local triggerDown = { triggerleft = false, triggerright = false }
function love.gamepadaxis(joy, axis, value)
local mapped, down = input.trigger_button(axis, value, triggerDown[axis])
if down ~= nil then triggerDown[axis] = down end
if mapped then button(mapped) end
end

local held = { dir = nil, t = 0 }
local function held_dir()
local kb = love.keyboard.isDown
Expand Down Expand Up @@ -486,12 +501,12 @@ local function draw_footer()
end

local function row_height(r)
if r.kind == "hero" then return 104 end
if r.kind == "header" then return 28 end
if r.kind == "pin" then return 56 end
if r.kind == "peer" then return 50 end
if r.kind == "toggle" then return 46 end
return 38
if r.kind == "hero" then return 112 end
if r.kind == "header" then return 32 end
if r.kind == "pin" then return 62 end
if r.kind == "peer" then return 58 end
if r.kind == "toggle" then return 54 end
return 44
end

local function draw_row(r, x, y, w, on, t)
Expand Down Expand Up @@ -611,7 +626,7 @@ local function draw_content()
end
end
end
text("Scan to open the panel", W - 178, TOP + 160, "tiny", t.muted, 164, "center")
text(fit("Scan to open the panel", "small", 150), W - 171, TOP + 160, "small", t.muted, 150, "center")
end
if S.tab == 2 and S.pingResult then text(fit(S.pingResult, "small", W - 28), 14, BOTTOM + 2, "small", t.primaryText) end
end
Expand Down Expand Up @@ -670,7 +685,7 @@ local function draw_login()
text("Scan with your phone", ox, 132, "strong", t.text)
text("or open this address:", ox, 154, "small", t.muted)
local y = 180
for _, l in ipairs(model.wrap(url, 24)) do text(l, ox, y, "small", t.primaryText); y = y + 18 end
for _, l in ipairs(model.wrap(url, 24)) do text(l, ox, y, "small", t.primaryText); y = y + 20 end
text("This closes by itself once you are connected.", ox, y + 14, "small", t.muted, W - ox - 56)
end

Expand Down Expand Up @@ -703,7 +718,7 @@ local function draw_sheet()
{ { btn = "B", glyph = "back" }, "Back, close, cancel" },
{ { btn = "X", glyph = "exitnode" }, "Use the highlighted device as exit node" },
{ { btn = "Y", glyph = "refresh" }, "Refresh now" },
{ { btn = "combo", glyph = "power" }, "Quit (hold both)" },
{ { btn = "combo", glyph = "power" }, "Quit (MENU + START)" },
}
local y = 84
for _, it in ipairs(items) do
Expand Down Expand Up @@ -760,7 +775,7 @@ local function demo_steps(real)
S.theme = "light"
S.tab = 5
S.view = { title = "Diagnostics", scroll = 0, lines = {
"Rt:Tailscale-M 0.1.0", "muOS Andromeda", "[ OK ] tailscale binaries present", "[ OK ] python3 present (web panel)",
"Rt:Tailscale-M 0.2.0", "muOS Andromeda", "[ OK ] tailscale binaries present", "[ OK ] python3 present (web panel)",
"[ OK ] /dev/net/tun present (TUN mode)", "[ OK ] start at boot: init script installed", "[ OK ] tailscaled running",
"[ OK ] web panel running", "[ OK ] watchdog running" } }
end },
Expand All @@ -787,13 +802,13 @@ end
function love.load()
lg.setDefaultFilter("linear", "linear")
canvas = lg.newCanvas(W, H)
F.tiny = lg.newFont("fonts/Inter-Regular.otf", 11)
F.small = lg.newFont("fonts/Inter-Regular.otf", 12)
F.body = lg.newFont("fonts/Inter-Regular.otf", 14)
F.strong = lg.newFont("fonts/Inter-SemiBold.otf", 14)
F.title = lg.newFont("fonts/Inter-SemiBold.otf", 19)
F.big = lg.newFont("fonts/Inter-SemiBold.otf", 24)
F.btn = lg.newFont("fonts/Inter-SemiBold.otf", 11)
F.tiny = lg.newFont("fonts/Inter-Regular.otf", 14)
F.small = lg.newFont("fonts/Inter-Regular.otf", 16)
F.body = lg.newFont("fonts/Inter-Regular.otf", 18)
F.strong = lg.newFont("fonts/Inter-SemiBold.otf", 18)
F.title = lg.newFont("fonts/Inter-SemiBold.otf", 23)
F.big = lg.newFont("fonts/Inter-SemiBold.otf", 30)
F.btn = lg.newFont("fonts/Inter-SemiBold.otf", 13)

FAKE = os.getenv("RTTS_FAKE_DIR")
if FAKE == "" then FAKE = nil end
Expand Down
2 changes: 2 additions & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ problem, with `./rt log 50` and `tail -n 50 /tmp/tailscaled.log`; the app's own
| Not in the Applications list | archive not installed, or extracted with a different structure | the `.muxapp` must contain one folder (`RtTailscale/`) with `mux_launch.sh`; install via *Archive Manager* or unzip into `MUOS/application/` |
| App opens and returns to the menu at once | the LÖVE runtime cannot start (missing library) or `mux_launch.sh` lost its exec bit | read `.game/rttailscale.log`; rebuild with `--full-love` or copy `libs.aarch64` from a LÖVE app that works; `chmod +x mux_launch.sh .game/bin/love` |
| Buttons A/B (or X/Y) feel swapped | layout differs from the Nintendo default | *Settings → Nintendo button layout* |
| MENU + START does not quit | controller does not expose MENU as SDL `guide` | try SELECT + START; check the device's SDL mapping |
| L2/R2 do not change tabs | trigger axes are not exposed by the controller mapping | use L1/R1, or inspect the current Andromeda SDL mapping |
| Stays on "Waiting for the login link..." | no internet/DNS yet, or clock far off | check Wi-Fi; `./ts netcheck`; look for "failed to resolve" in `/tmp/tailscaled.log`; make sure the device time is right |
| Asks to log in again after every reboot | `state/` not persistent or not writable | check `state/tailscaled.state` exists after login; do not run the app from a read-only location |
| "Start at boot" on, nothing starts | *User Init Scripts* is off, or the boot wait is too short | `./rt doctor` tells you; enable *Advanced settings → User Init Scripts*; raise `WIFI_WAIT` in `config/rt.conf` |
Expand Down
24 changes: 19 additions & 5 deletions tests/test_input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,24 @@ for _, b in ipairs({ "a", "b", "x", "y" }) do eq(input.swap(b, false), b, b .. "
-- swapping twice is the identity
for _, b in ipairs({ "a", "b", "x", "y" }) do eq(input.swap(input.swap(b, true), true), b, b .. " round trip") end

-- quit needs SELECT and START together; START alone must NOT quit
eq(input.quit_combo(true, true), true, "both")
eq(input.quit_combo(true, false), false, "start alone")
eq(input.quit_combo(false, true), false, "select alone")
eq(input.quit_combo(false, false), false, "none")
-- Andromeda's primary quit shortcut is MENU (SDL guide) + START.
eq(input.quit_combo(true, false, true), true, "menu + start")
-- Keep SELECT + START as a compatibility fallback.
eq(input.quit_combo(true, true, false), true, "select + start")
eq(input.quit_combo(true, false, false), false, "start alone")
eq(input.quit_combo(false, true, true), false, "menu/select alone")
eq(input.quit_combo(false, false, false), false, "none")

-- L2/R2 trigger axes behave like L1/R1, once per press.
local mapped, down = input.trigger_button("triggerleft", 0.8, false)
eq(mapped, "l", "L2 press"); eq(down, true, "L2 held")
mapped, down = input.trigger_button("triggerleft", 0.9, true)
eq(mapped, nil, "L2 hold does not repeat"); eq(down, true, "L2 remains held")
mapped, down = input.trigger_button("triggerleft", 0.1, true)
eq(mapped, nil, "L2 release"); eq(down, false, "L2 released")
mapped, down = input.trigger_button("triggerright", 0.8, false)
eq(mapped, "r", "R2 press"); eq(down, true, "R2 held")
mapped, down = input.trigger_button("unknown", 1.0, false)
eq(mapped, nil, "unknown axis"); eq(down, nil, "unknown axis state")
eq(input.PADMAP.start, nil, "start has no other meaning"); eq(input.PADMAP.back, nil, "select has no other meaning")
print("input tests passed")
31 changes: 20 additions & 11 deletions wiki-source/Controls.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# Controls

Rt:Tailscale-M is designed for the handheld D-pad. The on-screen legend uses button artwork rather than a text-only key list.
Rt:Tailscale-M is designed for the D-pad and the standard SDL game-controller mapping used by muOS Andromeda. The on-screen footer shows button artwork, not a wall of key names.

## Main controls

- D-pad moves between rows, tabs and devices.
- Confirm opens the selected item or activates the highlighted action.
- Back returns to the previous view.
- Shoulder buttons move between tabs where shown.
- **SELECT + START** quits the application.
| Physical control | Action |
|---|---|
| D-pad | Move through rows |
| A | Confirm, open, toggle |
| B | Back, close, cancel |
| X | Set the highlighted online device as exit node |
| Y | Refresh status |
| L1 / R1 | Previous / next tab |
| L2 / R2 | Previous / next tab (trigger-axis support) |
| MENU + START | Quit to the muOS frontend |
| SELECT + START | Compatibility fallback for older layouts |

## Button layout
## Andromeda button names

The default artwork follows the Nintendo layout used by Anbernic handhelds: **A is the right face button and B is the bottom face button**.
muOS Andromeda exposes the physical **MENU** button through SDL as the gamepad **Guide** button (`guide`). Rt:Tailscale-M listens for that button together with START, so the normal Andromeda exit shortcut works without stealing MENU by itself.

> [!IMPORTANT]
> **MUST KNOW!!** If the physical A/B positions feel reversed, open **Settings → Nintendo button layout** and switch the layout. Do not assume another controller uses the same physical arrangement.
L2 and R2 are reported by SDL/LÖVE as trigger axes, not ordinary face/shoulder buttons. The app detects a press threshold and treats each trigger as one L1/R1 tab action; holding a trigger does not repeatedly skip tabs.

## Face-button layout

The default artwork follows the Nintendo layout used by many Anbernic handhelds: **A is the right face button and B is the bottom face button**. Open **Settings → Nintendo button layout** to turn the A/B and X/Y swap off for a different physical arrangement.

## Keyboard testing on PC

Expand All @@ -26,4 +35,4 @@ The default artwork follows the Nintendo layout used by Anbernic handhelds: **A
- Q / E: shoulder actions.
- Ctrl + Q: quit.

The controls image and the active UI legend are the best reference for the current build.
The active UI footer is the reference for the current build.
Loading