Skip to content

plugins: add VPN 2.1.0 - #233

Open
Glitchboi-sudo wants to merge 2 commits into
Ryoku-dev:mainfrom
Glitchboi-sudo:plugin/vpn
Open

Glitchboi-sudo wants to merge 2 commits into
Ryoku-dev:mainfrom
Glitchboi-sudo:plugin/vpn

Conversation

@Glitchboi-sudo

@Glitchboi-sudo Glitchboi-sudo commented Dec 1, 2026 •

Copy link
Copy Markdown

What is this?

An update to the existing community vpn widget (by neur0map), bumping it to 2.1.0 with three Tailscale additions. I'm submitting as a contributor; original authorship, the LICENSE, and the existing preview-desktop.png are preserved, and neur0map is credited in the README.

New in 2.1.0

  • Exit-node picker — lists every peer advertising itself as an exit node and routes through the chosen one (tailscale set --exit-node=<ip> --exit-node-allow-lan-access), with the active node marked and a one-tap clear.
  • Automatic acceptance of advertised routes — a new acceptRoutes setting (default on) adds --accept-routes on turn-on and when an exit node is picked.
  • Clean restart — a two-tap-confirm button that clears the exit node, downs Tailscale, then pkexec systemctl restart tailscaled to tear down and rebuild the policy-routing table and ts-* firewall chains, leaving no stale routes after a killed session.

The new privileged command (pkexec systemctl restart tailscaled) is declared in capabilities.privileged and documented in the README. ryoku plugin validate passes clean (0 blocking, 0 warnings). The diff touches only the changed files — no existing files are removed.

Checklist

  • One folder under its catalogue with a manifest and a real preview image (not a placeholder). — assets/preview-widget.png refreshed with a real capture of the 2.1.0 panel (identity fields redacted); assets/preview-desktop.png kept as-is.
  • One entry added to that catalogue's registry.json (lastUpdated in YYYY-MM-DD; official: false for community items).
  • Tested live in Ryoku, it renders and behaves correctly (installed with ryoku plugin add, verified against a real tailnet with exit nodes).
  • tests/validate-catalogue.sh — manifest/audit pass locally via ryoku plugin validate.
  • I own or have permission to submit this content, and it is licensed for redistribution (MIT; original by neur0map).
  • It does not overwrite user configuration or run privileged commands without clear consent (pkexec only on an explicit, confirmed tap).

Opened with ryoku plugin share; the product manifest and the registry entry were generated from the installed plugin.

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Changes requested — 0 critical and 3 major issue(s): see the inline comments and the walkthrough for fixes and an agent-ready prompt.

🧹 Nitpicks (1) — optional, not blocking
  1. plugins/registry.json:435-436 — Data Integrity — The existing preview and screenshots are removed from the registry, so the updated catalogue item has no real preview. Restore the existing images or add replacement captures, then include them in the regenerated product…

Comment thread plugins/vpn/product-manifest.json Resolved
Comment thread plugins/vpn/service/Main.qml Outdated
Comment on lines +294 to +298
function useExitNode(addr) {
if (!addr || String(addr).length === 0) return;
var cmd = ["tailscale", "set", "--exit-node=" + addr, "--exit-node-allow-lan-access"];
if (svc.acceptRoutes) cmd.push("--accept-routes");
ts._run(cmd, "exiton");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major · Possible Bug · fix: medium effort

Disabling acceptRoutes only omits the flag; it never clears Tailscale's persisted accept-routes preference. After routes have been enabled, turning the setting off and reconnecting or selecting an exit node can still route traffic through advertised subnets. Apply the false value explicitly as well.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. turnOn and useExitNode now pass --accept-routes=<true|false> explicitly (via a shared _acceptFlag()), so turning the setting off applies --accept-routes=false and clears Tailscale's persisted preference instead of merely omitting the flag.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't confirm this is fixed yet. setAcceptRoutes now explicitly passes false, but the excerpt omits _acceptFlag(), reconnect logic, and setting-change wiring needed to verify the reported failure is fully resolved.

Comment thread plugins/vpn/service/Main.qml Resolved
@neur0map

neur0map commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

🦊 mika's review

Incremental review: new commits since the last checkpoint.

Summary

  • Add a Tailscale exit-node picker and advertised-route setting.
  • Add a confirmed clean restart through the host service seam.
  • Update VPN catalogue metadata and documentation for version 2.1.0.

Estimated review effort: 2/5 · risk: high

📁 Walkthrough details

plugins/vpn/content/Panel.qml

  • Adds an exit-node picker with active-node indication and selection controls.
  • Adds a two-tap clean-restart control with a three-second confirmation window.
    • Displays advertised exit nodes while Tailscale is connected.
    • Warns that restart disconnects Tailscale and requests authentication.

plugins/vpn/service/Main.qml

  • Parses and sorts exit-node peers from Tailscale status for the picker.
  • Applies the advertised-route setting when connecting or selecting an exit node.
  • Clears the exit node and disconnects before restarting tailscaled through ryoku-host.
    • Retries the exact failed Tailscale command after operator authorisation.
    • Reports teardown and privileged restart failures.

plugins/vpn/manifest.json

  • Bumps the plugin to 2.1.0 and adds the default-on acceptRoutes setting.
  • Declares the privileged ryoku-host service restart capability.
    • Updates the plugin description for the new Tailscale controls.

plugins/vpn/README.md

  • Documents the exit-node picker, route acceptance, clean restart, and operator authorisation.
  • Lists the privileged commands and ryoku-host dependency and credits the contributor.
    • Updates settings and capability documentation for 2.1.0.

plugins/vpn/product-manifest.json

  • Updates the version, file hashes, and sizes for the 2.1.0 package contents.
    • Refreshes metadata for the panel, service, manifest, README, and widget preview.

plugins/registry.json

  • Updates the VPN catalogue entry to 2.1.0 with revised descriptions and product-manifest hash.
    • Updates the catalogue date and removes the upstream and Discord fields.

No actionable findings. Mika looked for bugs, security issues, and risks in the diff and came up empty on clear defects.

⚠️ Security concerns: Route acceptance is enabled by default and can override existing Tailscale preferences.

🧪 No relevant tests detected in the diff.

🚦 Merge recommendation: changes_required


🦊 Generated by Mika — the Ryoku org's self-hosted AI code reviewer. Machine findings: verify before merging.

@Glitchboi-sudo
Glitchboi-sudo force-pushed the plugin/vpn branch 3 times, most recently from 724f8aa to d865379 Compare December 1, 2026 18:47
@neur0map

neur0map commented Dec 1, 2026

Copy link
Copy Markdown
Member

I've reviewed 5 pushes on this PR automatically, so I'll stop doing full passes here and only check whether open threads get fixed. Add the mika:review label or comment @ryoku-mika review for another full review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants