mobile

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mobile renders the "Code from your phone" card (with a scannable QR) and manages an idempotent ~/.ssh/config entry for the box, so connecting from Termius/Blink (or any terminal) is as close to one tap as the apps allow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Card

func Card(b Box) string

Card renders the printable "Code from your phone" panel with the QR.

func RemoveSSHConfig

func RemoveSSHConfig(name string) error

RemoveSSHConfig deletes the box's block from ~/.ssh/config (used on destroy).

func WriteSSHConfig

func WriteSSHConfig(b Box) (string, error)

WriteSSHConfig idempotently writes the box's Host block into ~/.ssh/config (replacing any prior block for the same name) and returns the file path.

Types

type Box

type Box struct {
	Name    string // alias, e.g. "devbox"
	FQDN    string // MagicDNS FQDN, e.g. "devbox.tailXXXX.ts.net" (preferred)
	IP      string // 100.x tailnet IP (fallback / robust when MagicDNS isn't resolved)
	User    string // "dev"
	KeyPath string // ~/.ssh/id_ed25519
}

Box is everything the mobile/desktop clients need to reach the server.

func (Box) SSHURL

func (b Box) SSHURL() string

SSHURL is the ssh:// link encoded in the QR (only our own MagicDNS name/IP — no untrusted input — so it can't be an injection vector in an ssh:// handler).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL