Skip to content

Update extension to local API flow - #70

Open
yurividal wants to merge 1 commit into
maxgallup:post-gnome45from
yurividal:post-gnome45-api
Open

yurividal wants to merge 1 commit into
maxgallup:post-gnome45from
yurividal:post-gnome45-api

Conversation

@yurividal

Copy link
Copy Markdown

This patch implements the item that is remaining in the to do list, which is to change the functionality of the extension to use the tailscaled API, instead of directly running commands.

The extension will try to use the current user for every interaction, and in case --operator=$USER isn't set, it will fall-back to requesting root authentication.

@Celger

Celger commented May 12, 2026

Copy link
Copy Markdown

It didn't work for me. Debian 13, Gnome 48 and

$ tailscale --version
1.96.4
  tailscale commit: 8cf541dfd1e0a97096c01cb775d5e26336f3bc6c
  long version: 1.96.4-t8cf541dfd-g62bc84ce7
  other commit: 62bc84ce7236dafdeb40272171dae03a66502ed1
  go version: go1.26.1

PabloB94 added a commit to PabloB94/tailscale-status that referenced this pull request Sep 1, 2026
Tres correcciones de fondo:

- OperatorUser es POR PERFIL, no global: LocalBackend.OperatorUserName()
  lee CurrentPrefs().OperatorUser() y un perfil nuevo arranca con prefs por
  defecto. Configurarlo solo en el primero deja la máquina sin permiso para
  volver tras conmutar. `tailscale login` acepta --operator y --nickname
  (verificado en el --help local), así que el segundo perfil nace ya con
  el operador puesto.

- `tailscale switch` sale 0 aunque no reconecte: con la node key caducada
  imprime "Logged out." y devuelve 0. cmdTailscale() solo mira
  get_successful() (extension.js:542) y descarta el stdout (541), así que
  la UI mentiría. Hay que parsear stdout.

- Trampas de LocalAPI para los PRs maxgallup#70/maxgallup#74: la barra final es obligatoria
  y ServeHTTP rechaza con 403 cualquier peticion con Origin o Referer.
  Verificado con curl: Host correcto 200, Host: localhost 403, con Origin
  403, con Referer 403.

Añade tambien por que estar en wheel no sirve en Fedora: isLocalAdmin solo
conoce grupos de macOS y QNAP, y Tailscale no instala reglas de polkit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y3xo4mFsJYPkJCpdqZ4FXk
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